Regardless of whether you are creating a real robot or just a simulation of it inside your PC, the
first step is always to define its structure.
So the model of the robot and define how all the different components are connected together.
Define which components are fixed and which one are movable and also where any potential sensor of the
robot is placed.
In order to model a robot, Rosco uses the Urdf convention to represent the structure and the components
of a robot through XML tags.
Urdf stands for Unified Robot Description Format and is basically a convention used in the robotics
community to describe the structure of a robot.
Each robot component is defined by an XML tag that not only creates the component itself, but can also
associate some properties to this component.
If you've ever had a chance to use or at least to see what an HTML file of a web page looks like, then
the Urdf format will sound familiar to you.
Otherwise, don't worry, because in the following laboratory lesson we will implement from scratch
our XML model of the robot using Urdf.
It all starts with a tag called robot that defines the structure of a robot and will be a container
for all the other robot components and how they are connected.
So let's take a look at the main XML tags that we can find within an RDF model of a robot.
The tag link represents any component of the robot.
Basically, this tag creates a reference frame, so namely a frame with some properties.
For example, a link can have a name that is in this case base link.
And eventually a link can also have some physical dimensions.
A mesh or a 3D model associated with it.
To do so.
The tag visual is used for the visualization of the mesh and then the tag collision and inertial are
the one that are used to assign physical properties to the link and thus to assign volume and inertia.
All these stacks will then be used by the physics engine to simulate the robot and so its interactions
with the environment.
In addition to the tag link, another commonly used tag for the creation of a robot model is the tag
joint.
With this tag, one can connect two links together and so to define the properties of the connection.
Within the tag joint, one can specify the name of the two links that are connected together, and this
connection is made following a tree like structure.
So a joint that connects two links always as a parent that in this case is the base link and also as
a child that in this case is the base plate.
It is useful to remember that each link can only be connected to one parent.
Meanwhile, each parent can have multiple child links connected to it.
In this case, the base link, which is the parent, can also have several other children in addition
to the base plate.
On the other hand, the base plate can only be a child of the base link and cannot have other parents.
Moreover, the base plate, in addition of being a child of the base link, can also be the parent of
some other links.
The resulting structure of the links connected by joints resembles a tree in which from a single initial
link, all the other links branch off connected by the same number of joints.
Within a joint tag.
One can also define the type of the connection.
For example, two links can be fixed to each other.
That is, one does not move with respect to the other or they can also be movable.
And so one link, one component of the robot can rotate or translate with respect to another component.
Also within the joint tag, one can define other properties such as the rotation axis of one of the
link with the respect to the other and also the limits of the relative movements between two links.
By reusing these tags to define each component of the robot and its connection to the other component,
we get the complete model of our robot.
Here it is possible to visualize our different links are connected to each other and how they can move.
They can rotate with the respect to each other.
In the next laboratory lesson, we are going to implement the Erdf module of our robot that we are also
going to use throughout the course for visualization simulation and also for defining the structure
of the real robot.