Commit Graph

47 Commits

Author SHA1 Message Date
f4f99650df feat: tiep nhan route graph (Voronoi) cho global planner + anytime ARA* schema, don doc EnvMonitor
- navigation_server: them addRouteGraph(topic, RouteGraph), day vao sensor_store cung namespace
  addStaticMap; consumer (SBPLLatticePlanner) tu doi chieu map_hash.
- PlannerRunner: them setSensorReader()/attachSensors() - trao SensorReader cho global planner
  nao ke thua robot_sensor_ports::SensorConsumer, goi TRUOC initialize() (dynamic_cast, giong co
  che ControllerRunner dang dung).
- sensor_store_params.yaml: khai topic /route_graph (data_type RouteGraph, capacity 1).
- sbpl_global_params.yaml (config/runtime): dong bo schema initial_epsilon/final_epsilon/
  eps_step/repair_time/return_first_solution + khoi voronoi_corridor (xem pnkx_nav_core
  c52cbe5, Test/sbpl_lattice_planner cho code doc cac khoa nay).
- launch: them arg launch_prefix (vd "stdbuf -oL" - robot::log_* dung printf khong flush, qua
  `| tee` bi block-buffer 8 KB lam log dung o dong cu du node con chay); them
  route_graph_maps_dir/route_graph_topic cho amr_node doc file voronoi.json theo map dang kich hoat.
- docs: xoa PLAN_LIFECYCLE_CANCEL_PAUSE_RESUME.md (don sang Test/docs/move_base2/), sua duong dan
  ENV_MONITOR_PLAN.md trong comment cac header EnvMonitor lien quan.
2026-09-22 15:31:43 +07:00
0d333212b1 config: go schema hybrid path-tracking khoi priest params (revert)
priest_local_planner da reset ve 28e0636 (bo feat hybrid path-tracking
PathTrackerCore/HybridArbiter). Khoa hybrid_mode/tracker_*/blend_*/
debug_hybrid khong con duoc code doc nua, go theo cho khop schema -
noi dung file khop dung dc35900^ (bb64511), giu nguyen cac tune khac
(goal_tolerance, max_velocity...).
2026-09-17 13:43:58 +07:00
9f504ee50e config: bat hybrid_mode 1 -> 2 (cay sim runtime)
SHADOW (1, chi log doi chieu) -> muc ke tiep trong plan hybrid
path-tracking (xem README priest_local_planner).
2026-09-17 13:37:37 +07:00
b205cf41bc config(priest): blend_dev_noise/avoid 0.05/0.20 -> 0.15/0.30 + blend_dev_gate_obstacles (do 17/9) 2026-09-17 09:45:50 +07:00
dc359007b8 config: them khoa hybrid_mode + tracker/blend cho priest_local_planner (cay sim)
hybrid_mode: 1 (shadow) de thu log [DBG-PRIEST-HYB] doi chieu tracker voi
solver truoc khi chuyen 2. Xem doc/HYBRID_TRACK_AVOID_PLAN.md va commit
tuong ung o priest_local_planner (nhanh feature/hybrid-track-avoid).
2026-09-16 18:51:07 +07:00
bb645111f7 tune: xy/yaw_goal_tolerance 0.02/0.01 -> 0.04/0.04 (P4)
Dung sai cu bat kha thi ve vat ly: dung tu 0.15 m/s trong 2 cm can a=0.56
m/s^2 > decel_comfort 0.35 (do 15/9: dist=0.06 ma vmeas=0.17), robot BAT
BUOC vuot goal. yaw 0.01 rad (0.57 deg) nam duoi nhieu odometry, robot san
diem dung. Vanh nha latch (= tolerance x xy_latch_release_factor) theo do
nghi 0.10 -> 0.20 m: do 16/9 latch o 0.093 roi nha o 0.100 vi xoay tai cho
troi 7mm, 0.10 qua sat.
2026-09-16 18:31:30 +07:00
8d9932c905 config: tune runtime sim params (max_velocity, clear map, allocated_time)
- priest max_velocity 0.5 -> 1.2 m/s
- recovery clear_costmap.affected_maps both -> local (chi lam moi
  sensor data, khong dung ban do tich luy)
- SBPLDetourPlanner.allocated_time 1.0 -> 2.0 s
2026-09-15 15:08:14 +07:00
b84b76766d config: bat elite blend (B2) + ha omega_ff_curvature_floor tren cay sim
Doi cho priest_local_planner de do B2/B3 (xem commit tuong ung o
priest_local_planner):
- elite_blend_enabled: true, topn=10, lambda=0.5, validate_margin=0.01
- omega_ff_curvature_floor: 0.12 -> 0.04

File nay dang mang theo 2 khoa co san tu truoc (khong lien quan doi nay):
slew_reseed_gap: 0.3, zeta_from_start_tangent: false.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-08 16:25:10 +07:00
2a8e4167e8 refactor: bỏ hai công tắc mission_layer_enabled và docking_requires_marker
Mission layer giờ LUÔN chạy: mọi VDA5050 Order đi qua `mission_adapters` — cắt
thành chặng tại mỗi node có action, chỉ phần `released` được chạy,
`orderUpdateId` nối tiếp, `mission_timeout` làm lưới cuối. Đường lùi "order đi
thẳng xuống như một goal" không còn được chọn bằng config; nó chỉ còn là hành vi
tự động khi layer không nạp được nguồn nào, và vẫn kèm log cảnh báo.
`mission_namespace` rỗng giờ bị validate CHẶN — trước đây tắt layer là khỏi cần
namespace, giờ rỗng nghĩa là boot với một layer không đọc được nguồn nào.

Marker của profile docking thành TUỲ CHỌN: docking chạy bằng goal_frame đã quy
về pose tuyệt đối và local planner không đọc `maker_name`, nên
`PNKXDockingLocalPlanner` legacy — lý do duy nhất của công tắc — không còn được
dùng. Request có marker vẫn được validate và bind như cũ, chỉ bỏ nhánh từ chối
request không marker.

Bỏ theo: hai trường config, bốn chỗ đọc/describe/validate, hai khối YAML runtime
và hai dòng trong test config. Test: xoá RejectsDockingRequestWithoutMarker (trái
hợp đồng mới) và DisabledMissionLayerDoesNotNeedANamespace; đổi
MissionLayerIsEnabledByDefault -> MissionNamespaceHasADefault,
RejectsEnabledMissionLayerWithoutNamespace -> RejectsAnEmptyMissionNamespace.

Verify: catkin_make --pkg move_base2 rc=0; ctest -R move_base2 17/17.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013rayqed51UoUzE7QDRmM9K
2026-09-06 21:22:06 +07:00
c0a04b29ad refactor: xoá PathMonitor và PathCheckPort, EnvMonitor là bộ giám sát duy nhất; gộp refreshSnapshot
Xoá hạ tầng giám sát cũ đã tắt từ 5/9 (path_monitor/enabled: false), −2947 dòng:
- ControlLoop: PathMonitorConfig, updatePathMonitor / updateProgressMonitor / applyCollisionGuard /
  planIsBlocked / resetPathMonitor / rebuildPlanArcLength, toàn bộ member bốn phép đo, luật "plan
  mới bẩn thì giữ plan cũ" trong collectPlannerResult. Bốn cổng StateMachineInput giữ nguyên
  (off_path không còn nguồn, đặt false).
- ports/path_check_port.h, CostmapPathCheck trong NavigationRuntime.
- plan_inspector: bỏ checkPlan / checkMotion / PlanBlockResult / MotionCheckParams /
  MotionBlockResult; giữ planarTransform, nearestIndex, trackedNearestIndex, crossTrackError.
- Config: readPathMonitor, MoveBase2Config::path_monitor, validate; xoá
  config/runtime/path_monitor_params.yaml; comment YAML/state_machine đổi sang tên verdict EnvMonitor.
- Test: FakePathCheckPort, 30 test WalkingSkeletonPathMonitor/CollisionGuard, 13 test
  PlanInspectorCheck/Motion, 2 test validate thân guard.

P0(b): ControlLoop::step() gọi EnvironmentPort::refresh() một lần đầu cycle (không phụ thuộc
env_monitor/enabled); ControllerRunner::setSnapshotRefreshedByLoop(true) làm ba refreshSnapshot()
trong runner thành no-op — monitor và controller đọc cùng một lưới, một bản copy mỗi cycle.

Test: env_monitor 43, grid_analysis 33, plan_inspector 11, walking_skeleton 57, config_validation 32,
scenario 12, state_machine 100, navigation_server 56, controller_runner 28, velocity_arbiter 29,
planner_runner 31 — pass.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017xXjFjr2DQ6rhmhHSW4fk4
2026-09-06 10:55:15 +07:00
f2097380e4 feat: trigger collision riêng, ngân sách recovery theo dịch chuyển, guard đo bằng thời gian/góc
Năm thay đổi của cùng một chiến dịch: robot đứng chết ở góc trụ và giữa đám
đông. Mọi con số dưới đây lấy từ log sim ngày 3-4/9, ghi lại trong
Test/COLLISION_GUARD_LOOP_FIX_PLAN.md.

1) Ngân sách recovery nạp lại theo DỊCH CHUYỂN (state_machine)
   Trước: recovery thành công + nộp path mới thì cursor route reset NGAY. Sim
   4/9: guard chặn tại chỗ -> detour lập lại đúng đường cũ (cost y hệt, 0 ms)
   -> cursor về 0 -> chặn lại sau 2 cycle -> 249 vòng trong 52 s, robot bất
   động, controller_patience không bao giờ tích đủ vì path_blocked chen trước
   mỗi 0.2 s. Giờ chỉ nạp lại khi robot đã đi >= recovery_reset_min_travel
   (0.10 m) kể từ lần nạp trước; chưa đi thì tính như một lần thất bại ->
   route cạn -> mute -> controller_patience -> controlling_failed -> ABORT có
   lý do, ~2 s. Mốc theo origin đo quãng đường (reset cùng lúc với nó), nếu
   không thì 0.18 m sau path mới bị báo "0.00 m" và ABORT oan.

2) Guard loại trừ BASELINE (plan_inspector)
   Câu hỏi đổi từ "thân có đè LETHAL không" thành "lệnh này có đưa THÊM ô
   LETHAL vào thân không". Ô đã nằm dưới thân đệm tại pose hiện tại được gom
   thành baseline (rasterize diện tích ~600 ô, binary_search) và bỏ qua ở các
   mẫu sau. Sim 4/9: người kề hông ở 0.46 m ngang (thân 0.48 + đệm 0.05) làm
   mẫu đầu tiên báo "0.05 m" mãi dù PRIEST lệnh đi thẳng, SBPL (không đệm) bảo
   đi được, robot đứng chết. Trượt song song thì đi được, rẽ vào thì vẫn chặn.

3) Thân robot lấy từ FOOTPRINT COSTMAP
   collision_*_offset = 0 cả ba -> hỏi PathCheckPort::robotBodyExtents() mỗi
   cycle (footprint không đệm, cùng hình với SBPL và PRIEST). Đổi footprint lúc
   chạy là guard đổi theo, không phải chép số vào hai file. Khai tay thì phải
   đủ cả ba, khai lửng là config sai. Không có nguồn nào thì báo lỗi và KHÔNG
   kết luận — dừng mù là biến lỗi cấu hình thành robot chết.

4) "Sắp chạm" đo bằng THỜI GIAN và GÓC, không chỉ mét
   Mét dọc cung không nói lên gì với cung xoay gần tại chỗ: cùng 0.15 m, đi
   thẳng 0.36 m/s là chạm sau 0.4 s, còn xoay bò v 0.04 omega -0.5 (R 0.08 m)
   là quay 107 độ và còn 3.8 s — PRIEST đã thôi xoay sau 30-60 độ để thẳng hàng
   với path. Sim 16:26: 11 lần nổ trong 15 s tại góc trụ, xoay 0.9 rad mất 12 s
   thay vì 2 s. Giờ chỉ dừng khi t_contact <= collision_stop_time HOẶC turn <=
   collision_stop_angle; ngoài đó chỉ kẹp v. Đi thẳng (turn ~ 0) không đổi hành
   vi. Cung cũng không dò quá collision_lookahead_angle.

5) Trigger kCollision RIÊNG cho Phép đo 3
   Trước dùng chung path_blocked. Phép đo 1 nổ ở 3 m nên lập lại đường là đủ;
   Phép đo 3 nổ khi đã sát vật, replan từ đúng pose đó thường trả cùng path
   hoặc không ra nghiệm (start trong vành 253) — muốn thoát phải ĐỔI POSE, tức
   back_up đứng trước detour_path. Route, ngân sách và khoá đều riêng. Ưu tiên
   collision > path_blocked > off_path. Cạn route vẫn là KHOÁ chứ không ABORT
   (contract 2026-08-05e).

Config: tách path_monitor ra file riêng path_monitor_params.yaml, sắp xếp lại
theo bốn phép đo; recovery_behaviors_params.yaml sắp xếp lại theo trigger và
dọn bốn khoá chết của mô hình detour cũ. Khoá mới: recovery_reset_min_travel,
collision_exclude_baseline, collision_stop_time, collision_stop_angle,
collision_lookahead_angle.

Debug (khoá debug/state): dòng "hit at sample K: <edge> edge touches cell
(x, y)" và "body overlaps N LETHAL cell(s) ... letting it move" để phân biệt
"góc thân quét tới" với "người bước tới" khi đọc log mà không có costmap.

Verify: catkin_make --pkg move_base2 rc=0; ctest -R move_base2 15/15
(MotionCheck 16, CollisionGuard 13, RecoveryBudget 6, config 34).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013rayqed51UoUzE7QDRmM9K
2026-09-04 19:35:25 +07:00
78c3808eb1 config: priest sim — in_place_yawrate_max 1.2 rad/s
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-29 10:37:14 +07:00
6d8930c203 config: priest sim — omega_ff_filter_tau 0.35 (E1b)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-29 10:32:27 +07:00
c4babaa87a config: priest sim — head_slowdown release_cost 128, scale_slew 0.02 -> 0.01
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-29 10:22:29 +07:00
ae019596cc config: priest sim — bật E1a/E2 (clear_scale 0.25, hysteresis 1.5 bucket, restore delay 5)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-29 09:57:23 +07:00
524939efeb config: priest sim — bật terminal_slide_max_dist 1.5 m (L1)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-28 23:42:29 +07:00
9d20a46d70 config: priest sim — nới jerk 0.5->1.0, angular_jerk 2.0->3.0 (0.5 quá ì)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-28 22:59:40 +07:00
96df99fed2 config: priest — bật gate G1 + bao êm ái cho cây sim
10 khoá mới khớp priest_local_planner (gate theo khoảng cách, accel/decel/
jerk comfort, trần gia tốc góc, head slowdown slew) và bật
collision_check_enabled sau khi gate đổi sang phân mức dừng/giảm tốc.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-28 22:34:31 +07:00
c626c4d45d Retune the dev simulation config
Bench and Gazebo settings only; the robot trees are untouched.

Planners: the position profile moves to PriestLocalPlanner, and the three
docking profiles all point at HybridDockingLocalPlanner instead of the Stanley
instances. Loop drops to 20 Hz, command_semantics back to twist for the sim
drive, max_vel_x to 1.20, recovery behaviours and the path monitor off while
the docking chain is under test.

PRIEST runs cem 3 with performance_metrics off and debug_level 0, which is the
configuration the CPU measurements were taken at. Metrics have to stay off for
any further benchmark.

The SBPL primitive path pointed into rl_ws, a workspace that is not on this
machine; it now points at the copy in sbpl_lattice_planner. sensor_store's
report_period goes to 0 to stop the periodic dump. The sim launch defaults
robot_type to T800 and re-enables depth_image_proc.

The VDA5050 charger flow replaces the pallet fixture: DetectCharger and the
charger marker, with the trailing back-off commented out. The rotate compound
action is renamed to lowercase to match what the config reader looks up.
2026-08-27 13:22:26 +07:00
e282557079 config: cập nhật comment goal_blocked_check_radius — dò đĩa nửa thân, không phải 1 cell (priest 6d78767)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 21:36:09 +07:00
be62564fb2 config: khoá goal_blocked_check_radius 1.5 m cho priest — dừng-chờ khi obs đè goal (priest 8182297)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 21:18:32 +07:00
7934db040c config: khoá hold_timeout 10 s cho priest — hết treo câm khi obs đè goal (priest 245d656)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 21:01:06 +07:00
f9f87d0865 config: weight_velocity_deficit 2.0 cho priest sim — trị solver-crawl (priest 73bbdd1)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 16:16:16 +07:00
4aa94a145b config: head_slowdown_inscribed_scale 0.7 cho priest sim (kèm min_scale 0.35 user chỉnh)
Đồng bộ với priest 2455707 — 253 ở probe mép thân chỉ rà nhẹ, 254 mới
đạp sâu; hết phanh đáy mỗi lần vào band hành lang.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 16:05:20 +07:00
c1e4b89206 config: xy_latch_release_factor 2.0 -> 5.0 cho priest sim — vành 0.10 m hết orbit quanh goal
Đo 19/8: latch lúc còn trôi 0.2 m/s văng khỏi vành 0.04 m (nhả oan ở
0.041/0.042), orbit 74 s. Kèm fix fallback priest d0661e6.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 15:45:10 +07:00
0c24363a78 config: bật debug_command cho priest sim — [DBG-PRIEST-CMD] format mới (priest eb413f5)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 15:30:25 +07:00
6af1999f4a config: comment head slowdown — trọng số độ-gần-thời-gian (priest ea05d0d)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 15:25:51 +07:00
768831b36a config: head slowdown priest sang bản so tương đối + head_slowdown_release_cycles
Đồng bộ với priest_local_planner 6d75b73 — hành lang hẹp không còn phanh
đáy 81 s; nhả phanh debounce 10 chu kỳ.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 15:20:39 +07:00
62747503f4 feat(config): khoá side_switch_feasible_res + head_slowdown cho priest (sim BẬT 0.3 / 1.5s)
Chống cú quệt khi nhảy nghiệm quá muộn (sim 19/8: flip ở sv=10, res 2.9-3.9,
sv 54): guard chỉ cho đổi bên khi nghiệm bên mới thực thi được từ pose hiện
tại; head slowdown bò theo ô costmap xấu nhất dưới thân dọc đầu quỹ đạo.
Kèm theo gate threshold 254 -> 253 (INSCRIBED) đúng vai trò của gate.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 15:10:24 +07:00
7295de12fc feat(config): khoá obstacle_time_discount cho priest — co ellipse vật cản theo thời gian horizon
Cụm vật cản chỉ chạm đuôi quỹ đạo (gần góc cua path rẽ trước khi tới) bẻ cong
toàn bộ spline — robot vào cua lượn rộng thừa ~0.5 m (sim 19/8: res treo 9.2,
sv=0, vi phạm toàn ở đuôi horizon). Bật trên cây sim: start 2.0 s, min 0.2.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 13:29:53 +07:00
160469d3a5 config: bật rotate_settle_yawrate 0.05 cho PriestLocalPlanner (sim)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 10:45:45 +07:00
b0f4da03bd config: bật side_infeasible_res 0.3 cho PriestLocalPlanner (sim)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 10:19:33 +07:00
8173dd7494 config: cập nhật comment rotate_to_path — chỉ align một lần ở đầu plan
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 10:06:05 +07:00
71e5e1bf51 config: bật rotate_to_path cho PriestLocalPlanner (sim)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 09:53:22 +07:00
4e0c65a2fd config: bật start_violation_ramp_time 1.5 cho PriestLocalPlanner (sim)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 09:37:39 +07:00
9b98ab3263 config: bật t_fin_min 1.0 (re-time horizon) cho PriestLocalPlanner (sim)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 22:59:04 +07:00
51d9550054 config: omega_ff_min_speed 0.15 + comment direct-approach cho PriestLocalPlanner (sim)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 22:35:08 +07:00
179f087b8b config: goal_approach_distance 0.5 cho PriestLocalPlanner (sim)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 22:26:40 +07:00
d8a74ed574 config: bật goal XY latch (release factor 2.0) cho PriestLocalPlanner (sim)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 22:10:58 +07:00
64ba7ece70 config: probe hông gate 0.48 + early-exit residual 0.05 + side_hold 10 (sim)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 21:56:53 +07:00
0500c2c007 config: bật proj_early_exit 0.01 + footprint 3 circle cho PriestLocalPlanner (sim)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 21:37:15 +07:00
bf6a3fed25 config: bật side_hysteresis cho PriestLocalPlanner trên cây sim
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 20:56:26 +07:00
00db0d6ea3 config: bật obstacle_corridor cho PriestLocalPlanner trên cây sim
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 20:31:52 +07:00
290cc13176 config: khối debug + cổng va chạm cho PriestLocalPlanner (cây sim)
debug_level 2 (throttle 1 Hz) phục vụ đo baseline solve time / obstacle
saturation; collision_check bật với footprint T800 (front/rear 0.583).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 20:27:27 +07:00
31c5b218cb docs: viết lại comment các file config bằng tiếng Việt
File YAML là thứ người vận hành mở ra sửa khi đứng cạnh robot, nên comment phải
đọc hiểu ngay. Mỗi tham số ghi đủ đơn vị, ý nghĩa và hệ quả khi tăng/giảm. Tên
key, plugin, frame, topic và thuật ngữ đã chuẩn hoá giữ nguyên tiếng Anh.
Không đổi một giá trị nào.
2026-08-15 13:37:50 +07:00
20ae52ea84 update 2026-08-09 19:17:02 +07:00
d8babff20b optimal 2026-07-30 09:24:47 +07:00