Distance sensor

We add the solid model of this sensor under the <visual> tag by following the same procedure we covered for the camera. The URDF definition is as follows:

<joint name="distance_sensor_solid_joint" type="fixed">    <axis xyz="0 1 0" />    <origin rpy="0 0 0" xyz="0 0 0" />    <parent link="base_link"/>    <child link="distance_sensor_solid"/>  </joint>  <link name="distance_sensor_solid">    <visual>      <origin xyz="0.2 0 0.155" rpy="1.570795 0 1.570795" />      <geometry>        <mesh filename="package://gopigo3_description/meshes/IR_Sensor_Sharp_GP2Y_solid.stl" scale="0.005 0.005 0.005"/>      </geometry>      <material name="red"/>    </visual>    ...  </link>

We can see two blocks in the preceding snippet: the <link> element to specify the solid, and the <joint> block ...

Get Hands-On ROS for Robotics Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.