Ask Your Question
0

Failed to build tree: child link of joint not found

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

dxp397@foxmail.com gravatar image

updated 2020-03-31 18:15:49 -0500

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="http://wiki.ros.org/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>
     <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" />
     </joint>
</robot>

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="http://wiki.ros.org/xacro">
   <link name="laserlink">
           <inertial>
          <origin xyz="-0.024229 0.03372 0.042379"  rpy="0 0 0" />
          <mass   value="0.44314" />
          <inertia
            ixx="0.00073152"
                ixy="-1.4067E-05"
            ixz="0.00022716"
            iyy="0.00097117"
                iyz="-5.6484E-05"
                izz="0.00084677" />
           </inertial>
           <visual>
              <origin xyz="0 0 0"  rpy="1.5707963267949 0 0" />
          <geometry>
                 <mesh   filename="package://laser_dxp/meshes/laser_dxp.STL" />
              </geometry>
              <material  name="">
                 <color  rgba="0.98824 0.98431 1 1" />
                 <!--texture   filename="package://laser_dxp/textures/" /-->
              </material>
           </visual>
           <collision>
              <origin  xyz="0 0 0"  rpy="1.5707963267949 0 0" />
              <geometry>
                  <mesh    filename="package://laser_dxp/meshes/laser_dxp.STL" />
              </geometry>
           </collision>
</link>
 </robot>
edit retag flag offensive close merge delete

Comments

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.

dxp397@foxmail.com gravatar image dxp397@foxmail.com  ( 2020-03-31 18:16:31 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

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="http://wiki.ros.org/xacro">
  <link name="laserlink">
    [..]
  </link>
</robot>

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

Comments

I have shown my laserdxp.xacro file.Is there anything wrong? Thank you.

dxp397@foxmail.com gravatar image dxp397@foxmail.com  ( 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

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: 2020-03-31 09:46:51 -0500

Seen: 159 times

Last updated: Apr 01