Ask Your Question
4

File conversion from *.urdf to *.xacro.

asked 2011-06-13 05:24:54 -0500

PGAM gravatar image

How we can convert a hand-written URDF file to a .xacro file (xml macro for generating URDF files) for robot and world models?

GDSP

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
6

answered 2011-06-13 05:56:50 -0500

mjcarroll gravatar image

updated 2011-06-13 17:47:17 -0500

tfoote gravatar image

There is no official or programmatic way of doing this, as the process is strongly dependent on the platform that you are using.

When converting from a URDF to a xacro file, I did the following:

  • Create properties for commonly-used constants
    • Mathematics constants: M_PI, M_2PI
    • Conversion constants: Radians to Degrees, inches to centimeters
    • Physics constants: Speed of Light, gravity (if needed)
  • Create properties for variable components of your robot (Parts that will be constant over a run, but may change between runs)
    • Wheel Radius
    • Ground Clearance
    • Camera Height/Angle
  • Create macros for arrays of parts on your robot (a good example would be the super-structure of the turtlebot).
  • Create macros for any components that are "mirrored"
    • arms
    • wheels

This would be a good starting point for creating a xacro file, in general.

Edit:

See this tutorial for further details and syntax.

edit flag offensive delete link more
2

answered 2011-06-13 06:45:31 -0500

David Lu gravatar image

Michael's answer covers the strategy well. See this tutorial for further details and syntax.

edit flag offensive delete link more

Comments

Good catch, I forgot that there was an entire tutorial on that.
mjcarroll gravatar imagemjcarroll ( 2011-06-13 07:16:20 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-06-13 05:24:54 -0500

Seen: 2,871 times

Last updated: Jun 13 '11