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
This commit is contained in:
14
sim/models/trolley_4legs/model.config
Normal file
14
sim/models/trolley_4legs/model.config
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0"?>
|
||||
<model>
|
||||
<name>trolley_4legs</name>
|
||||
<version>1.1</version>
|
||||
<sdf version="1.6">model.sdf</sdf>
|
||||
<author>
|
||||
<name>DuongTD</name>
|
||||
<email>tdd@gmail.com</email>
|
||||
</author>
|
||||
<description>
|
||||
Xe hàng 4 chân 0.720 x 0.517 m, chân hộp 30 mm, sàn xe cao 0.380 m, không dải phản quang. Gốc model ở
|
||||
tâm 4 chân. Dùng chạy thử trolley_detection_action + chui gầm trong Gazebo.
|
||||
</description>
|
||||
</model>
|
||||
73
sim/models/trolley_4legs/model.sdf
Normal file
73
sim/models/trolley_4legs/model.sdf
Normal file
@@ -0,0 +1,73 @@
|
||||
<?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>
|
||||
Reference in New Issue
Block a user