Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Take a look in this Repo. Here is an example how one can include sensors in urdf.

The sensors are defined in /urdf/sensors/... Each sensor has an ...gazebo.xacro (holds gazebo relevant sdf description) and an ...urdf.xacro (which is the actual urdf description). In urdf.xacro the camera is defined as xacro:macro, therefor one can use it in other urdf like this:

<!-- Kamera -->
<xacro:include filename="$(find luh_youbot_description)/urdf/sensors/asus_xtion_camera.urdf.xacro" />
<xacro:asus_xtion_camera name="camera" parent="arm_link_5" tilt="0.0">
  <origin xyz="-0.02 0 -0.04" rpy="0 -1.60 0" />
  <inertia ixx="0.1" ixy="0" ixz="0" iyy="0.1" iyz="0" izz="0.1" />

All params and tags in this example are related to the specific definitions in the Repo, keep in mind that they are different in your case.