Gazebo | Ignition | Community
Ask Your Question

Gazebo_ros_bumper plugin returns empty state despite collision

asked 2018-01-23 09:10:51 -0500

Feynman gravatar image


I am using the gazebo_ros_bumper plugin to detect a collision. Everything seems to work fine except that I the collision rostopic always returns empty states which indicates that no collision happened.

 seq: 9637
 secs: 0
 nsecs:         0
 frame_id: "world"
 states: []

=> states[] always empty

I can see the collisions when I subscripe to the contacts topic using gazebo directly:

gz topic -e /gazebo/default/physics/contacts

Code from urdf file:

<link name="collision_layer">
      <origin xyz="0 0 0.1" rpy="0 0 0" />
         <box size="0.8 0.6 0.03" />
  <collision name="collision_layer_collision">
   <origin xyz="0 0 0.1" rpy="0 0 0 " />
     <box size="0.8 0.6 0.03" />

<joint name="collision_layer_joint" type="fixed">
  <origin xyz="0 0 0.1" rpy="0 0 0" />
  <parent link="base_footprint"/>
  <child link="collision_layer" />
<gazebo reference="collision_layer">
<sensor name="main_bumper" type="contact">
    <plugin name="gazebo_ros_bumper_controller" filename="">   

Does anybody know how to fix this?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-01-31 08:39:45 -0500

Brosseau.F gravatar image

I think that the name in the collision tag of the sensor is wrong.

Instead of collision_layer_collision_collision try collision_layer_collision

edit flag offensive delete link more

Question Tools



Asked: 2018-01-23 08:58:20 -0500

Seen: 588 times

Last updated: Jan 31 '18