Files
trolley_detection_action/sim/models/trolley_4legs/model.sdf
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

74 lines
3.4 KiB
XML

<?xml version="1.0"?>
<!--
Xe hàng 4 chân ĐƠN GIẢN cho trolley_detection_action trong Gazebo. Sinh bằng
sim/gen_trolley_models.py — sửa số ở script rồi sinh lại, đừng sửa tay file này.
Kích thước chân khớp xe `tci_trolley` của world factory_ss_demo:
cart_depth = 0.720 m (trục X của model) cart_opening = 0.517 m (trục Y)
chân hộp 0.030 x 0.030 m, cao tới mặt dưới sàn xe 0.380 m
KHÁC tci_trolley, cố ý:
- gốc model ĐÚNG TÂM 4 chân, chân chạm sàn ở z = 0 → spawn z = 0, ground truth = pose model;
- KHÔNG có tấm đáy 0.78 x 0.613 x 0.01 m sát sàn mà mesh tci_trolley mang theo (robot đâm vào
nó khi chui gầm);
- mặt dưới sàn xe ở 0.380 m thay vì 0.352 m: không có khe dẫn hướng cho phần gồ 0.3595 m
trên nóc hook_150, nên nâng sàn để chừa 20 mm;
- không bánh xe, tay đẩy, thanh mảnh — chỉ chân + mặt sàn. Lidar (0.184 m) chỉ thấy 4 chân.
Bản này: KHÔNG dải phản quang — dò bằng hình học (`tape_enabled: false`).
-->
<sdf version="1.6">
<model name="trolley_4legs">
<static>true</static>
<link name="frame">
<collision name="entry_left">
<pose>0.3600 0.2585 0.1900 0 0 0</pose>
<laser_retro>0</laser_retro>
<geometry><box><size>0.03 0.03 0.3800</size></box></geometry>
</collision>
<visual name="entry_left_visual">
<pose>0.3600 0.2585 0.1900 0 0 0</pose>
<geometry><box><size>0.03 0.03 0.3800</size></box></geometry>
<material><ambient>0.3 0.3 0.3 1</ambient><diffuse>0.3 0.3 0.3 1</diffuse></material>
</visual>
<collision name="entry_right">
<pose>0.3600 -0.2585 0.1900 0 0 0</pose>
<laser_retro>0</laser_retro>
<geometry><box><size>0.03 0.03 0.3800</size></box></geometry>
</collision>
<visual name="entry_right_visual">
<pose>0.3600 -0.2585 0.1900 0 0 0</pose>
<geometry><box><size>0.03 0.03 0.3800</size></box></geometry>
<material><ambient>0.3 0.3 0.3 1</ambient><diffuse>0.3 0.3 0.3 1</diffuse></material>
</visual>
<collision name="far_left">
<pose>-0.3600 0.2585 0.1900 0 0 0</pose>
<laser_retro>0</laser_retro>
<geometry><box><size>0.03 0.03 0.3800</size></box></geometry>
</collision>
<visual name="far_left_visual">
<pose>-0.3600 0.2585 0.1900 0 0 0</pose>
<geometry><box><size>0.03 0.03 0.3800</size></box></geometry>
<material><ambient>0.3 0.3 0.3 1</ambient><diffuse>0.3 0.3 0.3 1</diffuse></material>
</visual>
<collision name="far_right">
<pose>-0.3600 -0.2585 0.1900 0 0 0</pose>
<laser_retro>0</laser_retro>
<geometry><box><size>0.03 0.03 0.3800</size></box></geometry>
</collision>
<visual name="far_right_visual">
<pose>-0.3600 -0.2585 0.1900 0 0 0</pose>
<geometry><box><size>0.03 0.03 0.3800</size></box></geometry>
<material><ambient>0.3 0.3 0.3 1</ambient><diffuse>0.3 0.3 0.3 1</diffuse></material>
</visual>
<collision name="deck">
<pose>0 0 0.390 0 0 0</pose>
<geometry><box><size>0.780 0.577 0.020</size></box></geometry>
</collision>
<visual name="deck_visual">
<pose>0 0 0.390 0 0 0</pose>
<geometry><box><size>0.780 0.577 0.020</size></box></geometry>
</visual>
</link>
</model>
</sdf>