Sync tu Test/move_base2/config/runtime (cay sim, hybrid_mode=1) va
Test/priest_local_planner/cfg (robot that, hybrid_mode=0) — chi dong bo
KHOA + comment, hybrid_mode giu 0 (tat) o day cho toi khi chay thu. Xem
doc/HYBRID_TRACK_AVOID_PLAN.md o priest_local_planner.
Toan bo cac loi goi testXxx() trong try{} cua main() bi comment out.
NodeHandleTest van dang ky qua add_test nen ctest se bao PASS gia (khong
con goi test nao that su). Giu nguyen theo yeu cau - can bat lai hoac go
dang ky add_test truoc khi dua ket qua NodeHandleTest vao bao cao gi ca.
doc/cpp_host_guide.md - danh cho host noi thang voi BaseNavigation,
tach voi NAV_C_API_2_GUIDE.md (lop extern "C" cho .NET). Neu ranh gioi
ABI qua boost::dll giua ba host (amr_control, libnavigation_c_api.so,
host tu viet) va yeu cau rebuild dong bo khi sua navigation.h.
- hybrid docking: global_plan_viapoint_sep 0.2 -> 0.12 (do 27/8: sep
0.2 khien khop noi cong->thang mang herr -0.10 rad, lech ngang phong
toi 30mm; ha xuong khop sac hon ~40%). Ghi lai lich su do de khoi lap
lai thu nghiem 26/8 (sep 0.2 -> 0.3 lam xau ~50%).
- priest: them nhom key on dinh nghiem doan thoang (lateral_std_clear_*,
clear_residual, clear_streak_cycles - do 28/8 omega nhay khi thoang),
hysteresis/delay cho horizon (horizon_hysteresis_buckets,
horizon_restore_delay_cycles - tranh doi hinh ca batch khi nhay bucket
hoac hut 1 chu ky do arc), nhom infeasible_residual/streak/cooldown
(solver tu khai bat kha thi, TAT tren robot that cho toi khi chay
thu), va nhom accel_comfort/jerk cho lenh xuat em hon max_acceleration
cua solver.
- recovery: them trigger collision -> detour_path (2026-09-04, truoc do
rong = guard khong vu trang); go 4 key planning_distance/sample_step/
rejoin_clearance/max_rejoin_distance da het tac dung tu khi detour
chuyen sang lap lai ca duong; khai lock_costmap=true tuong minh (gia
tri = default cu, hanh vi khong doi).
BaseNavigation them 2 virtual moi o CUOI vtable: emergency() va
clearEmergency(), khong doi so cua method cu (ABI: rebuild dong bo
libmove_base.so + C API + moi host). State them EMERGENCY = 14, append
cuoi enum nen gia tri cu khong doi (ca ben C mirror nav_c_api.h).
emergency(): lenh 0 ngay, huy chang dang chay (bao CANCELLED dung 1
lan), xoa hang doi mission, chot state. Hieu luc TRUOC KHI ham tra ve
tren chinh thread goi (getTwist/getFeedback thay doi ngay ca khi
control thread dang block trong plugin); don dep that (planner,
recovery, action, mission layer) chay o chu ky ke tiep cua control
thread. Trong luc chot: moveTo/executeInstantActions bi tu choi,
pause/resume/cancel bi bo qua. clearEmergency() dua ve PENDING, khong
tu chay lai - host phai gui goal moi.
C API: navigation_emergency() / navigation_clear_emergency() trong
nav_c_api_2.h, cap nhat guide va test_convertor cho enum EMERGENCY moi.
static local dung chung 1 window cho ca ham nen nhieu diem goi giam len
nhau (controller_runner co 11 diem goi log_error_throttle, diem no in
truoc se cam diem kia im ca cua so). Chuyen sang bang lock-free keyed
theo return address (__builtin_return_address) + format pointer, moi
call site giu window rieng.
Kem theo:
- color_enabled chuyen std::atomic<bool>, tranh data race khi control
loop / sensor callback / planner thread cung goi log.
- is_color_supported() cache ket qua qua std::call_once, bo getenv() lap
lai moi dong log trong control loop.
- NaN/am trong throttle gio la "khong throttle" thay vi cam log vinh
vien (NaN truoc day fail phep so >= mai mai).
- them test_console_throttle.cpp + dang ky ConsoleThrottleTest qua
add_test trong CMakeLists.txt.
- robot_nav_core::Preemptable (new header): mixin a BaseGlobalPlanner may
implement to accept a preempt() cut during makePlan(), no vtable break for
planners that don't.
- move_base_core::component_status_probe.h (new): ComponentStatusEntry +
boost::dll alias name ("MoveBaseComponentStatus") a host can probe to read
per-component phase (idle/busy/stopping/paused/hung) without linking
move_base2 directly.
- nav_c_api_2.h/.cpp: NavComponentStatus struct and
navigation_get_component_status() — lazy dlsym of the probe above, returns
0 rows if the loaded .so doesn't export it. Doc: PREEMPTING is now a
truthful "still winding down" state, not "acknowledged", and a host must
poll to quiescence rather than resend immediately.
- move_base_common_params.yaml: settle_timeout, stopped_measured_linear/
angular_eps, watchdog_period + per-component stall budgets (Vietnamese
comments, matches the schema). Also fixes a wrong comment on
max_planning_retries: 0 means escalate on the FIRST failure, not
"unlimited" (-1 is unlimited) — the inverted comment likely caused the
dev machine's max_planning_retries: 0.
Root cause and measurements: Test/move_base2/docs/PLAN_LIFECYCLE_CANCEL_PAUSE_RESUME.md.
Excluded from this commit (pre-existing, unrelated): config/hybrid_local_planner_params.yaml,
config/priest_local_planner_params.yaml, config/recovery_behaviors_params.yaml (dock/PRIEST
tuning, dated before this work), src/Libraries/common_msgs and src/Libraries/costmap_2d
(submodule pointer bumps from other work), src/Libraries/robot_cpp console throttle changes
and doc/cpp_host_guide.md (separate, unrelated task).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- two_points_planner.cpp: nhánh suy biến (start == goal, ca quay tại chỗ)
đọc `theta` chưa khởi tạo trước khi dùng trong cos()/sin(). Khởi tạo bằng
yaw hiện tại của start; comment nêu rõ vì sao chặng rotate chạm nhánh này.
- tf_help.cpp: `canTransform()` nhận `std::string *error_msg` chưa khởi
tạo — tf3 ghi qua con trỏ đó khi transform thất bại, tức ghi vào vùng nhớ
bất kỳ. Đổi sang std::string thật + log tên hai frame khi thất bại.
- tf_help.cpp: `transformPose()` gọi transform() rồi `return true` vô điều
kiện ở cả nhánh chính lẫn nhánh ExtrapolationException — lookup hỏng để
lại out_pose mặc định (yaw 0, trông như hướng thật) mà vẫn báo thành
công. Trả thẳng kết quả của transform().
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Five add* functions each named the same argument differently - map_name,
laser_scan_name, point_cloud_name, point_cloud2_name, odometry_name - while
addDepthCameraData already called it topic. The get* and remove* families
disagreed in the same way, though they take the same key.
It is not a label. It has to match the topic a costmap layer names in
observation_sources, and the entry in sensor_store_params.yaml. A key matching
nothing is accepted in silence and read by nobody, which surfaces as an empty
costmap with no error anywhere - so the parameter name is the first place to
say what the string is for.
Fourteen declarations now say topic. A parameter name has no effect at a call
site, so this touches no host: no ABI change, nothing to rebuild in lockstep.
addDepthCameraData is the one add* taking a const pointer rather than a value,
and the header now says why, because the next reader will otherwise see an
inconsistency and even it up. Every other sensor is reduced by the host before
it arrives - a laser scan is 5.5 KB, a depth cloud is voxel-filtered from
3.26 MB to 24 KB - and copying all four together costs about 25 microseconds
per second of runtime, measured against a running simulation. A depth image
arrives whole at 398 KB because the voxel layer needs the full frame for its
clearing frustum, and copying that costs roughly 250 times the other four
combined. That is what earns a pointer, and a 5 KB scan does not.
hybrid_local_planner_params.yaml gains 120 keys and drops 12, including a whole
HybridDockingLocalPlanner block that was not here at all. The additions are the
two-tier velocity limits the planner has been reading for a while - acc_lim_*
bounding the DWA sampling window, output_acc_lim_*/output_decel_lim_* clamping
the command on its way out - plus min_velocity, min_yawrate and the blend
distances. The removed keys are the old rejoin_* group, which no longer exists
in the planner.
A config tree that names keys the planner does not read, and omits keys it
does, fails silently: the plugin falls back to its C++ defaults and nobody is
told. That is the "works on my machine, not on the robot" shape.
The comments are rewritten around what the two tiers actually decide, because
the split is not obvious from the key names: DWA owns forward velocity and is
the only tier that can command a turn in place, while Pure Pursuit only steers,
through omega = |v| * pp_weight_omega * sin(err) / lookahead - a law that
degenerates at v = 0, which is why steering authority returns to DWA below
pp_min_steering_velocity.
mppi_local_planner_params.yaml is real tuning: goal tolerances tightened from
0.10/0.10 to 0.03/0.02, the control weights zeroed, goal_capture_radius and
goal_overshoot_margin added, and the stale LocalPlannerAdapter block dropped.
move_base_common_params.yaml is a typo in a comment - #ybridLocalPlanner. The
active value is untouched.
All three parse; the key sets were compared with a YAML load rather than by eye.
costmap_2d d60e1e8 -> af66991 (bỏ hẳn PCL, gói không dùng)
data_convert f23037b -> 6708cdf (thu hẹp còn COMPONENTS common)
Cả hai nhằm cắt chuỗi PCL -> VTK -> VTK::mpi -> MPI::MPI_C, thứ làm
`cmake ..` gãy ở generate step trên robot aarch64 có VTK 9.1 build kèm MPI.
Root project khai LANGUAGES CXX nên find_package(MPI COMPONENTS C) không bao
giờ thành công.
Con trỏ submodule dock_planner: a301987 -> 1f04a95 (mô hình động học
differential/ackermann + maneuver straight-pivot-straight).
config/dock_global_params.yaml thêm ba khoá mới khớp với loader:
- kinematics/model: ackermann | differential
- kinematics/minimum_turning_radius: chỉ dùng khi model=differential
- maneuver/pivot_fallback_extension, maneuver/pivot_safety_margin
Giá trị mặc định giữ nguyên hành vi cũ: model=ackermann,
pivot_fallback_extension=0.0 (tắt maneuver mới). Comment đầu file mô tả lại
ba kiểu đường và thứ tự planner thử dựng.
Đồng bộ schema từ cây move_base2/config/runtime: performance_metrics_enabled,
performance_metrics_period, debug_level, snapshot_for_readers — bản này là
default trung tính nên toàn bộ để tắt/0/false; cây đang chạy khi test là
move_base2/config/runtime (ở đó metrics+snapshot bật).
Bump submodule costmap_2d 3196a19 -> 84c8378: debug metrics updateMap +
snapshot API cho reader (chi tiết ở log submodule).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Đồng bộ schema với priest_local_planner 50375f2 — guard đổi bên theo tính
thực thi + giảm tốc theo đầu quỹ đạo. Giữ tắt tới khi thử trên robot.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Đồng bộ schema với priest_local_planner 8405e29 — co ellipse vật cản theo
thời gian horizon, trị vòng rộng đầu mission. Giữ tắt tới khi thử trên robot.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Chỉ thêm khoá mới (debug_level 0, collision_check_enabled false) — không đổi
giá trị tuning nào; đồng bộ tập khoá với cây move_base2/config/runtime.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
dock_global_params bỏ maneuver/straight_lateral_tolerance,
maneuver/straight_yaw_tolerance và terminal/direction: DockPlannerConfig::load
không đọc khoá nào trong số đó, riêng terminal/direction còn gợi ý sai rằng chiều
đoạn cuối cấu hình được trong khi nó được suy ra từ phía robot đứng. Bổ sung
direct_entry_min_curve_room và straight_length. Không đổi giá trị nào khác.
custom_global_params documents the CustomPlanner namespace and drops the stale
SBPL keys; dock_global_params moves to the straight-terminal DockPlanner schema
and keeps its 1.0 m terminal padding.
The standalone CMake build is the robot deployment path and must not produce
test executables; a catkin workspace is a development machine and keeps them.
Force with -D<option>=ON to build the tests from a standalone build.