Gazebo | Ignition | Community
Ask Your Question

contact sensor no data output

asked 2013-07-25 07:19:02 -0500

mikegao88 gravatar image

updated 2013-07-25 13:47:07 -0500

nkoenig gravatar image

Hello! I am using ros hydro and gazebo-1.9.5 (my os is Ubuntu precise 32bit). I encounter a problem when testing the contact sensor. Part of my urdf file regarding the contact sensor is listed below:

 <joint name="base_link_simple_collision_joint" type="fixed">
      <origin xyz="0 0 0.1"/>
      <parent link="base_link"/>
      <child link="simple_collision_link" />

    <link name="simple_collision_link">
        <mass value="0.1" />
        <origin xyz="0 0 0" />
        <inertia ixx="0.1" ixy="0.0" ixz="0.0"
          iyy="0.1" iyz="0.0" 
          izz="0.1" />
        <origin xyz="0 0 0"/>
          <box size="0.001 0.001 0.001" />
      <collision name="segbot_simple_collision">
        <origin xyz="0 0 0.1"/>
          <cylinder length="0.2" radius="0.8" />

    <gazebo reference="simple_collision_link">
      <sensor type="contact" name="simple_collision_sensor">
        <plugin name="simple_collision_gazebo_ros_bumper_controller" filename="">

The problem is that neither the gazebo topic nor ros topic outputs any collision information, when I control the robot to "crash" into a wall in the environment, even though the robot can stop against the obstacle within the distance which I set in the collision tag ("radius"). Thanks for any suggestions and helps in advance!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-07-25 13:52:11 -0500

nkoenig gravatar image

What gazebo topic are you listening to?

Can you post the complete SDF model?

Are you sure the cylinder is colliding? You can turn on contact visualizations as a check.

edit flag offensive delete link more


Hello! Thanks for your reply. The gazebo topic I listen to is "simplecontact", as indicated in the above file. I have checked the collision in the gzclient gui with its collision visualization tool, and it showed the collision happened as expected, and the robot just stopped against the wall at the distance of the radius of the cylinder. The capture is here:

mikegao88 gravatar imagemikegao88 ( 2013-07-26 03:50:12 -0500 )edit

By the way, the capture got from the screenshot of gzclient gui is black and white, not colorful, maybe I do not use it rightly? See here:

mikegao88 gravatar imagemikegao88 ( 2013-07-26 04:01:32 -0500 )edit

Considering the complete SDF model, please see here: Thanks once again!

mikegao88 gravatar imagemikegao88 ( 2013-07-26 04:07:00 -0500 )edit

Question Tools

1 follower


Asked: 2013-07-25 07:19:02 -0500

Seen: 836 times

Last updated: Jul 25 '13