From sdk-wiki
Revision as of 13:20, 18 November 2014 by Imcmahon (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The Unified Robot Description Format (URDF) is the standard ROS XML representation of the robot model (kinematics, dynamics, sensors) describing Baxter

Baxter generates his URDF dynamically on robot startup. This model is updated when any gripper is attached or detached, an object is 'grasped' or released and its mass is compensated for, and when new urdf segments are provided/commanded to the gripper plugins. As of SDK versions >= 1.0.0 Baxter's internal robot model, is loaded to the parameter server on the topic /robot_description

The default URDF for Baxter is available in the baxter_common repository. The package baxter_description contains the URDF and accompanying meshes.

Getting a Copy of the URDF from the parameter server

You can now get the current URDF describing your Baxter.

From a properly initialized Baxter 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 urdfdom check_urdf baxter_urdf.xml

Robot State Publisher

The URDF is used by Baxter's Robot State Publishers to create a tree of transforms (tfs). In fact, Baxter has two of such publishers:

  • robot_ref_publisher: publishes transforms that reflect the commanded robot state
  • robot_state_publisher: publishes transforms that reflect the measured state of the robot

These robot publishers live internal to Baxter and are accessible to the RSDK over ROS. The "ref" tfs are used by the robot internals, but you may find them useful to see where the robot will move at the next timestep. Otherwise, be sure to use the non-"ref" transforms if you're only interested in the Baxter's current state.