Ask Your Question
11

how to convert xacro file to urdf file?

asked 2011-06-27 01:34:33 -0600

mhossameldin gravatar image

i wanna know the command used to convert xacro file to pure urdf file ,

Thanks for ur help

edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted
11

answered 2014-10-09 14:54:22 -0600

fivef gravatar image

updated 2017-03-20 11:03:45 -0600

VictorLamoine gravatar image

Better use the command as intendet:

rosrun xacro xacro --inorder -o model.urdf model.urdf.xacro

A proper xml will be generated with a banner saying that the file was auto generated and should not be edited.

edit flag offensive delete link more
20

answered 2011-06-27 01:45:08 -0600

rosrun xacro xacro.py model.xacro > model.urdf
edit flag offensive delete link more
2

answered 2017-07-03 04:29:13 -0600

In the most recent versions, xacro.py is deprecated, so something like the following works:

rosrun xacro xacro --inorder model.urdf.xacro > model.urdf
edit flag offensive delete link more
0

answered 2011-06-28 20:50:39 -0600

amix gravatar image

Hello,

I tried this command but nothing happened. A file is created on the same directories.

rosrun xacro xacro.py arm.urdf.xacro > arm.urdf

is their something wrong with this command

edit flag offensive delete link more

Comments

1
there is nothing wrong with your command. If arm.urdf.xacro contains the xacro macros, arm.urdf should have the corresponding expanded xml's. If you have more detailed question, please post arm.urdf.xacro and the resulting arm.urdf.
hsu gravatar imagehsu ( 2011-06-29 05:45:47 -0600 )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

3 followers

Stats

Asked: 2011-06-27 01:34:33 -0600

Seen: 20,780 times

Last updated: Jul 03 '17