config: add the dock planner direct-entry and straight-terminal keys

direct_entry_min_curve_room enables the no-cusp entry when there is room for the
arc; straight_length sets the length of the straight terminal leg. Also raises
max_steering_angle to the value measured on the robot.
This commit is contained in:
2026-08-15 13:09:09 +07:00
parent 85e40cbef2
commit 26c2293e0e

View File

@@ -1,4 +1,14 @@
# DockPlanner plugin and approach-curve parameters. # DockPlanner: one curved lead-in away from the dock, one direction change, then
# a straight terminal leg along the goal yaw.
#
# Which robot edge mates with the dock is DERIVED per plan from the side the
# robot stands on, not configured:
# robot on the +X side of the goal -> lead-in forward, terminal REVERSE
# (rear edge docks: forks into a pallet)
# robot on the -X side of the goal -> lead-in reverse, terminal FORWARD
# (front edge docks: charging contact)
# This works because the goal pose is already offset upstream so that base_link
# lands exactly on it for the intended maneuver.
# #
# Collision/free-space checking is intentionally not configured here yet: # Collision/free-space checking is intentionally not configured here yet:
# DockPlanner currently generates geometry only. Do not add cost_threshold, # DockPlanner currently generates geometry only. Do not add cost_threshold,
@@ -7,36 +17,54 @@ DockPlanner:
# Boost.DLL library containing the exported symbol "DockPlanner". # Boost.DLL library containing the exported symbol "DockPlanner".
library_path: libdock_planner library_path: libdock_planner
approach: kinematics:
# [m] Extra straight alignment distance beyond half the combined robot/dock # Axle frames used to measure wheel_base from TF, matching StanleyControl.
# X extents. Increase if the robot must align earlier before entering a dock. front_axle_frame: "steer_link"
alignment_distance_padding: 0.0 rear_axle_frame: "base_link"
# [m] Lateral-distance range used to interpolate angle_threshold_*. # [rad] Maximum equivalent bicycle steering angle while driving the
# Values outside this range are clamped, so behavior remains bounded. # approach curve. Measure this on the real robot; this is not a servo tick,
lateral_distance_near: 0.10 # steering-wheel angle, or the special standstill-pivot angle.
lateral_distance_far: 1.00 max_steering_angle: 0.80
# [rad] Permitted joining angle at the near/far lateral-distance limits. maneuver:
# Required relation: 0 < far < near < pi. # [m] The cusp is placed at least this far from the start, measured away
angle_threshold_near: 2.35619449019 # 0.75*pi # from the dock. This guarantees a real lead-in leg before the terminal.
angle_threshold_far: 1.09955742876 # 0.35*pi minimum_forward_distance: 0.25
# [rad] Relaxes the forward direction test relative to the reverse test. # [m] Reject a maneuver whose cusp has to sit farther than this from the
# Required: 0 <= value < angle_threshold_far. # start to satisfy the turning-radius and dock-clearance constraints.
direction_angle_hysteresis: 0.05 maximum_forward_extension: 3.0
# [m] Distance margin used when rejecting a reference-path joining point # [m] Plan a NO-CUSP entry (one arc onto the dock axis, then the straight
# that is already too close to the end of the approach curve. # terminal in the same travel direction) when the room left for the arc --
direction_distance_tolerance: 0.10 # the start distance along the approach axis minus the straight terminal
# length -- exceeds this. The arc radius is still checked against the
# Ackermann limit; the single-cusp maneuver is planned whenever either test
# fails, so this only ever removes a direction change, never adds one.
# 0 disables it and always plans a cusp.
direct_entry_min_curve_room: 0.5
terminal:
# [m] Extra straight-terminal distance beyond the mating robot extent
# (rear_extent when the terminal reverses, front_extent when it drives
# forward) and, for dock_anchor=center, the dock near-face extent.
reverse_distance_padding: 0.0
# [m] Requested length of the straight terminal leg. The effective length is
# max(this, mating extent + dock near extent + padding), so 0 keeps the
# clearance-only behaviour. Raising it gives the robot a longer straight run
# to settle its heading before it enters the dock, but it eats into the room
# left for the entry arc, so a large value pushes the plan back to a cusp.
straight_length: 0.0
sampling: sampling:
# [m] Target spacing between generated path poses. The curve is sampled by # [m] Maximum target spacing along both the forward arc and reverse line.
# arc-length estimate and always includes both endpoints.
path_point_spacing: 0.05 path_point_spacing: 0.05
# footprint_dock is intentionally not declared here. It describes the # footprint_dock and dock_anchor are selected per marker by move_base2 and
# physical dock, not the robot, and move_base2 copies the value selected from # copied into this namespace before the plugin is constructed.
# docking_marker_profiles/<marker>/footprint_dock into this namespace before #
# constructing the planner. If absent, dock size contributes 0 m to approach # dock_anchor: 'center' (default) — goal is the dock footprint center; the
# geometry and DockPlanner emits a warning. # near-face extent of footprint_dock contributes to cusp clearance.
# 'face' — goal already sits on the approach face; footprint_dock is ignored.