Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

contact sensor no data output

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!

contact sensor no data output

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="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!