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

Failed to build tree: child link of joint not found

asked 2020-03-31 09:46:51 -0500 gravatar image

updated 2022-06-05 11:37:26 -0500

lucasw gravatar image

I wrote an xacro file with the UR10 robotic arm, and after checking with check_urdf, I got such an error.

Failed to build tree: child link [laser_link] of joint [laser_joint] not found at line 226 in /build/urdfdom-UJ3kd6/urdfdom-0.4.1/urdf_parser/src/model.cpp ERROR: Model Parsing the xml failed

Here is the content of my XACRO file. Is there something wrong?

<?xml version="1.0"?>
  <robot xmlns:xacro="" name="transforrobotdxp" >
     <xacro:include filename="$(find ur_description)/urdf/common.gazebo.xacro" />
     <xacro:include filename="$(find ur_description)/urdf/ur10.urdf.xacro" />
     <xacro:include filename="$(find laser_dxp)/urdf/laserdxp.xacro" />

     <xacro:ur10_robot prefix="" joint_limited="false"/>
     <link name="world" />
     <joint name="world_joint" type="fixed">
          <parent link="world" />
          <child link = "base_link" />
          <origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0" />
     <joint name="laser_joint" type="fixed">
          <parent link="wrist_3_link" />
          <child link = "laserlink" />
          <origin xyz="0.07 0.17 -0.03" rpy="1.57079633 0.0 0.0" />

thank you very much!

Here is the laserdxp file.Base_link is defined in the ur10.urdf.xacro file.

<?xml version="1.0"?>
 <robot name="laser_dxp_robot" xmlns:xacro="">
   <link name="laserlink">
          <origin xyz="-0.024229 0.03372 0.042379"  rpy="0 0 0" />
          <mass   value="0.44314" />
                izz="0.00084677" />
              <origin xyz="0 0 0"  rpy="1.5707963267949 0 0" />
                 <mesh   filename="package://laser_dxp/meshes/laser_dxp.STL" />
              <material  name="">
                 <color  rgba="0.98824 0.98431 1 1" />
                 <!--texture   filename="package://laser_dxp/textures/" /-->
              <origin  xyz="0 0 0"  rpy="1.5707963267949 0 0" />
                  <mesh    filename="package://laser_dxp/meshes/laser_dxp.STL" />
edit retag flag offensive close merge delete


Hi could you share the laserdxp.xacro and ur10.xacro to help you with the debugging? The base_link child was probably defined in the ur10_robot but the laser_link may not have been defined in the laserdxp.xacro.

hashirzahir gravatar image hashirzahir  ( 2020-03-31 10:29:05 -0500 )edit

I have shown my laserdxp.xacro file. Thank you. gravatar image  ( 2020-03-31 18:16:31 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2020-03-31 10:25:23 -0500

gvdhoorn gravatar image

updated 2020-04-01 02:45:00 -0500

How does xacro:laserdxp use the prefix parameter?

You refer to a link called laser_link (child of your laser_joint), but you only specify the prefix laser (note: no _ in prefix="laser").

So if xacro:laserdxp does something like this:

<link name="${prefix}link" />

then the name of the link in the end will be laserlink, not laser_link (note the _ again).

Edit: based on this:

<?xml version="1.0"?>
<robot name="laser_dxp_robot" xmlns:xacro="">
  <link name="laserlink">

it looks like laserdxp.xacro doesn't actually contain a xacro:macro.

You also seem to have removed the <xacro:laserdxp prefix="laser"/> instantation from your top-level xacro.

Could you please confirm whether this is an accurate representation of the files you have?

edit flag offensive delete link more


I have shown my laserdxp.xacro file.Is there anything wrong? Thank you. gravatar image  ( 2020-03-31 18:16:53 -0500 )edit

As gvdhoorn has mentioned, can you check if "laser_link" has been defined anywhere? I could only find "laserlink" in your xacro file and hence your error message. Can you confirm if your error message is exactly the same or has it changed?

hashirzahir gravatar image hashirzahir  ( 2020-04-13 06:37:42 -0500 )edit

Question Tools

1 follower


Asked: 2020-03-31 09:46:51 -0500

Seen: 3,177 times

Last updated: Apr 01 '20