Right now I have added this code to the collision element of the Object model sdf file, which allows the robot could go through the object very very slowly. Is there a way to make the robot have no collision with the object while I could still use Lidar to detect the objects in the Gazebo? 0 0 <collide_without_contact>true</collide_without_contact>
-
$\begingroup$ <surface> <friction> <ode> <mu>0</mu> <mu2>0</mu2> </ode> </friction> <contact> <collide_without_contact>true</collide_without_contact> </contact> </surface> $\endgroup$– Ruiji LiuCommented Nov 8, 2023 at 22:22
-
$\begingroup$ Welcome at RSE. Please edit, clarify and reformat your question using a code block to have a clear understanding what you have tried. $\endgroup$– Christoph FroehlichCommented Nov 9, 2023 at 10:18
1 Answer
If you are on Gazebo Classic (e.g. Gazebo 11), you can try to use collide_without_contact
:
Unfortunately, this seems not implemented yet for 'new Gazebo' (i.e. 'Gazebo Sim', e.g. Gazebo Fortress or Garden or Harmonic).
A possible alternative (both for Gazebo Classic as well as Gazebo Sim) is to use a collision bitmask:
See here for documentation
(It is a Gazebo Classic documentation page, but I think the usage is identical in Gazebo Sim),
See the
gz-sim
GitHub repository for an example demo world.