From 4033939ff8ef5261d9f1223241d959bf0fc2001a Mon Sep 17 00:00:00 2001 From: duongtd Date: Wed, 26 Aug 2026 15:15:45 +0700 Subject: [PATCH] Give the simulated plate reflective tape, and correct where its apex is /f_scan/intensities comes back all zeros in simulation. That is not a missing feature: libgazebo_ros_laser fills intensities from the laser_retro of the collision a ray hits, and nothing in the world declares one. Without a surface that reflects, an intensity-based layer has nothing to work with and would look broken rather than unconfigured. The plate now carries two 0.05 m strips at laser_retro 2000 against a background of 0, spaced 0.1945 m centre to centre, standing 2.5 mm proud of the wing so rays hit the tape and not the wing behind it. Those two numbers are what a profile would be given. Also fixes the model's own description, which said the apex sits at the model origin with the wings opening toward +X. Working it out from the wing poses, the apex is at (0.2121, 0) and the V opens toward -X - which is why the spawn launch turns it by pi. Left as it was, anyone placing the plate would be off by 0.21 m and would be comparing the model origin against a detector that reports the apex. --- sim/models/dock_plate_v/model.sdf | 66 +++++++++++++++++++++++++++++-- 1 file changed, 63 insertions(+), 3 deletions(-) diff --git a/sim/models/dock_plate_v/model.sdf b/sim/models/dock_plate_v/model.sdf index 63cc3c4..b9c1e74 100644 --- a/sim/models/dock_plate_v/model.sdf +++ b/sim/models/dock_plate_v/model.sdf @@ -6,10 +6,23 @@ vertex_angle = 90 độ (góc TRONG tại đỉnh, giữa hai cánh) wing_length = 0.30 m (từ đỉnh ra đầu mút) - Đỉnh nằm tại gốc model, hai cánh mở về phía +X. Robot tiếp cận từ +X nên nó nhìn thấy MẶT TRONG - của chữ V — đúng thứ bộ dò khớp. + HÌNH HỌC THỰC TẾ (tính từ pose hai cánh bên dưới, không phải từ trực giác): + đỉnh = (0.2121, 0) trong hệ model + đầu mút = (0, +0.2121) và (0, -0.2121) + Tức chữ V **mở về phía -X** của model, đỉnh chĩa về +X. Launch spawn với `yaw:=3.14159` để lật + lại, khi đó miệng V hướng về +X của world và robot đứng phía +X nhìn vào MẶT TRONG. - Mỗi cánh nghiêng 45 độ so với trục Y, nên góc giữa hai cánh = 180 - 2*45 = 90 độ. + Mỗi cánh dài 0.30 m, góc trong tại đỉnh = 90 độ. + + ► Đặt tấm ở đâu thì phải nhớ gốc model KHÔNG phải đỉnh V — gốc lệch 0.2121 m so với đỉnh dọc + trục X. Bộ dò báo toạ độ ĐỈNH, nên hai con số này lệch nhau đúng ngần ấy. + + DẢI PHẢN QUANG: hai dải rộng 0.05 m dán trên mặt trong, giữa mỗi cánh, khai `laser_retro` cao. + Plugin `libgazebo_ros_laser.so` đọc `laser_retro` của `` bị tia bắn trúng rồi điền vào + `intensities` — không khai thì mọi tia trả về 0, và tầng phản quang của bộ dò không có gì để bám. + tâm hai dải = (0.0972, +0.0972) và (0.0972, -0.0972) + khoảng cách = 0.1945 m <- đây là `tape_spacing` cho profile + bề rộng = 0.05 m <- `tape_width` Cao 0.6 m và đáy sát sàn: LiDAR phẳng gắn ở độ cao nào trong khoảng đó cũng cắt qua tấm. Dày 0.02 m để `min_split_dist` (0.02 m) không nhầm hai mặt của cùng một cánh thành hai đoạn. @@ -22,6 +35,7 @@ 0.10607 0.10607 0.3 0 0 0.7854 + 0 0.02 0.30 0.6 @@ -40,6 +54,7 @@ 0.10607 -0.10607 0.3 0 0 -0.7854 + 0 0.02 0.30 0.6 @@ -54,5 +69,50 @@ + + + 0.09723 0.09723 0.3 0 0 0.7854 + + 2000 + + 0.005 0.05 0.6 + + + + + 0.005 0.05 0.6 + + + 0.95 0.95 0.95 1 + 0.95 0.95 0.95 1 + 0.4 0.4 0.4 1 + + + + + + 0.09723 -0.09723 0.3 0 0 -0.7854 + + 2000 + + 0.005 0.05 0.6 + + + + + 0.005 0.05 0.6 + + + 0.95 0.95 0.95 1 + 0.95 0.95 0.95 1 + 0.4 0.4 0.4 1 + + + +