ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Some problems of conversion of xacro to urdf

asked 2017-04-18 10:22:30 -0600

cloud1980_cn gravatar image

updated 2017-04-18 11:49:50 -0600

Hi,everyone. I'm reading the book《mastering ros robotics programming》,and in chapter 2 I'm meeting some problems when I try to convert the xacro file to urdf file in the demo "seven_dof_arm".

My system is Ubuntu 16.04 & Ros Kinetic.

The xacro file and it's incluing sensor file are downloaded from

When I run the command rosrun xacro seven_dof_arm.xacro > seven_dof_arm.urdf

the terminal shows:

xacro: Traditional processing is deprecated. Switch to --inorder processing!
To check for compatibility of your document, use option --check-order.
For more infos, see
inconsistent namespace redefinitions for xmlns:xacro:
new: (/home/dd/catkin_workspace/src/mastering_ros_robot_description_pkg/urdf/sensors/xtion_pro_live.urdf.xacro)
deprecated: xacro tags should be prepended with 'xacro' xml namespace.
Use the following script to fix incorrect usage:
find . -iname "*.xacro" | xargs sed -i 's#<([/]\?)(if\|unless\|include\|arg\|property\|macro\|insert_block)#<\1xacro:\2#g'
when processing file: seven_dof_arm.xacro

unknown macro name: xacro:base
XacroException(u'unknown macro name: xacro:base',)
when processing file: seven_dof_arm.xacro

Can anyone help me ? Thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2017-04-19 18:55:12 -0600

Geoff gravatar image

The xacro macro base is not defined in that xacro file nor in any file that it includes. I did a quick search of the source in that repository and I couldn't find a macro named base defined anywhere. I don't have the book you mentioned, but perhaps it instructs you to use a package from somewhere else that defines that macro? Even if it does, the seven_dof_arm.xacro file would need to include the file defining the base macro for it to work.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools


Asked: 2017-04-18 10:22:30 -0600

Seen: 1,172 times

Last updated: Apr 19 '17