gazebo_ros_bumper_controller not updating bumper states
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">
<geom>base_geom</geom>
<selfCollide>true</selfCollide>
<alwaysOn>true</alwaysOn>
<updateRate>100.0</updateRate>
<material>Gazebo/Red</material>
<contact>
<collision name="bump_sensor_collision_collision"></collision>
</contact>
<plugin name="gazebo_ros_bumper_controller" filename="libgazebo_ros_bumper.so">
<bumperTopicName>bumper_vals</bumperTopicName>
<frameName>world</frameName>
</plugin>
</sensor>
</gazebo>
</robot>
This is the output that I am getting :
header:
seq: 89604
stamp:
secs: 584
nsecs: 451000000
frame_id: world
states: []
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...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.
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.