-
Notifications
You must be signed in to change notification settings - Fork 6
Robot Description
A Unified Robot Description Format (URDF) is a standard ROS XML format for describing a model of a robot. This can include the physical geometry, the kinematic and dynamic properties, and even sensor locations and properties. One of the most fundamental aspects of the URDF is a set of Links and Joints which are uniquely labeled and describe the relationship of all the parts of the robot. For more information on URDF's themselves see the ROS URDF wiki page.
Baxter's URDF is dynamically generated upon boot using xacro and a set of configuration files which generate the appropriate model based on current hardware configuration. This is at a manufacturing level versioning so it is unlikely that your URDF will ever vary.
Baxter's URDF follow a simple overall structure. The base
link is the reference frame from which the rest of the robot is described. Attached to this link is the torso
which is then attached to the head
and two mirror-reflected arms, attached at left_arm_mount
and right_arm_mount
.
Baxter generates the URDF dynamically on initialization, based on the attached arms. In some cases, users may want to get the current URDF off the robot.
From a working Baxter RSDK environment, export the URDF from the /robot_description
parameter on the ROS parameter server where it is stored, to a file of your choice (ex: baxter_urdf.xml
):
$ rosparam get -p /robot_description | tail -n +2 > baxter_urdf.xml
The -p
outputs the parameter using pretty print. The output urdf is piped through the tail
command first to remove a dummy first line - an artifact of the pretty print.
Tip: You can check that you now have a proper URDF by running:
$ rosrun urdf_parser check_urdf baxter_urdf.xml
If this doesn't work, you can just remove the tail command and use a text editor to manually remove the first few lines before the actual xml (all the lines before <?xml version="1.0" ?>
).
$ rosparam get -p /robot_description > baxter_urdf.xml
$ head baxter_urdf.xml
|
<?xml version="1.0" ?>
<!-- =================================================================================== -->
<!-- | This document was autogenerated by xacro from baxterp2.urdf.xacro | -->
...
$ gedit baxter_urdf.xml &
$ head baxter_urdf.xml
<?xml version="1.0" ?>
<!-- =================================================================================== -->
<!-- | This document was autogenerated by xacro from baxterp2.urdf.xacro | -->
...