feat: per-marker dock_face_offset and pivot margin for dock_anchor mating_edge
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.
This commit is contained in:
@@ -133,7 +133,9 @@ if(BUILD_DOCK_PLANNER_TESTS AND
|
||||
enable_testing()
|
||||
endif()
|
||||
add_executable(${PROJECT_NAME}_test test/dock_planner_test.cpp)
|
||||
target_link_libraries(${PROJECT_NAME}_test PRIVATE ${PROJECT_NAME})
|
||||
# The test builds YAML nodes for the config loader directly; the library links
|
||||
# yaml-cpp PRIVATE and does not pass it on, so the test links it itself.
|
||||
target_link_libraries(${PROJECT_NAME}_test PRIVATE ${PROJECT_NAME} yaml-cpp)
|
||||
if(BUILDING_WITH_CATKIN)
|
||||
add_dependencies(${PROJECT_NAME}_test ${catkin_EXPORTED_TARGETS})
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user