Gazebo | Ignition | Community
Ask Your Question

Gazebo Fortress Contact Sensor disable collision

asked 2023-01-11 22:36:16 -0500

Hokul gravatar image

updated 2023-01-11 23:35:35 -0500

Hey I would like to create a contact sensor which will detect collisions with it, but not actually collide or interfere with any moving objects. Just send information that it has been collided with.

Currently have the following code for it, but the model seems to stop when it hits this object.

<model name="wheel_sensor">
  <pose>0.4 -4 6.9 0 0 0</pose>
  <link name="wheel_entry_sensor">
    <visual name="visual">
          <size>0.2 0.2 0.9</size>
    <collision name="collision">
          <size>0.2 0.2 0.9</size>
    <sensor name='entry_sensor' type='contact'>
edit retag flag offensive close merge delete


SDF Spec

<collide_without_contact> Element Required: 0 Type: bool Default: false Description: Flag to disable contact force generation, while still allowing collision checks and contact visualization to occur.

tldr: collide_without_contact means the object will stop even though no "forces" are generated.

Gavriel-CTO gravatar imageGavriel-CTO ( 2023-01-30 03:54:51 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2023-01-29 02:00:50 -0500

Gavriel-CTO gravatar image

updated 2023-01-29 02:04:57 -0500

If it fits your simulation, you could consider attaching the contact sensor to an essentially flat collision element just above the ground plane. I use boxes with x,y,0.001 size and they work fine. Of course this would only work in cases when you want to detect "driving over" a specific area.

edit: I use Gazebo-11, so YMMV

edit flag offensive delete link more

answered 2023-01-12 13:02:29 -0500

alex-ssom gravatar image

To the best of my knowledge, this is unavoidable. The collision is detected and has an impact on the physics of the simulation.

The best way for your collision to have little impact is to remove the object you collided with from the simulation programmatically but I believe that's not what you want to achieve. See: for detail on how to do that.

edit flag offensive delete link more



Cheers for the quick response, that was very helpful. I'll be able to try some different solution now :).

Hokul gravatar imageHokul ( 2023-01-12 16:23:28 -0500 )edit

Question Tools


Asked: 2023-01-11 22:36:16 -0500

Seen: 463 times

Last updated: Jan 29 '23