Declare the new dock_planner and custom_planner parameters

The bumped planners read a config schema this tree did not have yet. Every new
key is optional and falls back to a built-in default, so nothing was failing to
load - but the values were invisible here and could not be tuned.

dock_global_params.yaml
  Add approach/* and sampling/*. Drop MyGlobalPlanner and global_costmap:
  nothing in dock_planner ever read them.

custom_global_params.yaml
  Add the eleven keys CustomPlannerConfig reads. Drop the twelve SBPL-era keys
  (environment_type, planner_type, allocated_time, ...); grep over this tree
  finds no reader for any of them, and the real SBPL parameters live in
  sbpl_global_params.yaml.

maker_sources.yaml
  Add dock_anchor per marker. footprint_dock is deliberately left commented
  out: this file drives the real robot, and declaring a dock size nobody has
  measured moves the stopping point by half that length. Absent means the dock
  contributes 0 m, which is exactly what this robot does today. dock_anchor
  center-without-footprint and face are both 0 m contributions, so behaviour is
  unchanged either way.

Kept as-is because they are field settings, not missing schema: the allow-list
still carries undock_station / dock_station_2 / undock_station_2,
local_planner stays StanleyLocalPlanner, and every marker stays on DockPlanner.
action_handlers, compound_actions and recovery_behaviors are untouched - their
differences are this robot's tuning, not stale schema.

Verified: all three files parse, the merged parameter tree resolves each new
key, and no new root-key collision is introduced.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-12 22:23:20 +07:00
parent 4f5b94a58f
commit e75f164d02
3 changed files with 125 additions and 26 deletions

View File

@@ -22,19 +22,56 @@ maker_sources: trolley charger dock_station undock_station dock_station_2 undock
# Marker có entry ở đây dùng CẶP PLANNER RIÊNG. Marker rỗng, hoặc chỉ có trong `maker_sources` mà
# không nằm trong bảng này, sẽ dùng cặp `docking` mặc định của move_base_common_params.yaml.
#
# ► Chỉnh: chỉ khai marker nào THỰC SỰ cần planner khác mặc định — ba entry dưới đây đang trùng y
# hệt cặp mặc định, tức chúng không đổi hành vi gì, giữ lại chỉ để làm chỗ móc khi cần tách sau
# này. Tham số của planner nằm ở YAML riêng của plugin (dock_global_params.yaml,
# hybrid_local_planner_params.yaml), KHÔNG khai ở đây.
# ► Chỉnh: chỉ khai marker nào THỰC SỰ cần planner khác mặc định. Tham số của planner nằm ở YAML
# riêng của plugin (dock_global_params.yaml, stanley_local_planner_params.yaml), KHÔNG khai ở đây —
# trừ `dock_anchor` và `footprint_dock` dưới đây.
#
# ── dock_anchor ───────────────────────────────────────────────────────────────────────────────────
#
# Goal pose của marker nằm ở đâu trên đối tượng dock:
# center — goal ở tâm footprint dock; DockPlanner cộng thêm extent từ tâm tới mặt tiếp cận
# (lấy từ footprint_dock). Mặc định khi không khai — giữ nguyên hành vi cũ.
# face — goal đã nằm ngay tâm MẶT tiếp cận; dock không đóng góp vào khoảng dừng,
# footprint_dock bị bỏ qua hoàn toàn (DockPlanner log info nếu vẫn khai).
#
# ── footprint_dock ────────────────────────────────────────────────────────────────────────────────
#
# Đa giác của ĐỐI TƯỢNG DOCK (kệ / trạm sạc), [m], trong frame của goal pose. KHÔNG phải footprint
# robot: footprint robot khai ở costmap và dùng cho collision check, còn khoá này vào khoảng dừng
# của DockCalc — điểm robot bắt đầu đoạn căn thẳng trước dock:
#
# alignment_distance = <extent mép robot dẫn đầu> + <extent tâm dock → mặt gần> + padding
#
# Chỉ dùng khi `dock_anchor: center`. Khai thiếu = dock bị coi là một điểm, robot tiến sát hơn dự
# tính đúng extent tới mặt gần.
#
# ⚠ CHƯA KHAI TRÊN ROBOT NÀY — cố ý. Không khai = giữ đúng hành vi đang chạy ngoài hiện trường;
# khai một con số chưa đo là dịch điểm dừng của robot đi đúng nửa chiều dài số đó.
# ► Chỉnh: đo kích thước THẬT của từng loại kệ/trạm rồi mở comment. Trục x là hướng robot tiến
# vào. Chúng khác nhau theo loại — để trùng số là mất tác dụng của việc khai theo marker.
#
# Hai khoá trên là các khoá DUY NHẤT trong bảng này được rót xuống plugin:
# `PlannerRunner::bindDockingMarker()` chép chúng sang namespace của `global_planner` khai ngay bên
# trên, TRƯỚC khi instance được dựng, rồi dựng lại instance khi marker đổi.
#
# ⚠ Chỉ `DockPlanner` đọc hai khoá này. Marker nào khai global planner khác thì giá trị vẫn được
# chép sang namespace đó nhưng không ai đọc — không lỗi, không log, chỉ là không có tác dụng.
docking_marker_profiles:
trolley:
global_planner: DockPlanner
local_planner: StanleyLocalPlanner
# Goal ở trọng tâm xe trolley (robot chui gầm) → cộng extent tâm→mặt từ footprint_dock.
dock_anchor: center
# footprint_dock: [[x,-y],[x,y],[-x,y],[-x,-y]] # đo rồi mở
charger:
global_planner: DockPlanner
local_planner: StanleyLocalPlanner
# Goal teach ngay tâm mặt trạm sạc → dock không đóng góp khoảng dừng.
dock_anchor: face
dock_station:
global_planner: DockPlanner
local_planner: StanleyLocalPlanner
dock_anchor: center
# footprint_dock: [[x,-y],[x,y],[-x,y],[-x,-y]] # đo rồi mở