Drop terminal_direction from the docking planner allow-list

Nothing reads the key. DockPlanner's config takes dock_anchor, the footprint
and the drive model; terminal_direction was copied down into the planner
namespace and sat there.

The direction of the final straight leg is derived instead: dock_calc tries
nose-first and reverse and keeps whichever needs the smaller pivot, so the side
the robot stands on carries the intent. The layer above has already offset the
goal so base_link ends up on it, which means a marker key forcing the other
direction would contradict the goal position it was handed. Docking in reverse
is a different goal, not a different flag.

Leaving it in the allow-list makes the planner namespace advertise a live key
that does nothing, and a config that lies is worse than one that lacks the key.

The fixture test now asserts the allow-list stays closed instead: the marker
profile also carries global_planner and local_planner, and copying the whole
block down would put meaningless keys into the planner namespace where they can
shadow real ones.
This commit is contained in:
2026-08-27 13:22:07 +07:00
parent d0c8a0bcdc
commit 4cdbc11470
2 changed files with 10 additions and 5 deletions

View File

@@ -44,9 +44,13 @@ bool isFinitePose(const robot_geometry_msgs::PoseStamped& pose)
///
/// `dock_anchor` khai goal pose của marker nằm ở tâm footprint dock (`center`) hay ngay trên mặt
/// tiếp cận (`face`). `face` thì DockPlanner bỏ qua `footprint_dock` hoàn toàn.
/// `terminal_direction` chọn chiều chuyển động trên đoạn thẳng cuối: forward/reverse/auto.
///
/// KHÔNG có `terminal_direction` ở đây, và cố ý như vậy: chiều chạy của đoạn thẳng cuối được SUY RA
/// từ phía robot đứng so với goal (`dock_calc.cpp`), vì tầng trên đã offset goal sao cho base_link
/// dừng đúng tại đó khi manơ hoàn tất. Một khoá cho phép marker ép chiều khác sẽ mâu thuẫn với
/// chính vị trí goal, nên khoá đó đã được gỡ thay vì hiện thực.
constexpr const char* kMarkerPlannerParams[] = {
"footprint_dock", "dock_anchor", "terminal_direction"
"footprint_dock", "dock_anchor"
};
/**