Robotics StackExchange | Archived questions

bumper sensor topic not available

Hi,

I've added a bumper sensor to husky by adding the following code snippet to 'husky.urdf.xacro'. Now, when I spawn the robot, I can see the front bumper turning orange (which means that the contact sensor has been detected). However, I cannot see the desired topic being published in my topics list. Any idea why would this happen ?

Config: Ubuntu 14.04, ROS - Indigo, Gazebo - 2.2

 <gazebo reference="front_bumper">
  <sensor name="front_bumper_contact" type="contact">
    <always_on>1</always_on>
    <update_rate>100</update_rate>
    <contact>
      <!-- When using ROS Indigo and Gazebo 2.2.3, the name specified here
           must be <link name>_collision. -->
      <collision>front_bumper_collision</collision>
    </contact>
    <plugin filename="libgazebo_ros_bumper.so" name="front_bumper_gazebo_ros_bumper_controller">
      <always_on>1</always_on>
      <update_rate>100</update_rate>
      <frameName>front_bumper_link</frameName>
      <bumperTopicName>front_bumper_contact_state</bumperTopicName>
    </plugin>
  </sensor>
  <material>Gazebo/Orange</material>
</gazebo>

Asked by ankitvora7 on 2016-07-25 17:11:01 UTC

Comments

Check the code that generates libgazebo_ros_bumper.so. Make sure the bumpterTopicName is the correct xml tag to use.

Asked by nkoenig on 2016-07-26 08:53:46 UTC

Answers

Turns out, the tag (front_bumper_collision) was not defined in my urdf. I defined that within the 'front_bumper' link and everything worked out fine :)

Asked by ankitvora7 on 2016-07-28 16:44:02 UTC

Comments