Home | Tutorials | Wiki | Issues
Ask Your Question
0

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" />
    </joint>

    <link name="simple_collision_link">
      <inertial>
        <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" />
      </inertial>
      <visual>
        <origin xyz="0 0 0"/>
        <geometry>
          <box size="0.001 0.001 0.001" />
        </geometry>
      </visual>
      <collision name="segbot_simple_collision">
        <origin xyz="0 0 0.1"/>
        <geometry>
          <cylinder length="0.2" radius="0.8" />
        </geometry>
      </collision>
    </link>

    <gazebo reference="simple_collision_link">
      <selfCollide>false</selfCollide>
      <sensor type="contact" name="simple_collision_sensor">
        <always_on>true</always_on>
        <update_rate>100.0</update_rate>
        <contact>
          <collision>segbot_simple_collision</collision>
          <topic>simple_contact</topic>
        </contact>
        <plugin name="simple_collision_gazebo_ros_bumper_controller" filename="libgazebo_ros_bumper.so">
          <alwaysOn>true</alwaysOn>
          <updateRate>100</updateRate>
          <frameName>base_link</frameName>
          <bumperTopicName>simple_collision_bumper</bumperTopicName>
        </plugin>
      </sensor>
    </gazebo>

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
0

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

Comments

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: https://picasaweb.google.com/lh/photo/csQvV22jGfUXUwXwmH6H5MlmXIO0bfruZ6HTfNkO2E?feat=directlink

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: https://picasaweb.google.com/lh/photo/tjzwl2O1S3Loz-e7yDChR8lmXIO0_bfruZ6HTfNkO2E?feat=directlink

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

Considering the complete SDF model, please see here: https://docs.google.com/file/d/0B49go8f2Nr2gSllrdTdBNzRDU00/edit?usp=sharing Thanks once again!

mikegao88 gravatar imagemikegao88 ( 2013-07-26 04:07:00 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

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

Seen: 677 times

Last updated: Jul 25 '13