robot_model: collada_parser | collada_urdf | colladadom | convex_decomposition | ivcon | kdl_parser | resource_retriever | robot_state_publisher | simmechanics_to_urdf | srdf | urdf | urdf_interface | urdf_parser

Package Summary

This package contains a C++ parser for the Unified Robot Description Format (URDF), which is an XML format for representing a robot model. The code API of the parser has been through our review process and will remain backwards compatible in future releases.

Overview

This package contains the specification for the XML robot description format (URDF) and a C++ parser to read the corresponding URDF XML files.

Unified Robot Description Format (URDF)

For a complete specification, please see the URDF XML reference. There is also a tutorial that teaches how to create your own URDF.

We also developed a macro language called xacro to make it easier to maintain the robot description files, increase their readability, and to avoid duplication in the robot description files.

URDF Parser

The URDF parser creates a C++ representation of a robot that is easy to browse through. For more details, take a look at the code API.

URDF Validator

The package includes the command line tool check_urdf1. It's called with a single command line argument naming a file. It attempts to parse the file as a URDF description, and either prints a description of the resulting kinematic chain, or an error message.

link.png

Tutorials

There are a variety of tutorials to help you get started learning create and use URDF files.

Examples

PR2 Robot

The complete PR2 URDF can be found in the ROS package containing PR2 robot model XML URDF files under the name pr2.urdf.xacro. To obtain the fully expanded PR2 URDF (pr2.urdf), run

  • rosrun xacro xacro.py `rospack find pr2_description`/robots/pr2.urdf.xacro -o /tmp/pr2.urdf

To test the URDF parser, run1

  • $ rosrun urdf check_urdf /tmp/pr2.urdf
    and you should see something resembling:
    robot name is: pr2
    ---------- Successfully Parsed XML ---------------
    root Link: base_footprint has 1 child(ren)
        child(1):  base_link
            child(1):  base_laser_link
            child(2):  bl_caster_rotation_link
                child(1):  bl_caster_l_wheel_link
                child(2):  bl_caster_r_wheel_link
            child(3):  br_caster_rotation_link
                child(1):  br_caster_l_wheel_link
                child(2):  br_caster_r_wheel_link
            child(4):  fl_caster_rotation_link
                child(1):  fl_caster_l_wheel_link
                child(2):  fl_caster_r_wheel_link
            child(5):  fr_caster_rotation_link
                child(1):  fr_caster_l_wheel_link
                child(2):  fr_caster_r_wheel_link
            child(6):  torso_lift_link
                child(1):  head_pan_link
                    child(1):  head_tilt_link
                        child(1):  head_plate_frame
                            child(1):  sensor_mount_link
                                child(1):  double_stereo_link
                                    child(1):  narrow_stereo_link
     ...

Other Examples

See this page for more examples of URDF files.

Graphviz

To get a graphviz diagram of your urdf file, do this:

$ rosrun urdf urdf_to_graphiz /tmp/pr2.urdf

Or starting with Electric Turtle, do:

$ rosrun urdf_parser urdf_to_graphiz /tmp/pr2.urdf

Known Issues

  • Sensor model information is not included (except in gazebo extensions for simulated sensors).

  1. For Diamondback and earlier releases, check_urdf script is in urdf, starting Electric Turtle, it's moved into urdf_parser (1 2)

Wiki: urdf (last edited 2011-07-22 04:03:08 by hsu)