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

Error reading end tag - Model parsing the xml failed

asked 2017-07-28 17:38:31 -0600

Tonystark124 gravatar image

I am working on a sample exercise of creating an arm robot with 3 links and 2 joints, by defining the urdf file. Am also following the tutorial from Mastering ROS for Robotics Programmin by Lentin Joseph. I have the following code

     <?xml version="1.0"?>
    <robot name="pan_tilt">

    <link name="base_link">
    <visual>
        <geometry>
            <cylinder length="0.01" radius="0.2"/>
        </geometry>
        <origin rpy="0 0 0" xyz="0 0 0"/>
        <material name="yellow">
            <color rgba="1 1 0 1"/>
        </material>
    </visual>
</link>

<joint name="pan_joint" type="revolute">
    <parent link="base_link"/>
    <child link="pan_link"/>
    <origin xyz="0 0 0.1"/>
    <axis xyz="0 0 0"/>
</joint>

<link name="pan_link">
    <visual>
        <geometry>
            <cylindder length="0.4" radius="0,04"/>
        </geomtry>
        <origin rpy="0 0 0" xyz="0 0 0.09"/>
        <material name="red">
            <color rgba="0 0 1 1"/>
        </material>
    </visual>
</link>

<joint name="tilt_joint" type="revolute">
    <parent link="pan_link"/>
    <child link="tilt_link"/>
    <origin xyz="0 0 0.2"/>
    <axis xyz="0 1 0"/>
</joint>

<link name="tilt_link">
    <visual>
        <geometry>
            <cylindder length="0.4" radius="0,04"/>
        </geomtry>
        <origin rpy="0 1.5 0" xyz="0 0 0.0"/>
        <material name="green">
            <color rgba="1 0 0 1"/>
        </material>
    </visual>
</link>
</robot>

while running

    check_urdf pan_tilt.urdf

I get the following error :

    Error:   Error reading end tag.
     at line 72 in /build/buildd/urdfdom-0.2.10+dfsg/urdf_parser/src/model.cpp
    ERROR: Model Parsing the xml failed

The code is straight out of the tutorials. Can you please point out where the mistake is?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2017-07-28 17:57:06 -0600

NEngelhard gravatar image

If you run into these problems, remove parts of your xml-file until you find the segment which causes your problem. (e.g. remove first half, check if error remains and continue in binary-search-style).

With this technique, you can find the errors in your urdf quite fast (geomtry, cylindder, "0,04") which are all just simple typos.

edit flag offensive delete link more

Comments

Thank you for your help. It worked for debug.!

Tonystark124 gravatar image Tonystark124  ( 2017-07-29 02:42:04 -0600 )edit

getting the same error ! how did you resolved it ?

kashifnoori gravatar image kashifnoori  ( 2017-09-26 03:11:22 -0600 )edit
0

answered 2020-01-18 13:03:59 -0600

watch out your end tags. correct them by adding or removing / and you are good to go. i.e <link> </link>

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-07-28 17:38:31 -0600

Seen: 11,557 times

Last updated: Jul 28 '17