Skip to content

HowTo Main

rethink-rsl edited this page Jan 23, 2013 · 4 revisions

Placeholder for How To's/Tips/Tricks/etc.

URDF & more

Getting a Static Copy of the URDF

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 > baxter_urdf.xml

The -p outputs the parameter using pretty print. You may need to open up a text editor to remove the first few lines before the actual xml (all the lines before <?xml version="1.0" ?>).

$ 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            | -->  
...  

Tip: You can check that you now have a proper URDF by running:

$ rosrun urdf_parser check_urdf new_urdf.xml

Clone this wiki locally