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:
116
sim/gen_trolley_models.py
Normal file
116
sim/gen_trolley_models.py
Normal file
@@ -0,0 +1,116 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Generate the simple 4-leg trolley SDF models in sim/models.
|
||||
|
||||
Run from anywhere: python3 sim/gen_trolley_models.py sim/models
|
||||
Edit the numbers here and regenerate; do not hand-edit the .sdf files.
|
||||
"""
|
||||
import os
|
||||
import sys
|
||||
|
||||
OUT = sys.argv[1]
|
||||
DEPTH, OPENING, LEG = 0.720, 0.517, 0.030 # [m] leg centres and leg section, same as tci_trolley
|
||||
# [m] Underside of the deck. The real tci_trolley sits at 0.352 m and relies on a guide slot for the
|
||||
# 0.3595 m hump of hook_150; these models have no slot, so the deck is raised to leave 20 mm.
|
||||
DECK_Z = 0.380
|
||||
DECK_T = 0.020 # [m] deck thickness
|
||||
BAND = (0.14, 0.24) # [m] reflective band around the lidar plane (0.184)
|
||||
CORNERS = [("entry_left", DEPTH / 2, OPENING / 2), ("entry_right", DEPTH / 2, -OPENING / 2),
|
||||
("far_left", -DEPTH / 2, OPENING / 2), ("far_right", -DEPTH / 2, -OPENING / 2)]
|
||||
|
||||
|
||||
def box(name, x, y, z0, z1, retro):
|
||||
h = z1 - z0
|
||||
colour = '0.9 0.9 0.2 1' if retro else '0.3 0.3 0.3 1'
|
||||
return f""" <collision name="{name}">
|
||||
<pose>{x:.4f} {y:.4f} {z0 + h / 2:.4f} 0 0 0</pose>
|
||||
<laser_retro>{retro}</laser_retro>
|
||||
<geometry><box><size>{LEG} {LEG} {h:.4f}</size></box></geometry>
|
||||
</collision>
|
||||
<visual name="{name}_visual">
|
||||
<pose>{x:.4f} {y:.4f} {z0 + h / 2:.4f} 0 0 0</pose>
|
||||
<geometry><box><size>{LEG} {LEG} {h:.4f}</size></box></geometry>
|
||||
<material><ambient>{colour}</ambient><diffuse>{colour}</diffuse></material>
|
||||
</visual>
|
||||
"""
|
||||
|
||||
|
||||
HEADER = """<?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 = {depth:.3f} m (trục X của model) cart_opening = {opening:.3f} m (trục Y)
|
||||
chân hộp {leg:.3f} x {leg:.3f} m, cao tới mặt dưới sàn xe {deck:.3f} 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 ở {deck:.3f} 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.
|
||||
{which}
|
||||
-->
|
||||
<sdf version="1.6">
|
||||
<model name="{name}">
|
||||
<static>true</static>
|
||||
<link name="frame">
|
||||
"""
|
||||
|
||||
FOOTER = f""" <collision name="deck">
|
||||
<pose>0 0 {DECK_Z + DECK_T / 2:.3f} 0 0 0</pose>
|
||||
<geometry><box><size>{DEPTH + LEG + 0.03:.3f} {OPENING + LEG + 0.03:.3f} {DECK_T:.3f}</size></box></geometry>
|
||||
</collision>
|
||||
<visual name="deck_visual">
|
||||
<pose>0 0 {DECK_Z + DECK_T / 2:.3f} 0 0 0</pose>
|
||||
<geometry><box><size>{DEPTH + LEG + 0.03:.3f} {OPENING + LEG + 0.03:.3f} {DECK_T:.3f}</size></box></geometry>
|
||||
</visual>
|
||||
</link>
|
||||
</model>
|
||||
</sdf>
|
||||
"""
|
||||
|
||||
|
||||
def model(name, taped, which, summary):
|
||||
text = HEADER.format(depth=DEPTH, opening=OPENING, leg=LEG, deck=DECK_Z, which=which, name=name)
|
||||
for leg, x, y in CORNERS:
|
||||
if leg in taped:
|
||||
text += box(f"{leg}_low", x, y, 0.0, BAND[0], 0)
|
||||
text += box(f"{leg}_band", x, y, BAND[0], BAND[1], 2000)
|
||||
text += box(f"{leg}_high", x, y, BAND[1], DECK_Z, 0)
|
||||
else:
|
||||
text += box(leg, x, y, 0.0, DECK_Z, 0)
|
||||
text += FOOTER
|
||||
d = os.path.join(OUT, name)
|
||||
os.makedirs(d, exist_ok=True)
|
||||
with open(os.path.join(d, "model.sdf"), "w") as f:
|
||||
f.write(text)
|
||||
with open(os.path.join(d, "model.config"), "w") as f:
|
||||
f.write(f"""<?xml version="1.0"?>
|
||||
<model>
|
||||
<name>{name}</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 {DECK_Z:.3f} m, {summary}. Gốc model ở
|
||||
tâm 4 chân. Dùng chạy thử trolley_detection_action + chui gầm trong Gazebo.
|
||||
</description>
|
||||
</model>
|
||||
""")
|
||||
|
||||
|
||||
model("trolley_4legs", set(),
|
||||
"Bản này: KHÔNG dải phản quang — dò bằng hình học (`tape_enabled: false`).",
|
||||
"không dải phản quang")
|
||||
model("trolley_4legs_tape_all", {"entry_left", "entry_right", "far_left", "far_right"},
|
||||
"Bản này: dải trên CẢ 4 chân (`tape_legs: all`), collision 0.14–0.24 m khai laser_retro 2000.",
|
||||
"dải phản quang cả 4 chân")
|
||||
model("trolley_4legs_tape_entry", {"entry_left", "entry_right"},
|
||||
"Bản này: dải chỉ trên 2 chân ở đầu +X (`tape_legs: entry`) — đầu +X là cạnh vào.",
|
||||
"dải phản quang 2 chân đầu +X")
|
||||
print("ok")
|
||||
33
sim/launch/spawn_trolley.launch
Normal file
33
sim/launch/spawn_trolley.launch
Normal file
@@ -0,0 +1,33 @@
|
||||
<!--
|
||||
Dựng một xe hàng 4 chân ĐƠN GIẢN vào world Gazebo đang chạy (model trong sim/models, sinh bằng
|
||||
sim/gen_trolley_models.py).
|
||||
|
||||
Chạy SAU khi world đã lên:
|
||||
roslaunch trolley_detection_action spawn_trolley.launch x:=7.009 y:=34.5275 yaw:=0.0
|
||||
|
||||
`model`:
|
||||
trolley_4legs (mặc định) không dải phản quang — dò bằng hình học;
|
||||
trolley_4legs_tape_entry dải ở 2 chân đầu +X của model (= cạnh vào);
|
||||
trolley_4legs_tape_all dải cả 4 chân.
|
||||
Gốc model ở TÂM 4 chân và chân chạm sàn ở z = 0, nên ground truth chính là pose spawn (x, y, yaw).
|
||||
|
||||
Robot chui gầm được: sàn xe cao 0.380 m (nóc hook_150 0.3595 m), không có tấm đáy. Model
|
||||
`tci_trolley` của factory_ss_demo thì KHÔNG chui được trong Gazebo: mesh của nó có tấm đáy
|
||||
0.78 x 0.613 x 0.01 m sát sàn và mặt dưới sàn xe 0.352 m (ngoài đời là khe dẫn hướng).
|
||||
|
||||
⚠ Gazebo TỪ CHỐI spawn đè lên model cùng tên ("entity already exists"). Xoá trước, ví dụ:
|
||||
rosservice call /gazebo/delete_model "model_name: 'trolley'"
|
||||
-->
|
||||
<launch>
|
||||
<arg name="model" default="trolley_4legs" />
|
||||
<arg name="name" default="trolley" />
|
||||
<arg name="x" default="3.0" />
|
||||
<arg name="y" default="0.0" />
|
||||
<arg name="z" default="0.0" />
|
||||
<arg name="yaw" default="3.14159" />
|
||||
|
||||
<node name="spawn_$(arg name)" pkg="gazebo_ros" type="spawn_model" output="screen"
|
||||
args="-sdf -file $(find trolley_detection_action)/sim/models/$(arg model)/model.sdf
|
||||
-model $(arg name)
|
||||
-x $(arg x) -y $(arg y) -z $(arg z) -Y $(arg yaw)" />
|
||||
</launch>
|
||||
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>
|
||||
14
sim/models/trolley_4legs_tape_all/model.config
Normal file
14
sim/models/trolley_4legs_tape_all/model.config
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0"?>
|
||||
<model>
|
||||
<name>trolley_4legs_tape_all</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, dải phản quang cả 4 chân. Gốc model ở
|
||||
tâm 4 chân. Dùng chạy thử trolley_detection_action + chui gầm trong Gazebo.
|
||||
</description>
|
||||
</model>
|
||||
153
sim/models/trolley_4legs_tape_all/model.sdf
Normal file
153
sim/models/trolley_4legs_tape_all/model.sdf
Normal file
@@ -0,0 +1,153 @@
|
||||
<?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: dải trên CẢ 4 chân (`tape_legs: all`), collision 0.14–0.24 m khai laser_retro 2000.
|
||||
-->
|
||||
<sdf version="1.6">
|
||||
<model name="trolley_4legs_tape_all">
|
||||
<static>true</static>
|
||||
<link name="frame">
|
||||
<collision name="entry_left_low">
|
||||
<pose>0.3600 0.2585 0.0700 0 0 0</pose>
|
||||
<laser_retro>0</laser_retro>
|
||||
<geometry><box><size>0.03 0.03 0.1400</size></box></geometry>
|
||||
</collision>
|
||||
<visual name="entry_left_low_visual">
|
||||
<pose>0.3600 0.2585 0.0700 0 0 0</pose>
|
||||
<geometry><box><size>0.03 0.03 0.1400</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_left_band">
|
||||
<pose>0.3600 0.2585 0.1900 0 0 0</pose>
|
||||
<laser_retro>2000</laser_retro>
|
||||
<geometry><box><size>0.03 0.03 0.1000</size></box></geometry>
|
||||
</collision>
|
||||
<visual name="entry_left_band_visual">
|
||||
<pose>0.3600 0.2585 0.1900 0 0 0</pose>
|
||||
<geometry><box><size>0.03 0.03 0.1000</size></box></geometry>
|
||||
<material><ambient>0.9 0.9 0.2 1</ambient><diffuse>0.9 0.9 0.2 1</diffuse></material>
|
||||
</visual>
|
||||
<collision name="entry_left_high">
|
||||
<pose>0.3600 0.2585 0.3100 0 0 0</pose>
|
||||
<laser_retro>0</laser_retro>
|
||||
<geometry><box><size>0.03 0.03 0.1400</size></box></geometry>
|
||||
</collision>
|
||||
<visual name="entry_left_high_visual">
|
||||
<pose>0.3600 0.2585 0.3100 0 0 0</pose>
|
||||
<geometry><box><size>0.03 0.03 0.1400</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_low">
|
||||
<pose>0.3600 -0.2585 0.0700 0 0 0</pose>
|
||||
<laser_retro>0</laser_retro>
|
||||
<geometry><box><size>0.03 0.03 0.1400</size></box></geometry>
|
||||
</collision>
|
||||
<visual name="entry_right_low_visual">
|
||||
<pose>0.3600 -0.2585 0.0700 0 0 0</pose>
|
||||
<geometry><box><size>0.03 0.03 0.1400</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_band">
|
||||
<pose>0.3600 -0.2585 0.1900 0 0 0</pose>
|
||||
<laser_retro>2000</laser_retro>
|
||||
<geometry><box><size>0.03 0.03 0.1000</size></box></geometry>
|
||||
</collision>
|
||||
<visual name="entry_right_band_visual">
|
||||
<pose>0.3600 -0.2585 0.1900 0 0 0</pose>
|
||||
<geometry><box><size>0.03 0.03 0.1000</size></box></geometry>
|
||||
<material><ambient>0.9 0.9 0.2 1</ambient><diffuse>0.9 0.9 0.2 1</diffuse></material>
|
||||
</visual>
|
||||
<collision name="entry_right_high">
|
||||
<pose>0.3600 -0.2585 0.3100 0 0 0</pose>
|
||||
<laser_retro>0</laser_retro>
|
||||
<geometry><box><size>0.03 0.03 0.1400</size></box></geometry>
|
||||
</collision>
|
||||
<visual name="entry_right_high_visual">
|
||||
<pose>0.3600 -0.2585 0.3100 0 0 0</pose>
|
||||
<geometry><box><size>0.03 0.03 0.1400</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_low">
|
||||
<pose>-0.3600 0.2585 0.0700 0 0 0</pose>
|
||||
<laser_retro>0</laser_retro>
|
||||
<geometry><box><size>0.03 0.03 0.1400</size></box></geometry>
|
||||
</collision>
|
||||
<visual name="far_left_low_visual">
|
||||
<pose>-0.3600 0.2585 0.0700 0 0 0</pose>
|
||||
<geometry><box><size>0.03 0.03 0.1400</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_band">
|
||||
<pose>-0.3600 0.2585 0.1900 0 0 0</pose>
|
||||
<laser_retro>2000</laser_retro>
|
||||
<geometry><box><size>0.03 0.03 0.1000</size></box></geometry>
|
||||
</collision>
|
||||
<visual name="far_left_band_visual">
|
||||
<pose>-0.3600 0.2585 0.1900 0 0 0</pose>
|
||||
<geometry><box><size>0.03 0.03 0.1000</size></box></geometry>
|
||||
<material><ambient>0.9 0.9 0.2 1</ambient><diffuse>0.9 0.9 0.2 1</diffuse></material>
|
||||
</visual>
|
||||
<collision name="far_left_high">
|
||||
<pose>-0.3600 0.2585 0.3100 0 0 0</pose>
|
||||
<laser_retro>0</laser_retro>
|
||||
<geometry><box><size>0.03 0.03 0.1400</size></box></geometry>
|
||||
</collision>
|
||||
<visual name="far_left_high_visual">
|
||||
<pose>-0.3600 0.2585 0.3100 0 0 0</pose>
|
||||
<geometry><box><size>0.03 0.03 0.1400</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_low">
|
||||
<pose>-0.3600 -0.2585 0.0700 0 0 0</pose>
|
||||
<laser_retro>0</laser_retro>
|
||||
<geometry><box><size>0.03 0.03 0.1400</size></box></geometry>
|
||||
</collision>
|
||||
<visual name="far_right_low_visual">
|
||||
<pose>-0.3600 -0.2585 0.0700 0 0 0</pose>
|
||||
<geometry><box><size>0.03 0.03 0.1400</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_band">
|
||||
<pose>-0.3600 -0.2585 0.1900 0 0 0</pose>
|
||||
<laser_retro>2000</laser_retro>
|
||||
<geometry><box><size>0.03 0.03 0.1000</size></box></geometry>
|
||||
</collision>
|
||||
<visual name="far_right_band_visual">
|
||||
<pose>-0.3600 -0.2585 0.1900 0 0 0</pose>
|
||||
<geometry><box><size>0.03 0.03 0.1000</size></box></geometry>
|
||||
<material><ambient>0.9 0.9 0.2 1</ambient><diffuse>0.9 0.9 0.2 1</diffuse></material>
|
||||
</visual>
|
||||
<collision name="far_right_high">
|
||||
<pose>-0.3600 -0.2585 0.3100 0 0 0</pose>
|
||||
<laser_retro>0</laser_retro>
|
||||
<geometry><box><size>0.03 0.03 0.1400</size></box></geometry>
|
||||
</collision>
|
||||
<visual name="far_right_high_visual">
|
||||
<pose>-0.3600 -0.2585 0.3100 0 0 0</pose>
|
||||
<geometry><box><size>0.03 0.03 0.1400</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>
|
||||
14
sim/models/trolley_4legs_tape_entry/model.config
Normal file
14
sim/models/trolley_4legs_tape_entry/model.config
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0"?>
|
||||
<model>
|
||||
<name>trolley_4legs_tape_entry</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, dải phản quang 2 chân đầu +X. Gốc model ở
|
||||
tâm 4 chân. Dùng chạy thử trolley_detection_action + chui gầm trong Gazebo.
|
||||
</description>
|
||||
</model>
|
||||
113
sim/models/trolley_4legs_tape_entry/model.sdf
Normal file
113
sim/models/trolley_4legs_tape_entry/model.sdf
Normal file
@@ -0,0 +1,113 @@
|
||||
<?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: dải chỉ trên 2 chân ở đầu +X (`tape_legs: entry`) — đầu +X là cạnh vào.
|
||||
-->
|
||||
<sdf version="1.6">
|
||||
<model name="trolley_4legs_tape_entry">
|
||||
<static>true</static>
|
||||
<link name="frame">
|
||||
<collision name="entry_left_low">
|
||||
<pose>0.3600 0.2585 0.0700 0 0 0</pose>
|
||||
<laser_retro>0</laser_retro>
|
||||
<geometry><box><size>0.03 0.03 0.1400</size></box></geometry>
|
||||
</collision>
|
||||
<visual name="entry_left_low_visual">
|
||||
<pose>0.3600 0.2585 0.0700 0 0 0</pose>
|
||||
<geometry><box><size>0.03 0.03 0.1400</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_left_band">
|
||||
<pose>0.3600 0.2585 0.1900 0 0 0</pose>
|
||||
<laser_retro>2000</laser_retro>
|
||||
<geometry><box><size>0.03 0.03 0.1000</size></box></geometry>
|
||||
</collision>
|
||||
<visual name="entry_left_band_visual">
|
||||
<pose>0.3600 0.2585 0.1900 0 0 0</pose>
|
||||
<geometry><box><size>0.03 0.03 0.1000</size></box></geometry>
|
||||
<material><ambient>0.9 0.9 0.2 1</ambient><diffuse>0.9 0.9 0.2 1</diffuse></material>
|
||||
</visual>
|
||||
<collision name="entry_left_high">
|
||||
<pose>0.3600 0.2585 0.3100 0 0 0</pose>
|
||||
<laser_retro>0</laser_retro>
|
||||
<geometry><box><size>0.03 0.03 0.1400</size></box></geometry>
|
||||
</collision>
|
||||
<visual name="entry_left_high_visual">
|
||||
<pose>0.3600 0.2585 0.3100 0 0 0</pose>
|
||||
<geometry><box><size>0.03 0.03 0.1400</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_low">
|
||||
<pose>0.3600 -0.2585 0.0700 0 0 0</pose>
|
||||
<laser_retro>0</laser_retro>
|
||||
<geometry><box><size>0.03 0.03 0.1400</size></box></geometry>
|
||||
</collision>
|
||||
<visual name="entry_right_low_visual">
|
||||
<pose>0.3600 -0.2585 0.0700 0 0 0</pose>
|
||||
<geometry><box><size>0.03 0.03 0.1400</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_band">
|
||||
<pose>0.3600 -0.2585 0.1900 0 0 0</pose>
|
||||
<laser_retro>2000</laser_retro>
|
||||
<geometry><box><size>0.03 0.03 0.1000</size></box></geometry>
|
||||
</collision>
|
||||
<visual name="entry_right_band_visual">
|
||||
<pose>0.3600 -0.2585 0.1900 0 0 0</pose>
|
||||
<geometry><box><size>0.03 0.03 0.1000</size></box></geometry>
|
||||
<material><ambient>0.9 0.9 0.2 1</ambient><diffuse>0.9 0.9 0.2 1</diffuse></material>
|
||||
</visual>
|
||||
<collision name="entry_right_high">
|
||||
<pose>0.3600 -0.2585 0.3100 0 0 0</pose>
|
||||
<laser_retro>0</laser_retro>
|
||||
<geometry><box><size>0.03 0.03 0.1400</size></box></geometry>
|
||||
</collision>
|
||||
<visual name="entry_right_high_visual">
|
||||
<pose>0.3600 -0.2585 0.3100 0 0 0</pose>
|
||||
<geometry><box><size>0.03 0.03 0.1400</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