feat: per-marker dock_straight_length override for the terminal straight leg

terminal/straight_length is one global value, so every docking marker gets
the same straight run into the dock. A marker profile can now set
dock_straight_length (move_base2 copies it into the DockPlanner namespace
and writes YAML null when the next marker lacks it). The terminal leg is
max(cusp floor, dock_straight_length or terminal/straight_length).

- Valid for every dock_anchor (center, face, mating_edge), unlike
  dock_face_offset and dock_pivot_safety_margin; finite and in [0, 2.0] m.
- The init summary and the plan log print the effective length and whether
  it came from the marker or the default.
- Test: missing and null keep the default, 0.30 lengthens the terminal leg,
  all three anchors load, out-of-range and NaN values are rejected.
This commit is contained in:
2026-11-12 15:44:02 +07:00
parent 07e2fd3b38
commit c94c5b2b0c
7 changed files with 118 additions and 6 deletions

View File

@@ -159,6 +159,7 @@ DockPlanner:
# khi vào dock, ĐỔI LẠI ăn vào chỗ dành cho cung, nên đặt lớn quá sẽ đẩy plan
# sang kiểu có cusp hoặc kiểu xoay tại chỗ.
# Với mating_edge + dock_face_offset, terminal floor không còn là rear_extent nên straight_length (ví dụ 0.2 m) quyết định độ dài terminal.
# Marker có thể ghi đè bằng dock_straight_length trong maker_sources.yaml.
straight_length: 0.0
sampling: