0
$\begingroup$

Rosanswers logo

I'm trying to do the urdf tutorial http://wiki.ros.org/urdf/Tutorials/Create%20your%20own%20urdf%20file So when i launch rosrun urdfdom check_urdf my_robot.urdf (I'm in groovy) I get this error

Error:   Could not find the 'robot' element in the xml file
         at line 59 in /tmp/buildd/ros-groovy-urdfdom-0.2.8-2precise-20140305-0755/urdf_parser/src/model.cpp
ERROR: Model Parsing the xml failed

However the element robot is there in the first line

<robot name="Mark1">

  <link name="base_link">
    <visual>
      <geometry>
        <box size="0.36 0.376 0.2"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0.7 0 0"/>
      <material name="white">
        <color rgba="1 1 1 1"/>
      </material>
    </visual>
  </link>
  
  <link name="lwheel">
    <visual>
      <geometry>
        <cylinder length="0.028" radius="0.0625"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <material name="black">
        <color rgba="0 0 0 1"/>
      </material>
    </visual>
  </link>
  
  <joint name="base_to_lwheel" type="fixed">
    <parent link="base_link"/>
    <child link="lwheel"/>
    <origin xyz="0 0.162 0" rpy="-1.5708 0 0"/>
  </joint>
  
  <link name="rwheel">
    <visual>
      <geometry>
        <cylinder length="0.028" radius="0.0625"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <material name="black">
        <color rgba="0 0 0 1"/>
      </material>
    </visual>
  </link>
  
  <joint name="base_to_rwheel" type="fixed">
    <parent link="base_link"/>
    <child link="rwheel"/>
    <origin xyz="0 -0.162 0" rpy="1.5708 0 0"/>
  </joint>
  
  <link name="laser">
    <visual>
      <geometry>
        <box size="0.015 0.045 0.015"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0.022 0 0.015"/>
      <material name="black">
        <color rgba="0 0 0 1"/>
      </material>
    </visual>
  </link>
  
  <joint name="base_to_scanner" type="fixed">
    <parent link="base_link"/>
    <child link="laser"/>
    <origin xyz="0.2 0 0.6125" rpy="0 0 0"/>

  
</robot>

Originally posted by Moda on ROS Answers with karma: 133 on 2014-07-28

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

It looks like your final <joint> tag is missing its close tag - perhaps that's preventing the XML parser from parsing the file properly?


Originally posted by ahendrix with karma: 47576 on 2014-07-28

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by Moda on 2014-07-29:
It works!!! Thank you

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.