Add a V plate model so the detector has something to find in simulation
The chain was testable but not runnable: simulation fakes the dock entirely (use_simulated_goal writes an invented pose 1.6 m ahead of base_link), so no physical object exists for a laser to see. Nothing in the worlds under Test/simulators is a dock either. This is the missing half - an SDF plate whose geometry matches the v_std profile exactly: 90 degree interior angle, 0.30 m wings. 0.02 m thick so min_split_dist does not read the two faces of one wing as two segments, and 0.6 m tall from the floor so a planar laser at any plausible mounting height cuts through it. The plate and the profile have to agree. Change the model and the wing_length gate rejects the very object that was just spawned, which is the kind of failure that looks like a broken detector.
This commit is contained in:
29
sim/launch/spawn_dock_plate.launch
Normal file
29
sim/launch/spawn_dock_plate.launch
Normal file
@@ -0,0 +1,29 @@
|
||||
<!--
|
||||
Dựng một tấm dẫn hướng chữ V vào world Gazebo đang chạy.
|
||||
|
||||
Chạy SAU khi world đã lên:
|
||||
roslaunch dock_pattern_action spawn_dock_plate.launch x:=3.0 y:=0.0 yaw:=3.14159
|
||||
|
||||
`yaw` quay tấm; đỉnh chữ V mở về phía +X của chính tấm, nên đặt `yaw` sao cho mặt trong hướng về
|
||||
phía robot sẽ đứng. Mặc định 3.14159 = tấm quay lưng về +X của world, tức robot đứng ở phía +X
|
||||
nhìn vào.
|
||||
|
||||
Hình học của model KHỚP profile `v_std`: góc trong 90 độ, cánh 0.30 m. Đổi model thì phải đổi
|
||||
profile theo, nếu không cổng `wing_length` sẽ loại đúng cái tấm vừa dựng.
|
||||
-->
|
||||
<launch>
|
||||
<arg name="x" default="3.0" />
|
||||
<arg name="y" default="0.0" />
|
||||
<arg name="z" default="0.0" />
|
||||
<arg name="yaw" default="3.14159" />
|
||||
<arg name="name" default="dock_plate_v" />
|
||||
|
||||
<!-- Gazebo tìm model theo GAZEBO_MODEL_PATH; trỏ thẳng vào thư mục sim/models của gói này. -->
|
||||
<env name="GAZEBO_MODEL_PATH"
|
||||
value="$(find dock_pattern_action)/sim/models:$(optenv GAZEBO_MODEL_PATH)" />
|
||||
|
||||
<node name="spawn_$(arg name)" pkg="gazebo_ros" type="spawn_model" output="screen"
|
||||
args="-sdf -file $(find dock_pattern_action)/sim/models/dock_plate_v/model.sdf
|
||||
-model $(arg name)
|
||||
-x $(arg x) -y $(arg y) -z $(arg z) -Y $(arg yaw)" />
|
||||
</launch>
|
||||
Reference in New Issue
Block a user