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

Create urdf file "check_urdf" cannot check the urdf file

asked 2019-11-28 11:07:23 -0500

dhaour9x gravatar image

when i key in check_urdf mybot.urdf, the terminal shows the message like that :

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

my system is Ubuntu 16.04, ROS version is kinetic

mybot.urdf

<robot name="turtlebot_nano">
    <link name="base_link" />
    <link name="right_back_wheel_link" />
    <link name="left_back_wheel_link" />
    <link name="right_front_wheel_link" />
    <link name="left_front_wheel_link" />
    <link name="lidar_link" />
    <link name="camera_link" />


    <joint name="joint1" type="continuous">
        <parent link="base_link"/>
        <child link="right_back_wheel_link">
    </joint>

    <joint name="joint2" type="continuous">
        <parent link="base_link"/>
        <child link="left_back_wheel_link"/>
    </joint>

    <joint name="joint3" type="continuous">
        <parent link="base_link"/>
        <child link="right_front_wheel_link"/>
    </joint>

    <joint name="joint4" type="continuous">
        <parent link="base_link"/>
        <child link="left_front_wheel_link"/>
    </joint>

    <joint name="joint5" type="continuous">
        <parent link="base_link"/>
        <child link="lidar_link"/>
    </joint>

    <joint name="joint6" type="continuous">
        </parent link="base_link"/>
        <child link="camera_link">
    </joint>
</robot>
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-11-28 11:38:55 -0500

gvdhoorn gravatar image

updated 2019-11-28 11:40:13 -0500

It actually has checked your urdf in a way:

Error:   Error reading end tag.

the error message is a bit terse, but we see this in your joint6:

<joint name="joint6" type="continuous">
    </parent link="base_link"/>
    <child link="camera_link">
</joint>

Note </parent link="base_link"/> and <child link="camera_link">.

The first starts with </ which is invalid, and the second ends with > but has no child elements, nor a closing </child>.

This is not valid XML, hence the error message.


Edit: joint1 also has a problem:

<child link="right_back_wheel_link">

again no closing element.

edit flag offensive delete link more

Comments

I checked often, thanks

dhaour9x gravatar image dhaour9x  ( 2019-11-28 15:34:11 -0500 )edit

I'm not sure I understand.

Have you been able to correct the mistakes and make check_urdf run correctly now?

gvdhoorn gravatar image gvdhoorn  ( 2019-11-28 15:47:00 -0500 )edit

it works, thank yo

dhaour9x gravatar image dhaour9x  ( 2019-11-28 15:52:31 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2019-11-28 11:07:23 -0500

Seen: 668 times

Last updated: Nov 28 '19