feat: copy terminal_direction down to the docking global planner

Third per-marker key alongside footprint_dock and dock_anchor, so a marker can
override which direction the final straight leg into the dock is driven.
This commit is contained in:
2026-08-15 13:09:09 +07:00
parent fd0249d3d0
commit 85e40cbef2
4 changed files with 11 additions and 3 deletions

View File

@@ -224,6 +224,7 @@ docking_marker_profiles:
global_planner: TestPlannerOk
local_planner: TestControllerOk
footprint_dock: [[0.5, -0.4], [0.5, 0.4], [-0.5, 0.4], [-0.5, -0.4]] # [m]
terminal_direction: forward
dock_b:
global_planner: TestPlannerOk

View File

@@ -466,6 +466,9 @@ TEST(PlannerRunnerDockingMarker, CopiesTheMarkerFootprintIntoThePlannerNamespace
ASSERT_EQ(copied.size(), 4U);
EXPECT_DOUBLE_EQ(copied[0][0].as<double>(), 0.5);
EXPECT_DOUBLE_EQ(copied[0][1].as<double>(), -0.4);
std::string terminal_direction;
ASSERT_TRUE(nh.getParam("TestPlannerOk/terminal_direction", terminal_direction));
EXPECT_EQ(terminal_direction, "forward");
}
TEST(PlannerRunnerDockingMarker, TargetsWhateverPlannerTheProfileNamesNotJustDockPlanner)