ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Trouble with xacro tags without the namespace in ROS Jade

asked 2016-12-28 19:27:03 -0600

Ari.Schneider gravatar image

Hello, Everyone

I am using ROS Jade in Ubuntu 14.04 and trying to run the following command:

rosrun xacro xacro.py `rospack find pr2_description`/robots/pr2.urdf.xacro > pr2.urdf

However I receive the following error message

   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: /opt/ros/jade/share/pr2_description/robots/pr2.urdf.xacro

As the error message itself suggests, I ran the above script in a terminal. When I do it the following message appears:

sed: no input files

After trying to build the pr2.urdf file again I kept receiving the same error message as before.

I also tried to run the command to build the pr2.urdf file as follows:

rosrun xacro xacro --inorder `rospack find pr2_description`/robots/pr2.urdf.xacro > pr2.urdf

Then I receive a error message that says (The same error message is repeated for different .xacro files, so I am ommiting part of the error message for brevity)

inconsistent namespace redefinitions for xmlns:xacro:
 old: http://playerstage.sourceforge.net/gazebo/xmlschema/#interface
 new: http://ros.org/wiki/xacro (/opt/ros/jade/share/pr2_description/urdf/shoulder_v0/shoulder.urdf.xacro)
inconsistent namespace redefinitions for xmlns:xacro:
 old: http://playerstage.sourceforge.net/gazebo/xmlschema/#interface
 new: http://ros.org/wiki/xacro (/opt/ros/jade/share/pr2_description/urdf/upper_arm_v0/upper_arm.urdf.xacro)

I am a new ROS and Ubuntu user, and though I have searched the web for a solution I haven't been able to fix the error on my own.

Would you be able to help me fixing this problem ?

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
2

answered 2017-04-03 18:43:36 -0600

In my case, I had also the following warning:

inconsistent namespace redefinitions for xmlns:xacro:
old: http://www.ros.org/wiki/xacro
new: http://ros.org/wiki/xacro (/home/andreu/dev/ros_ws/src/ensenso_nx/urdf/ensenso_n35.urdf.xacro)

the warning disappeared by setting the url in the top of the xacro file (robot tag) to: "http://www.ros.org/wiki/xacro" instead of just "http://ros.org/wiki/xacro"

Don't ask me why...

edit flag offensive delete link more

Comments

Yeah, that's a silly warning. The formats must all match. Either all http://www.ros.. . or all http://ros.. . So you must have included another xacro file with a different format.

AndyZe gravatar image AndyZe  ( 2017-04-13 16:41:33 -0600 )edit
0

answered 2017-04-03 10:32:10 -0600

AndyZe gravatar image

As the error message itself suggests, I ran the above script in a terminal. When I do it the following message appears...

Did you run that command when you were in the folder where the xacro is located?

edit flag offensive delete link more
0

answered 2017-09-23 07:03:54 -0600

updated 2017-09-23 07:05:43 -0600

I had the same issue, solved it by replacing:

<property name="PI" value="3.1415..." />

with:

<xacro:property name="PI" value="3.1415..." />

but well, the script does it for you:

find . -iname "*.xacro" | xargs sed -i 's#<\([/]\?\)\(if\|unless\|include\|arg\|property\|macro\|insert_block\)#<\1xacro:\2#g'

as suggested by AndyZe and also as suggested by the console error message

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-12-28 19:27:03 -0600

Seen: 5,196 times

Last updated: Sep 23 '17