Gazebo | Ignition | Community
Ask Your Question
0

bumper sensor topic not available

asked 2016-07-25 17:12:23 -0500

ankitvora7 gravatar image

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>
edit retag flag offensive close merge delete

Comments

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

nkoenig gravatar imagenkoenig ( 2016-07-26 08:53:46 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-07-28 16:44:02 -0500

ankitvora7 gravatar image

updated 2016-07-28 16:44:30 -0500

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

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-07-25 17:11:01 -0500

Seen: 1,408 times

Last updated: Jul 28 '16