ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

gazebo_ros_bumper_controller not updating bumper states

asked 2017-12-02 23:28:39 -0600

Als177 gravatar image

updated 2017-12-03 03:56:33 -0600

jayess gravatar image

I have been implementing this code. I am trying to echo the Contact messages but states does not echo any value even if it undergoes collision.Can someone please tell me where I am going wrong

<gazebo reference="base">
<sensor name="main_bumper" type="contact">
       <collision name="bump_sensor_collision_collision"></collision>
    <plugin name="gazebo_ros_bumper_controller" filename="">   


This is the output that I am getting :

  seq: 89604
    secs: 584
    nsecs: 451000000
  frame_id: world
states: []
edit retag flag offensive close merge delete


I edited your question to make it more readable (using the preformatted text, or 101010 button) and moved your title to the body of the question, and gave it a more meaningful (to me) title...

jayess gravatar image jayess  ( 2017-12-03 04:00:18 -0600 )edit

Feel free to edit it but please keep in mind that having a short and direct title may help you get more people reading your question.

jayess gravatar image jayess  ( 2017-12-03 04:01:44 -0600 )edit

If the bumper topic isn't even publishing it's worth looking at ~/.gazebo/server-11345/gzserver.log, it may give clues that fields inside <sensor> are wrong for instance.

lucasw gravatar image lucasw  ( 2021-09-28 07:18:32 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-03-22 01:07:58 -0600

dan gravatar image

updated 2018-03-22 01:10:16 -0600

I think the problem is that you do not have a match between the collision name in base and the collision name in contact. Generate the sdf file with

gz sdf -p <your_filename>.urdf

and see if they match. The name generated in the sdf is a strange one. I see that you already discovered that it adds an extra "_collision" at the end. In my urdf files it puts other things into the name as well.

Also, I found that this did not work for me:

<collision name="bump_sensor_collision_collision"></collision>

I had to use this format (as well as getting the name right, of course):

edit flag offensive delete link more


Hii, can you please explain what should be typed in the collision line.

Mrudul gravatar image Mrudul  ( 2018-07-08 05:39:40 -0600 )edit

Question Tools

1 follower


Asked: 2017-12-02 23:28:39 -0600

Seen: 489 times

Last updated: Mar 22 '18