Declare footprint_dock for every docking marker

The key was documented here but left commented out. DockPlanner reads it as
the dock object's polygon and turns its centre-to-face extent into the point
where the robot starts its straight alignment run.

trolley and dock_station use dock_anchor: center, so the value takes effect
there: the approach now starts 0.583 m further out than with the key absent.
charger and pallet use dock_anchor: face, where DockPlanner ignores the key
entirely - the values are recorded so switching either marker to center does
not need a second measuring pass.

The numbers for trolley, charger and dock_station are the T800 robot footprint
copied across, not a measured dock. Only pallet carries its own dimensions.
Measuring each dock type along the approach axis is still open, and the header
comment says so at the point where someone would edit it.
This commit is contained in:
2026-08-13 15:22:21 +07:00
parent 4a832a1b70
commit a5ad4268a2

View File

@@ -45,10 +45,14 @@ maker_sources: trolley charger dock_station pallet
# 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.
# ⚠ Với `dock_anchor: face` khoá này bị BỎ QUA hoàn toàn — khai vào không đổi hành vi gì, giữ lại
# chỉ để khi đổi marker sang `center` thì số đã có sẵn.
#
# ⚠ CHƯA ĐO THẬT. Số đang khai cho `trolley` và `dock_station` là footprint ROBOT T800 chép sang
# (khớp `amr_control.launch`, `robot_type == 'T800'`), không phải kích thước kệ/trạm. Hai marker
# đó dùng `center` nên số này CÓ tác dụng: điểm dừng dịch đi đúng extent tâm→mặt, tức 0.583 m.
# ► Chỉnh: đo chiều dài THẬT theo trục x (hướng robot tiến vào) của từng loại kệ/trạm rồi thay.
# Để trùng số giữa các marker 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
@@ -62,21 +66,23 @@ docking_marker_profiles:
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ở
footprint_dock: [[0.583,-0.48],[0.583,0.48],[-0.583,0.48],[-0.583,-0.48]]
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
footprint_dock: [[0.583,-0.48],[0.583,0.48],[-0.583,0.48],[-0.583,-0.48]]
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ở
footprint_dock: [[0.583,-0.48],[0.583,0.48],[-0.583,0.48],[-0.583,-0.48]]
pallet:
global_planner: DockPlanner
local_planner: StanleyLocalPlanner
dock_anchor: face
footprint_dock: [[0.9,-0.8],[0.9,0.8],[-0.9,0.8],[-0.9,-0.8]]