BUILD_DOCK_PLANNER_TESTS now defaults to OFF in both build modes instead of following
BUILDING_WITH_CATKIN. Enable the tests with -DBUILD_DOCK_PLANNER_TESTS=ON.
The charger goal is the docked base_link pose, and the real charger face lies 0.40 m behind
it (detector offset_x). mating_edge measured the pivot sweep from a face assumed at
mating_extent (0.325 m) behind the goal, and still forced a terminal of at least
rear_extent. So the robot rotated with its centre about 0.725 m from the charger face.
Two optional keys, valid only with dock_anchor: mating_edge (rejected with center or face):
- dock_face_offset [m]: distance from the goal back to the real dock face. Default
mating_extent.
- dock_pivot_safety_margin [m]: overrides maneuver/pivot_safety_margin for this marker.
A YAML null reads as unset, so move_base2 can clear a previous marker's value.
For mating_edge, the terminal floor becomes
max(mating_extent - face_offset, 0) + padding (floored at path_point_spacing), and the pivot
vertex becomes max(straight_distance, circumscribed - face_offset + margin). The costmap
rotation radius uses the same margin. center and face are unchanged.
KIT charger (face offset 0.40, margin 0.10, straight_length 0.2): vertex 0.2 m, robot centre
0.60 m from the charger face. Tests cover the three robot starts, the defaults, validation
and null handling. The test target now links yaml-cpp itself.
The standalone CMake build is the robot deployment path and must not produce a
test executable; a catkin workspace is a development machine and keeps it.
Dropping include(CTest) also stops this package from defining BUILD_TESTING=ON
for the whole tree, which switched every other package's tests back on in the
aggregate standalone build.
Split configuration out of the planner into DockPlannerConfig with explicit
load/validate, so a missing or malformed key fails at initialize() with a
message instead of silently defaulting to zero.
- initialize() now scopes its NodeHandle to the plugin name. The previous
"~/<name>" form never resolved ("~" is not a key in the merged tree) and
fell back to ROOT, so every parameter was read from the wrong place and
cost_threshold silently dropped from 200 to 0.
- Replace robot_nav_2d_utils::footprintFromParams(), whose declaration and
definition disagreed on the argument type. The symbol was never defined,
and because the plugin is dlopen'd lazily the failure only surfaced at the
call site on the robot, long after a clean build.
- Read footprint_dock, the dock object's polygon, with range and NaN checks.
move_base2 copies it in per marker before the instance is built.
- dock_anchor selects whether the marker goal sits at the dock centre or on
its approach face; the face case ignores footprint_dock entirely.
- makePlan() rejects start/goal outside the costmap global frame instead of
planning across mismatched frames.
- Add dock_planner_test covering config validation, footprint parsing and
path generation.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>