refactor & optimal

This commit is contained in:
2026-08-14 14:04:47 +07:00
parent 539fc5da16
commit 2a16606c27
18 changed files with 613 additions and 1664 deletions

View File

@@ -1,4 +1,4 @@
# DockPlanner plugin and approach-curve parameters.
# DockPlanner: forward curve, one direction change, then reverse straight.
#
# Collision/free-space checking is intentionally not configured here yet:
# DockPlanner currently generates geometry only. Do not add cost_threshold,
@@ -7,42 +7,37 @@ DockPlanner:
# Boost.DLL library containing the exported symbol "DockPlanner".
library_path: libdock_planner
approach:
# [m] Extra straight alignment distance beyond half the combined robot/dock
# X extents. Increase if the robot must align earlier before entering a dock.
alignment_distance_padding: 0.0
kinematics:
# Axle frames used to measure wheel_base from TF, matching StanleyControl.
front_axle_frame: "steer_link"
rear_axle_frame: "base_link"
# [m] Lateral-distance range used to interpolate angle_threshold_*.
# Values outside this range are clamped, so behavior remains bounded.
lateral_distance_near: 0.10
lateral_distance_far: 1.00
# [rad] Maximum equivalent bicycle steering angle while driving the
# approach curve. Measure this on the real robot; this is not a servo tick,
# steering-wheel angle, or the special standstill-pivot angle.
max_steering_angle: 0.50
# [rad] Permitted joining angle at the near/far lateral-distance limits.
# Required relation: 0 < far < near < pi.
angle_threshold_near: 2.35619449019 # 0.75*pi
angle_threshold_far: 1.09955742876 # 0.35*pi
maneuver:
# [m] The cusp is placed at least this far forward from the start. This
# guarantees a real forward leg before the reverse terminal segment.
minimum_forward_distance: 0.25
# [rad] Relaxes the forward direction test relative to the reverse test.
# Required: 0 <= value < angle_threshold_far.
direction_angle_hysteresis: 0.05
# [m] Reject a maneuver that has to extend farther than this from the start
# to satisfy the turning-radius and dock-clearance constraints.
maximum_forward_extension: 3.0
# [m] Distance margin used when rejecting a reference-path joining point
# that is already too close to the end of the approach curve.
direction_distance_tolerance: 0.10
terminal:
# [m] Extra reverse-straight distance beyond the robot rear extent and, for
# dock_anchor=center, the dock near-face extent.
reverse_distance_padding: 0.0
sampling:
# [m] Target spacing between generated path poses. The curve is sampled by
# arc-length estimate and always includes both endpoints.
# [m] Maximum target spacing along both the forward arc and reverse line.
path_point_spacing: 0.05
# footprint_dock and dock_anchor are intentionally not declared here. They
# describe the physical dock, not the robot, and move_base2 copies the values
# selected from docking_marker_profiles/<marker>/ into this namespace before
# constructing the planner.
# footprint_dock and dock_anchor are selected per marker by move_base2 and
# copied into this namespace before the plugin is constructed.
#
# dock_anchor: 'center' (default) — goal is the dock footprint center; the
# near-face extent of footprint_dock is added to the approach distance.
# 'face' — goal already sits on the approach face; footprint_dock is
# ignored entirely.
# With anchor 'center' and footprint_dock absent, dock size contributes 0 m
# 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.