- We use Unified Robot Description Format (URDF) to model robot links and joints. It is in an XML format containing a tree of links and joints. It includes the inertial, visual and collision knowledge of the object being model.
- XACRO is an XML macro language. It can be used to create shorter and more manageable XML files than URDFs. This is helpful when more than one links have the same properties and dimensions, like a table leg. In a URDF file every table leg would have to have its own defined properties and dimensions, like a cylinder radius and height. But in a XACRO they could all equal one variable.
e.g.
<xacro:property name="width" value=".2" />
<xacro:property name="bodylen" value=".6" />
<link name="base_link">
<visual>
<geometry>
<cylinder radius="${width}" length="${bodylen}"/>
</geometry>
<material name="blue">
<color rgba="0 0 .8 1"/>
</material>
</visual>
<collision>
<geometry>
<cylinder radius="${width}" length="${bodylen}"/>
</geometry>
</collision>
</link>
By using XACRO you can make your XML files manageable.