Ask Your Question
0

ERROR: Model Parsing the xml failed

asked 2017-07-26 12:22:46 -0500

raf4343 gravatar image

updated 2017-07-26 12:28:27 -0500

lucasw gravatar image

Hello,

I am trying to create urdf file for the UR5 arm with the Barrett Hand end-effector. I have created this file:

<?xml version="1.0"?>
<robot xmlns:xacro="http://wiki.ros.org/xacro" name="ur5_bh" >
  <!-- include urdfs -->
  <xacro:include filename="$(find ur_description)/urdf/ur5.urdf.xacro"/>
  <xacro:include filename="$(find barret_hand_description)/urdf/bh280.urdf.xacro" />

  <!-- create the robot + bh combo itself as a macro -->
  <xacro:macro name="ur5_with_bh" params="prefix">

    <!-- instantiate -->
    <xacro:ur5 prefix="${prefix}robot_" />
    <xacro:bh      prefix="${prefix}ee_" />

    <!-- attach eef to M-10iA model -->
    <!-- Note: this assumes that the 'bh' macro defines a 'base_link'
        link which is the start of it's kinematic chain (if any) -->
      <!-- tool0 frame -->
  <link name="tool0" />
  <joint name="ee_tool" type="fixed">
    <parent link="_base_link"/>
    <child link="tool0"/>
    <origin xyz="0.0 0.0 0.0205" rpy="0.0 ${-pi/2} 0.0"/>
  </joint>

  </xacro:macro>
</robot>

When I run "check_urdf /home/ros/cats_ws/src/universal_robot/ur_bh/src/ur5_barret.urdf.xacro" It return this error:

Error:   No link elements found in urdf file
         at line 180 in /build/buildd/urdfdom-0.2.10+dfsg/urdf_parser/src/model.cpp
ERROR: Model Parsing the xml faile

Does anybody know how to solve this problem?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-07-26 15:55:56 -0500

gvdhoorn gravatar image

Your xacro file only defines a macro, it never instantiates it.

So xacro evaluates your file, and since no macro is ever called, it is empty.

This is also hinted at in the tutorial you got this from (here):

By wrapping the new composite structure itself in a macro, it can be instantiated in much the same way as the original M-10iA macro.

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

1 follower

Stats

Asked: 2017-07-26 12:22:46 -0500

Seen: 1,416 times

Last updated: Jul 26 '17