Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Error with xacro.py [robot_description]

Hi, I am trying to get through a tutorial "Building a Visual Robot Model with URDF from Scratch". I got a problem like this:

Invalid <param> tag: Cannot load command parameter [robot_description]: command [/opt/ros/indigo/share/xacro/xacro.py urdf/01-myfirst.urdf] returned with code [1]. 

Param xml is <param command="$(find xacro)/xacro.py $(arg model)" name="robot_description"/>
The traceback for the exception was written to the log file

everytime if I want to launch urdf file like this:

roslaunch urdf_tutorial display.launch model:=urdf/01-myfirst.urdf

I have checked the xacro.py file (at least I think so) and this is what i get:

Expat parsing error.  Check that:
 - Your XML is correctly formed
 - You have the xacro xmlns declaration: xmlns:xacro="http://www.ros.org/wiki/xacro"

Traceback (most recent call last):
  File "/opt/ros/indigo/share/xacro/xacro.py", line 62, in <module>
    xacro.main()
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xacro/__init__.py", line 676, in main
    doc = parse(f)
  File "/usr/lib/python2.7/xml/dom/minidom.py", line 1918, in parse
    return expatbuilder.parse(file)
  File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 928, in parse
    result = builder.parseFile(file)
  File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 207, in parseFile
    parser.Parse(buffer, 0)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 1, column 1

Could anyone help me? I would be very grateful.