Camera model

You can add the solid of the camera as usual with <visual> tags, but since it is a commercial device, you can a get better look by using a realistic three-dimensional CAD model supplied by the manufacturer or made by someone else in the open source community. The URDF definition is as follows:

<link name="camera">  <visual>    <origin xyz="0.25 0 0.05" rpy="0 1.570795 0" />    <geometry>      <mesh filename="package://virtual_slam/meshes/piCamera.stl" scale="0.5 0.5 0.5"/>    </geometry>  </visual>  ...</link><joint name="joint_camera" type="fixed">    <parent link="base_link"/>    <child link="camera"/>    <origin xyz="0 0 0" rpy="0 0 0" />     <axis xyz="1 0 0" /></joint>

We can see two blocks in the preceding snippet: the <link> element to specify ...

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.