Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

It is only important what is the collision tag name in the SDF description. How the Gazebo sees the model you can see by following these steps

  1. Convert XACRO description to URDF

    $ rosrun xacro xacro robot.xacro > robot.urdf

  2. Convert URDF description to SDF

    $ gz sdf -p robot.urdf > robot.sdf

  3. Open the SDF file and find the link you want to detect the contacts of. This name goes to the contact sensor collision tags.

This sensor can be defined in xacro file of the robot as

<robot name="robot" xmlns:xacro="">
  <gazebo reference="my_link">
    <sensor name='my_link_contact' type='contact'>