URDF

URDF
Filename extension
.URDF
Developed byRobot Operating System
Type of formatXML
Websitewiki.ros.org/urdf

URDF, Unified Robot Description Format is an XML format for representing a robot model. URDF is commonly used in Robot Operating System (ROS) tools such as rviz (Ros Visualization tool) and Gazebo simulator. A URDF model is a tree of rigid links connected by joints, and it can describe a robot's kinematics, dynamics, and visual and collision geometry in a single human-readable file. Large descriptions are often written with the Xacro macro language, which is expanded into plain URDF before use. Because many simulators, visualizers, and motion-planning tools can load URDF, it is widely used as an interchange format for robot models.

Structure and elements

A URDF document describes a robot using an XML-based hierarchical structure. The main elements used in a robot description are links, joints, materials, and their associated properties.

A link represents a rigid body or component of a robot, such as a chassis, robotic arm segment, wheel, or end effector. Each link can define three main properties:

  • Visual: Describes the geometry and appearance of a robot component, including its shape, dimensions, and material.
  • Collision: Defines the geometric representation used for collision detection in simulation and motion planning.
  • Inertial: Specifies physical properties such as mass, centre of mass, and inertia for dynamic simulation.

Joints

Joints define the connections and relative movement between two links. Every joint specifies a parent link and a child link. URDF supports the following joint types:

  • Fixed: Connects two links without allowing relative movement.
  • Revolute: Allows rotational movement around a specified axis, usually with defined position limits.
  • Continuous: Allows unrestricted rotational movement around an axis.
  • Prismatic: Allows linear movement along a specified axis.
  • Floating: Allows movement with six degrees of freedom.
  • Planar: Allows movement within a two-dimensional plane.

Robot visualization and simulation

URDF descriptions are used in the Robot Operating System (ROS) ecosystem to represent robot structures. In ROS, the robot_state_publisher package uses joint state information and the robot description to calculate and publish coordinate transformations between links. These transformations allow robot models to be visualized in applications such as RViz.

URDF models can also be used in simulation environments such as Gazebo. Simulation-specific properties, including contact and friction parameters, may be provided through additional extensions supported by the simulation environment.

Other elements

URDF also includes elements for colours and textures (material) and for the connection between actuators and joints (transmission).

Example

The following example defines a two-link arm with one revolute joint:

<robot name="simple_arm">
  <link name="base_link">
    <visual>
      <geometry><box size="0.2 0.2 0.1"/></geometry>
    </visual>
  </link>
  <link name="arm_link">
    <visual>
      <geometry><cylinder length="0.5" radius="0.03"/></geometry>
    </visual>
  </link>
  <joint name="shoulder" type="revolute">
    <parent link="base_link"/>
    <child link="arm_link"/>
    <origin xyz="0 0 0.05" rpy="0 0 0"/>
    <axis xyz="0 1 0"/>
    <limit lower="-1.57" upper="1.57" effort="10" velocity="1.0"/>
  </joint>
</robot>

Xacro

Writing large URDF files by hand is repetitive, so ROS provides Xacro (XML Macros). Xacro adds macros, variables, mathematical expressions, and file inclusion, and it is expanded into plain URDF before use. This makes it easier to reuse parts of a robot description and to parameterise dimensions.

Software support

URDF is used by many tools in the Robot Operating System ecosystem and beyond, including:

Limitations

See also