Home | Tutorials | Wiki | Issues
Ask Your Question
0

Gazebo_ros_bumper plugin returns empty state despite collision

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

Feynman gravatar image

Hi,

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.

 header:   
 seq: 9637
 stamp: 
 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">
  <visual>
      <origin xyz="0 0 0.1" rpy="0 0 0" />
      <geometry>
         <box size="0.8 0.6 0.03" />
      </geometry>
  </visual>
  <collision name="collision_layer_collision">
   <origin xyz="0 0 0.1" rpy="0 0 0 " />
   <geometry>
     <box size="0.8 0.6 0.03" />
   </geometry>
 </collision>  
</link>

<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" />
</joint>
<gazebo reference="collision_layer">
<sensor name="main_bumper" type="contact">
    <selfCollide>true</selfCollide>
    <alwaysOn>true</alwaysOn>
    <updateRate>15.0</updateRate>
    <material>Gazebo/Red</material>
    <contact>
       <collision>collision_layer_collision_collision</collision>
    </contact>
    <plugin name="gazebo_ros_bumper_controller" filename="libgazebo_ros_bumper.so">   
    <bumperTopicName>collision_robot</bumperTopicName>
    </plugin>
</sensor>
  </gazebo>

Does anybody know how to fix this?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

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
Login/Signup to Answer

Question Tools

1 follower

Stats

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

Seen: 51 times

Last updated: Jan 31