refactor: host EnvMonitor from env_monitor_core, route per detector

EnvMonitor and its detectors now live in env_monitor_core. NavigationRuntime owns
the monitor; StateMachine runs each detector's own route (step or sequence,
lock or abort on exhaustion) with a cursor per detector. RecoveryRunner accepts
named routes for detectors outside the six built-in triggers.
This commit is contained in:
2026-11-27 10:08:52 +07:00
parent 605dbc8e22
commit 1aa2a07469
25 changed files with 828 additions and 3019 deletions

View File

@@ -77,6 +77,13 @@ cây nav core.
cấu hình đang có hiệu lực sẽ nằm trong cây config của nav core, không nằm trong gói này — bản trong
`test/` nếu có chỉ phục vụ test và phải chạy kèm biến môi trường trỏ vào đúng thư mục đó.
EnvMonitor (giám sát môi trường: contact / stall / unreachable) nằm ở gói riêng `env_monitor_core` từ 26/11/2026.
`NavigationRuntime` gọi `EnvMonitor::initialize(root_nh)` và đưa con trỏ vào `ControlLoopDeps::env_monitor`;
`ControlLoop` chỉ gom feature (`EnvironmentPort`), nối `fired_mask` vào state machine và áp
`brake_applied`/`v_cap_applied`. Mỗi detector tự chọn route recovery (`route`, `route_mode: step|sequence`,
`on_exhausted: lock|abort`); `ControlLoop::configure` dựng `StateMachineConfig::detector_routes` theo đúng thứ tự
detector. Xem README của `env_monitor_core` và `Test/docs/move_base2/ENV_DETECTOR_PLUGINS_PROMPT.md`.
## Trạng thái
Runtime thật đã chạy trọn trên sim: costmap, planner/controller/recovery/action nạp qua boost::dll,