Ask Your Question
1

XML Parsing Error: prefix not bound to a namespace

asked 2013-02-11 07:51:03 -0500

MartinW gravatar image

updated 2013-02-11 08:00:22 -0500

Hello all,

I'm getting a parsing error with my urdf when I try to run it. it says the error comes from this line <controller:gazebo_ros_time name="gazebo_ros_time" plugin="libgazebo_ros_time.so">

This is the console error upon launch:

Traceback (most recent call last):
  File "/opt/ros/fuerte/stacks/xacro/xacro.py", line 35, in <module>
    xacro.main()
  File "/opt/ros/fuerte/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: unbound prefix: line 795, column 6
Invalid <param> tag: Cannot load command parameter [robot_description]: command [/opt/ros/fuerte/stacks/xacro/xacro.py '/Martin/ros_workspace/learning_urdf/H20_urdf.urdf'] returned with code [1]. 

Param xml is <param command="$(find xacro)/xacro.py '$(find learning_urdf)/H20_urdf.urdf'" name="robot_description"/>

Here is the whole code:

    <gazebo>
     <controller:gazebo_ros_time name="gazebo_ros_time" plugin="libgazebo_ros_time.so">
        <alwaysOn>true</alwaysOn>
        <updateRate>1000.0</updateRate>
        <interface:audio name="dummy_gazebo_ros_time_iface_should_not_be_here"/>
      </controller:gazebo_ros_time>

      <!-- PR2_ACTARRAY -->
      <controller:gazebo_ros_controller_manager name="gazebo_ros_controller_manager" plugin="libgazebo_ros_controller_manager.so">
        <alwaysOn>true</alwaysOn>
        <updateRate>1000.0</updateRate>
        <interface:audio name="gazebo_ros_controller_manager_dummy_iface" />
      </controller:gazebo_ros_controller_manager>
    <turnGravityOff>true</turnGravityOff>

  </gazebo>

EDIT: This code does work when I try to launch this with the gazebo simulator but when I try to launch it with my warehouse planning launch file it gives this crash. Does it have to do with using different time? My warehouse launch file uses But the urdf file specifies this <controller:gazebo_ros_time name="gazebo_ros_time" plugin="libgazebo_ros_time.so">

Hope someone can help, thanks in advance!

Kind Regards, Martin

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-03-14 07:36:05 -0500

This error looks similar to another URDF-parsing issue I was just researching here.

Some of the XML parsers used in ROS are more picky than others about specific URDF syntax. The other issue I linked to was resolved by adding extra xmlns:controller and xmlns:interface attributes that tell the ROS XML parsers how to interpret some of those gazebo tags. Maybe a similar fix could apply to your case.

In the other example, the <gazebo> node also needed to be wrapped in a <robot> node. I am not very familiar with gazebo, so I'm not sure if the XML snippet you provided is just a piece of a larger file, or is the entire URDF file. It certainly is missing most of the common robot-kinematics components of a "normal" URDF file.

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

Stats

Asked: 2013-02-11 07:51:03 -0500

Seen: 1,933 times

Last updated: Mar 14 '13