After learning about URDF and its important tags, we can start some basic modeling using URDF. The first robot mechanism that we are going to design is a pan-and-tilt mechanism, as shown in the following figure.
There are three links and two joints in this mechanism. The base link is static, and all the other links are mounted on it. The first joint can pan on its axis, and the second link is mounted on the first link, and it can tilt on its axis. The two joints in this system are of a revolute type:
Figure 4: Visualization of a pan-and-tilt mechanism in RViz
Let's see the URDF code of this mechanism. Navigate to the mastering_ros_robot_description_pkg/urdf directory and open pan_tilt.urdf:
<?xml version="1.0"?> <robot name="pan_tilt"> <link name="base_link"> <visual> ...