This article's lead section may be too short to adequately summarize the key points. (September 2024) |
| URDF | |
|---|---|
| Filename extension |
.URDF |
| Developed by | Robot Operating System |
| Type of format | XML |
| Website | wiki |
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.
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:
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:
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.
URDF also includes elements for colours and textures (material) and for the connection between actuators and joints (transmission).
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>
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.
URDF is used by many tools in the Robot Operating System ecosystem and beyond, including: