Commit Graph

2 Commits

Author SHA1 Message Date
a9785b99ee feat(env_monitor): cổng đứng yên cho kStall — không dịch chuyển suốt idle_window_s là kẹt
stall/idle_window_s 25 s: dịch chuyển thực < disp_min suốt cửa sổ thì giơ stall kể cả khi lệnh
tích luỹ không đủ để đo eff (PRIEST bò 0,03–0,15 m/s tại chỗ 30 s với blocked_ahead cost 253 mà
không khai bất khả thi — run 6/9 10:57, cổng dịch chuyển câm vì lệnh 12 s < 1,5 m, kUnreachable
mới gỡ ở 75 s). Thử offline trên 7 lượt JSONL: mở đúng hai ca quần tại chỗ, 0 lần ở ba lượt sạch.
Ring vị trí 192 mẫu; verdict/JSONL/dòng 1 Hz thêm `idle`.

Sim 6/9 15:18 (map tĩnh + fake_pedestrians): 2 mission tới goal, 2 detour đều của PRIEST,
EnvMonitor 0 cờ, 0 idle, 0 unreachable.

Test: env_monitor 45/45 (+2), 10 bộ còn lại pass; YAML ↔ reader 66/66.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017xXjFjr2DQ6rhmhHSW4fk4
2026-09-06 15:21:57 +07:00
261cc20ad4 feat: EnvMonitor thay PathMonitor — giám sát môi trường bằng EDT/geodesic/quỹ đạo thật
Bộ giám sát mới trong ControlLoop (core/env_monitor, core/grid_analysis, ports/environment_port,
io/env_logger), thay bốn phép đo của PathMonitor (code cũ còn, tắt bằng path_monitor/enabled: false):

- kContact: dò tiếp xúc dọc quỹ đạo local planner (thay cung v/omega), bao tốc độ sqrt(2a(d - margin))
  có dư, phanh chỉ khi vượt bao, cờ collision khi kề mũi tĩnh 1 s; cổng xoay tại chỗ theo lệnh
  controller muốn; hysteresis + xác nhận khi nhả; đứng ra sau detour không dịch robot (nhường
  controller); giữ phanh khi route khoá thì báo no valid command để controller_patience leo thang.
- kStall: cost_to_go = geodesic tới điểm thoát 2 m dọc plan + phần plan còn lại, index plan bám cửa
  sổ, bộ lọc lật liên thông; cờ no_progress chỉ khi cổng dịch chuyển thực mở (robot không đi được
  đâu trong 12 s dù lệnh >= 1,5 m) — thay ngân sách replan cho stall.
- kUnreachable: liên thông tới điểm thoát, đang ở action log.
- EnvLogger ghi JSONL mỗi tick nặng; config/runtime/env_monitor_params.yaml đủ khoá, comment tiếng
  Việt; ControllerPort::measuredVelocity; FakeEnvironmentPort cho test.

Sim 5–6/9: hết churn detour, khe 1,25 m đi qua 0,5 m/s, lượt 6/9 10:15 2 detour/142 s không oan.
Test: grid_analysis 31, env_monitor 43, plan_inspector 37, walking_skeleton 87, các bộ khác pass.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017xXjFjr2DQ6rhmhHSW4fk4
2026-09-06 10:30:31 +07:00