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

Error with [robot_description]

asked 2016-11-15 14:43:05 -0500

Cayero gravatar image

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/ urdf/01-myfirst.urdf] returned with code [1]. 

Param xml is <param command="$(find xacro)/ $(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 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=""

Traceback (most recent call last):
  File "/opt/ros/indigo/share/xacro/", line 62, in <module>
  File "/opt/ros/indigo/lib/python2.7/dist-packages/xacro/", line 676, in main
    doc = parse(f)
  File "/usr/lib/python2.7/xml/dom/", line 1918, in parse
    return expatbuilder.parse(file)
  File "/usr/lib/python2.7/xml/dom/", line 928, in parse
    result = builder.parseFile(file)
  File "/usr/lib/python2.7/xml/dom/", 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.

edit retag flag offensive close merge delete


Oh, I used to get similar errors. Please, check this (link). Maybe it is helpful.

Abdul Mannan gravatar image Abdul Mannan  ( 2016-11-15 23:03:05 -0500 )edit

What is on "line 1, column 1" in 01-myfirst.urdf?

gvdhoorn gravatar image gvdhoorn  ( 2016-11-16 03:58:45 -0500 )edit

This is on line 1 in that file.

<?xml version="1.0"?>

Without quotation marks and spaces

Cayero gravatar image Cayero  ( 2016-11-16 16:11:57 -0500 )edit

If you can make the urdf available somewhere (Github gist, somewhere else) we can take a look. Could be an encoding issue or something else.

Just to get it out of the way: the current working directory when you roslaunch .. is the urdf_tutorial package, right?

gvdhoorn gravatar image gvdhoorn  ( 2016-11-17 02:02:58 -0500 )edit

I took the urdf file from this github

Yes that's right.

Cayero gravatar image Cayero  ( 2016-11-17 13:54:50 -0500 )edit

And how exactly did you download it? git clone .. or some other way?

gvdhoorn gravatar image gvdhoorn  ( 2016-11-17 14:51:33 -0500 )edit

I just created urdf file and then copied the code

Cayero gravatar image Cayero  ( 2016-11-19 09:36:51 -0500 )edit

Did you include the line numbers? Or did you copy the raw file?

gvdhoorn gravatar image gvdhoorn  ( 2016-11-19 09:59:22 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-06-27 01:33:17 -0500

MOYMOY gravatar image

I think that the launch file should be launched on the urdf_tutorial directory.

edit flag offensive delete link more


It worked. Thank you.

iceberg gravatar image iceberg  ( 2022-06-17 00:03:55 -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

1 follower


Asked: 2016-11-15 14:43:05 -0500

Seen: 6,752 times

Last updated: Jun 27 '19