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

urdf beginner error

asked 2012-02-02 00:25:32 -0500

Patrick gravatar image

updated 2012-02-05 23:58:10 -0500

In the first tutorial, for 'creating a urdf file'. On part 2 on creating the tree structure. I saved the xml as advised. Then 'rosmake urdf_parser' it compiles without any errors. Then after when i run the 'rosrun urdf_parser check_urdf my_urdf.xml' line.

the following error occurs :

Could not find the 'robot' element in the xml file

ERROR: Model Parsing the xml failed

If anyone has any ideas for what i could do, i would very grateful.

edit retag flag offensive close merge delete

7 Answers

Sort by » oldest newest most voted
0

answered 2012-02-05 23:59:47 -0500

Patrick gravatar image

Thank you both for your help, ive updated my ubuntu and using a different text editor and the error does not appear.

edit flag offensive delete link more
2

answered 2012-06-25 13:16:33 -0500

Prashant gravatar image

Hi,

I had a similar problem like yours. I just gave the whole path of the file instead of just the file name and it worked fine.

edit flag offensive delete link more

Comments

thanks, it works

karen0603 gravatar image karen0603  ( 2014-03-12 10:23:25 -0500 )edit
1

answered 2012-02-02 02:12:47 -0500

michikarg gravatar image

Seems like your XML-file causes an error... is it the same one as in the tutorial?

edit flag offensive delete link more
0

answered 2012-02-03 01:18:55 -0500

Patrick gravatar image

updated 2012-02-03 01:19:39 -0500

Yes i am using the exact same code in the tutorial, i realised i posted just part of the error.

Could not find the 'robot' element in the xml file ERROR: Model Parsing the xml failed

it seems its picking up the file but cant decipher the robot element. If you have any ideas of what i can do, i would be grateful.

edit flag offensive delete link more

Comments

Hmm this is strange.... and you´r esure you have a robot-tag in the urdf? e.g. <robot name="test_robot"> (...) </robot> and there´s no typo in it?
michikarg gravatar image michikarg  ( 2012-02-03 01:54:44 -0500 )edit
0

answered 2012-08-06 02:55:49 -0500

Nachum gravatar image

Hi I am having the same problem. can you please write exactly what you wrote that did work? thanks

edit flag offensive delete link more
0

answered 2012-08-07 15:30:53 -0500

Prashant gravatar image

my URDF file was in a different folder than the parser. So I changed the command slightly as given below:

prashanta@prashanta-laptop:~/ros_workspace/learning_urdf$ ./bin/parser /home/prashanta/ros_workspace/models/my_urdf.xml

I hope this helps.

edit flag offensive delete link more
0

answered 2012-02-03 02:41:36 -0500

Patrick gravatar image

updated 2012-02-03 02:53:28 -0500

<robot name="simple_box">
  <link name="my_box">
    <inertial>
      <origin xyz="2 0 0" /> 
      <mass value="1.0" />
      <inertia  ixx="1.0" ixy="0.0"  ixz="0.0"  iyy="100.0"  iyz="0.0"  izz="1.0" />
    </inertial>
    <visual>
      <origin xyz="2 0 0"/>
      <geometry>
        <box size="1 1 2" />
      </geometry>
    </visual>
    <collision>
      <origin xyz="2 0 0"/>
      <geometry>
        <box size="1 1 2" />
      </geometry>
    </collision>
  </link>
  <gazebo reference="my_box">
    <material>Gazebo/Blue</material>
  </gazebo>
</robot>
edit flag offensive delete link more

Comments

thats the code, it doesn't come up with the proper format but its been copied exactly from the website, ive tried the tutorial on numerous computers in the lab and they are all come up with the same result.
Patrick gravatar image Patrick  ( 2012-02-03 02:43:55 -0500 )edit
Works perfectly for me. BTW, please edit/update your question instead of posting additional info as answers to your own question.
Martin Günther gravatar image Martin Günther  ( 2012-02-03 02:55:59 -0500 )edit
What version of ubuntu are you running? in all the computers, ive tested it on have been 10.04? Dont know if that will make a difference. yeh ill update it, this is the first time ive posted a question.
Patrick gravatar image Patrick  ( 2012-02-04 02:14:03 -0500 )edit

Question Tools

Stats

Asked: 2012-02-02 00:25:32 -0500

Seen: 5,245 times

Last updated: Aug 07 '12