Ask Your Question
7

xacro problem: Invalid <param> tag: Cannot load command parameter [robot_description]

asked 2014-01-24 04:02:54 -0600

saina110 gravatar image

updated 2014-04-20 14:09:35 -0600

ngrennan gravatar image

Just like the topic I posed, when I try to use roslaunch command to run in the terminal, I met this problem (as followed):

Invalid <param> tag: Cannot load command parameter [robot_description]: command [/opt/ros/groovy/stacks/xacro/xacro.py '/home/viki/ros_workspace/smartcar_description/urdf/smartcar.urdf.xacro'] returned with code [1]. 

Param xml is <param command="$(arg urdf_file)" name="robot_description"/>

I have no idea how to solve this problem, I sincerely you could give the instructions about how to solve this problem.

Thanks so much for your time.

when I run the code rosrun xacro xacro.py /home/viki/ros_workspace/smartcar_description/urdf/smartcar.urdf.xacro to check the xacro, there is the information showed as followed:

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/groovy/stacks/xacro/xacro.py", line 35, in <module>
    xacro.main()
  File "/opt/ros/groovy/stacks/xacro/src/xacro.py", line 542, in main
    doc = parse(f)
  File "/usr/lib/python2.7/xml/dom/minidom.py", line 1920, 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: junk after document element: line 197, column 0

Can you give me some information about how to solve the problem?

Thanks so much!

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
7

answered 2014-01-24 04:46:36 -0600

Your xacro file (smartcar.urdf.xacro) is invalid; just run the command that's mentioned above from the command line and look at the error messages in the output:

rosrun xacro xacro.py /home/viki/ros_workspace/smartcar_description/urdf/smartcar.urdf.xacro

Once you've fixed your xacro file, everything should be fine.

If you can't find the bug, please update your question with a link to your xacro file (use the "edit" button).

edit flag offensive delete link more

Comments

when I use the command you recommended, it showed like above( I added in my question), but I don't quite know how to fix it......how can I edit my xacro file?

saina110 gravatar imagesaina110 ( 2014-01-25 09:46:26 -0600 )edit

1. Open the file in a text editor. 2. Go to line 197 (as the error message said) and figure out why it's not valid XML. 3. If you want more help, upload that file somewhere.

Martin Günther gravatar imageMartin Günther ( 2014-01-26 21:10:44 -0600 )edit

thanks so much, I think I solved this problem, cause I didn't split my file into 3 parts...thanks again

saina110 gravatar imagesaina110 ( 2014-01-27 09:25:39 -0600 )edit

can you tell please what do you mean by "split my file into 3 parts"? because I have the same problem and don't know how to modify lines of codes where errors occured.

Tahir Miriyev gravatar imageTahir Miriyev ( 2017-08-06 03:41:08 -0600 )edit
0

answered 2016-09-04 16:47:15 -0600

May be you need some packages. For example I have same error like you. But after installing turtlebot packages, this error is correct

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

2 followers

Stats

Asked: 2014-01-24 04:02:54 -0600

Seen: 17,320 times

Last updated: Sep 04 '16