topic of gazebo_ros bumper sensor attached to arm link echo no contact information

asked 2017-06-12 04:20:41 -0600

shawnysh gravatar image


I want to attach contact sensor to gripper finger of robot arm, aiming to get contact feed back while gripper finger touches against other objects


After setup, I try to echo bumper contact feedback via below command, but it echoes time increasing only without contact information

gz topic -v /gazebo/default/gripper_finger_link1/contact_sensor

Methods I have tried:

I follow this answer in question: Gazebo contact sensor added to a robot link in urdf file is not working as expected?, adding the proper suffix to make urdf converted to sdf correctly.

where I use @teps's answer which is simple version( I have also tried verbose version yet didn't work either), below is his comment:

I found that if you don't specify the collision name, you get something a lot nicer. E.g. if I specify the collision name (name="palm") I get: {link name}_fixed_joint_lump__palm_collision, but if I leave it empty I get: {link name}_collision. My recipe is then to simply leave the collision name of the link empty, and name the contact collision element as {link_name}_collision.

Here is the part of source code of ROBOT.xacro :

<!-- left gripper finger leaving collision name empty -->
  <link name="gripper_finger_link1">
      <origin xyz="0.04 -0.03 0"/>
           <box size="${left_gripper_len} ${left_gripper_width} ${left_gripper_height}" />
      <material name="White" />

  <origin xyz="0.04 -0.03 0"/>
           <box size="${left_gripper_len} ${left_gripper_width} ${left_gripper_height}" />
    <xacro:inertial_matrix mass="1"/>
   <!--////////// attach gazebo_ros_bumper sensor plugin to gripper_finger_link1  ////////////-->
      <gazebo reference="gripper_finger_link1">
            <sensor name="contact_sensor" type="contact">
              <plugin name="bumper_plugin" filename="">

I check the SDF file converted from ROBOT.xacro, here is the part of the text, which seems fine since collision name of link matches the counterpart in sensor tag of gazebo tag, as highlighted blocks show

image description

On the other hand, I try to attach plugin to base_link instead, it works which can echo contact information. But it didn't work when plugin attached to another link.


How to get contact information of robot arm link accept for base_link ??? What's wrong?

edit retag flag offensive close merge delete


Hello, I'm having the same problem. Did you find a solution?

cpaniagua gravatar imagecpaniagua ( 2018-03-14 11:55:27 -0600 )edit