ROBOTICS 101Concept explainer

URDF and Robot Description

Software needs to know a robot's shape: how long each part is, how the parts connect, and how each joint moves. URDF, the Unified Robot Description Format, writes this down in XML as a tree of links joined by joints. Visualizers, planners, simulators, and TF2 all read the same file, so it must be right.

Links and joints

A <link> describes a rigid part: its visual shape, collision shape, and inertia. A <joint> connects a parent link to a child link, with an origin (where the child frame sits relative to the parent), an axis, a type, and limits. The child's pose is the parent's pose times the fixed origin times the joint's own motion:

$$T_{\text{child}} = T_{\text{parent}}\; T_{\text{origin}}\; T_{\text{joint}}(q)$$

What to notice

Switching joint 2 to prismatic makes it slide instead of turn, and to fixed makes it ignore its slider. A revolute joint stops at its limits, shown by the arm refusing to go further. The URDF text updates as you change settings, and this is exactly what a robot state publisher would read to publish the TF tree. In practice URDF files are often generated from Xacro macros to avoid repeating numbers, and a wrong inertia or a flipped axis in this file is a classic cause of strange simulation behavior.