Files
trolley_detection_action/test/config/action_handlers_params.yaml
duongtd bfdcac512f feat: add the 4-leg trolley detection action
TrolleyDetectionActionHandler finds a 4-leg trolley in a raw LaserScan with
dock_pattern_detector's LegPatternMatcher, filters the detections and writes a
static dock_target frame for the docking leg that drives under the trolley.

- entry_direction forward/backward sets the goal heading; a lidar that faces
  the wrong way fails the action instead of writing a reversed goal
- an upside-down lidar (roll pi in TF) is detected from TF and its bearings
  are mirrored; a scan plane tilted more than 5 deg fails the action
- profiles validated at boot; optional prior, reflective tape (all/entry)
- gtest (11 tests) incl. a recorded Gazebo scan from a roll-pi lidar
- sim models trolley_4legs (+ taped variants) the robot can drive under,
  spawn launch and generator script
- doc/MEASURE_AND_CONFIGURE.md: how to measure a trolley and fill the profile
2026-10-28 13:33:52 +07:00

94 lines
2.9 KiB
YAML

# Config CHỈ cho trolley_detection_action_test — không phải config chạy robot.
# Ba instance cùng plugin: tiến (lidar trước), lùi (lidar sau), và một instance khai SAI hướng để
# kiểm đường từ chối.
actions_trolley:
handlers:
- {name: detect_trolley, type: TrolleyDetectionActionHandler}
- {name: detect_trolley_back, type: TrolleyDetectionActionHandler}
- {name: detect_trolley_wrong, type: TrolleyDetectionActionHandler}
detect_trolley:
action_types: [DetectTrolley]
output_frame: dock_target
scan_topic: /f_scan
entry_direction: forward
prior_frame: base_link
settle_delay: 0.0 # [s] test tự điều khiển đồng hồ
timeout: 5.0 # [s]
default_profile: tci_trolley
min_range: 0.10 # [m]
max_range: 3.0 # [m]
range_sigma: 0.01 # [m]
sample_window: 1.0 # [s]
min_samples: 3
max_spread_xy: 0.05 # [m]
max_spread_yaw: 0.10 # [rad]
debug:
detect: true
profiles:
tci_trolley:
cart_opening: 0.517 # [m]
cart_depth: 0.720 # [m]
leg_shape: box
leg_width: 0.030 # [m]
min_legs: 3
tci_trolley_prior:
cart_opening: 0.517
cart_depth: 0.720
leg_shape: box
leg_width: 0.030
min_legs: 3
has_prior: true
# [m] Tâm xe trong base_link = 0.454 (lidar) + 1.26. Trong frame lidar xe ở 1.26, lệch
# 0.454 > search_radius: test chỉ qua khi prior được tính trong base_link.
prior_x: 1.714
prior_y: 0.0
prior_yaw: 3.14159
prior_yaw_tolerance: 0.35
search_radius: 0.30
detect_trolley_back:
action_types: [DetectTrolleyBackward]
output_frame: dock_target
scan_topic: /b_scan
entry_direction: backward
prior_frame: base_link
settle_delay: 0.0
timeout: 5.0
default_profile: tci_trolley
sample_window: 1.0
min_samples: 3
max_spread_xy: 0.05
max_spread_yaw: 0.10
profiles:
tci_trolley:
cart_opening: 0.517
cart_depth: 0.720
leg_shape: box
leg_width: 0.030
# Khai `forward` nhưng đọc lidar SAU: phải fail ngay ở scan đầu, không được ghi goal ngược.
detect_trolley_wrong:
action_types: [DetectTrolleyWrong]
output_frame: dock_target
scan_topic: /b_scan
entry_direction: forward
prior_frame: base_link
settle_delay: 0.0
timeout: 5.0
default_profile: tci_trolley
sample_window: 1.0
min_samples: 3
max_spread_xy: 0.05
max_spread_yaw: 0.10
profiles:
tci_trolley:
cart_opening: 0.517
cart_depth: 0.720
leg_shape: box
leg_width: 0.030
# Bảng symbol -> thư viện cho Boost.DLL.
TrolleyDetectionActionHandler:
library_path: libtrolley_detection_action_handler