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

Gazebo crashes when sensors are added to ShadowHand

asked 2011-03-08 00:47:25 -0500

erikjber gravatar image

After adding the following section to model/hand_urdf/thumb/thdistal.urdf.xacro in the sr_hand package Gazebo crashes during startup.

<gazebo reference="thdistal">
  <sensor:contact name="thdistal_contact_sensor">
    <geom>distal_collision_geom</geom>    
    <updateRate>100.0</updateRate>    
    <controller:gazebo_ros_bumper name="thdistal_gazebo_ros_bumper_controller" plugin="libgazebo_ros_bumper.so">
      <alwaysOn>true</alwaysOn>    
      <updateRate>100.0</updateRate> 
      <frameName>thdistal</frameName>  
      <bumperTopicName>thdistal_bumper</bumperTopicName>
      <interface:bumper name="thdistal_gazebo_ros_bumper_iface" />
    </controller:gazebo_ros_bumper>    
  </sensor:contact>
  <material>Gazebo/Grey</material>
</gazebo>

If I comment out the <geom> and the first <updaterate> tags Gazebo starts, but no contact messages are published.

All log files indicate that everything should be fine.

Any idea what I'm doing wrong?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2011-03-21 00:58:19 -0500

rld gravatar image

Hi,

I faced a similar problem and found the following resolution to work: construct the geom tag by appending _geom to the link name.

In your case, since the link name is thdistal, changing

distal_collision_geom to thdistal_geom

should avoid crashing gazebo on launch and enable the contact messages. The reason might have something to do with how the urdf is translated to the format understood by gazebo. (look at urdf2gazebo.cpp)

Also, as was mentioned in the previous answer, I found that contact messages were generated only when the link geometry is in contact.

edit flag offensive delete link more

Comments

I'll give it a try, thanks.
erikjber gravatar image erikjber  ( 2011-03-22 01:17:53 -0500 )edit
That works! Thank you so very much!
erikjber gravatar image erikjber  ( 2011-03-22 22:21:26 -0500 )edit
1

answered 2011-03-16 06:28:26 -0500

hsu gravatar image

updated 2011-03-16 06:28:42 -0500

The way gazebo_ros_bumper plugin is constructed right now, no messages are published unless the geom is in contact. This seems to be the wrong default behavior, so I've ticketed it here, and a patch is in trunk.

Thanks.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2011-03-08 00:47:25 -0500

Seen: 588 times

Last updated: Mar 21 '11