From 4ca57355ba5374da8f99849a5519df45b085d8f4 Mon Sep 17 00:00:00 2001 From: duongtd Date: Wed, 26 Aug 2026 13:14:02 +0700 Subject: [PATCH] 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. --- CMakeLists.txt | 6 +++ sim/launch/spawn_dock_plate.launch | 29 ++++++++++++++ sim/models/dock_plate_v/model.config | 14 +++++++ sim/models/dock_plate_v/model.sdf | 58 ++++++++++++++++++++++++++++ 4 files changed, 107 insertions(+) create mode 100644 sim/launch/spawn_dock_plate.launch create mode 100644 sim/models/dock_plate_v/model.config create mode 100644 sim/models/dock_plate_v/model.sdf diff --git a/CMakeLists.txt b/CMakeLists.txt index c7e873c..fc933fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,6 +67,12 @@ target_link_libraries(dock_pattern_action_handler ${TF3_LIBRARY} ) +# Model + launch để dựng tấm chữ V trong Gazebo. Không phải build artifact, nhưng launch file tra +# đường dẫn qua $(find dock_pattern_action) nên phải có mặt sau khi install. +install(DIRECTORY sim/ + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/sim +) + install(TARGETS dock_pattern_action_handler ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} diff --git a/sim/launch/spawn_dock_plate.launch b/sim/launch/spawn_dock_plate.launch new file mode 100644 index 0000000..ab79345 --- /dev/null +++ b/sim/launch/spawn_dock_plate.launch @@ -0,0 +1,29 @@ + + + + + + + + + + + + + diff --git a/sim/models/dock_plate_v/model.config b/sim/models/dock_plate_v/model.config new file mode 100644 index 0000000..48138ab --- /dev/null +++ b/sim/models/dock_plate_v/model.config @@ -0,0 +1,14 @@ + + + dock_plate_v + 1.0 + model.sdf + + T800 Robotics + tdd@gmail.com + + + Tấm dẫn hướng chữ V của trạm dock, dùng để kiểm bộ dò biên dạng bằng LiDAR trong Gazebo. + Góc trong tại đỉnh 90 độ, mỗi cánh 0.30 m — khớp profile `v_std`. + + diff --git a/sim/models/dock_plate_v/model.sdf b/sim/models/dock_plate_v/model.sdf new file mode 100644 index 0000000..63cc3c4 --- /dev/null +++ b/sim/models/dock_plate_v/model.sdf @@ -0,0 +1,58 @@ + + + + + true + + + + 0.10607 0.10607 0.3 0 0 0.7854 + + + 0.02 0.30 0.6 + + + + + 0.02 0.30 0.6 + + + 0.9 0.6 0.1 1 + 0.9 0.6 0.1 1 + + + + + + 0.10607 -0.10607 0.3 0 0 -0.7854 + + + 0.02 0.30 0.6 + + + + + 0.02 0.30 0.6 + + + 0.9 0.6 0.1 1 + 0.9 0.6 0.1 1 + + + + +