Creating a URDF with a link
In this section, you will dive directly in and create your first URDF. We will first create an XML file for the URDF. In this file, we will add a link, which will represent one rigid part of a robot, and visualize it in RViz. We will also explore the different types of shapes you can use—boxes, cylinders, and so on.
This will be a good first step, so you can get familiar with URDF and be ready to dive into the process of adding several links and joints together (in the next section).
Let’s get started by setting up our URDF file.
Setting up a URDF file
A URDF file is simply an XML file with the .
urdf
extension.
Now, to keep things simple for this chapter, we will create a URDF file inside our home directory. In the next chapter, you will learn how to correctly package the URDF inside a ROS 2 application.
How should you name the URDF file? You could choose any name; it doesn’t really matter. Usually, you will give it...