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

Failed to build tree: child link [base_laser_mount] of joint [laser_mount_joint] not found

asked 2020-06-05 20:32:32 -0500

ildaniel gravatar image

Hi, I'm trying to get the husky robot simulation up and running with https://github.com/husky/husky

I've installed all the necessary packages, but upon calling

roslaunch husky_gazebo husky_empty_world.launch

I am met with the following error

ERROR] [1591406797.536308608]: Failed to build tree: child link [base_laser_mount] of joint [laser_mount_joint] not found

I believe it's talking about this following bit of code, husky.urdf.sacro in husky_description

  <xacro:if value="$(arg laser_enabled)">

    <sick_lms1xx_mount prefix="base"/>

    <sick_lms1xx frame="base_laser" topic="scan" robot_namespace="$(arg robot_namespace)"/>

    <joint name="laser_mount_joint" type="fixed">
      <origin xyz="$(arg laser_xyz)" rpy="$(arg laser_rpy)" />
      <parent link="top_plate_link" />
      <child link="base_laser_mount" />
    </joint>

  </xacro:if>

However, I'm not sure where base_laser_mount isn't defined, especially because I didn't tamper with the files from the github.

edit retag flag offensive close merge delete

Comments

Hi @ildaniel,

Have you changed something in the repository, because I have cloned it, launched the simulation and there were no errors in the process. That is weird.

Actually, I have a proper tf_tree that connects top_plate_link --> base_laser_mount --> base_laser.

Weasfas gravatar image Weasfas  ( 2020-06-06 06:13:26 -0500 )edit

Thanks for your response. Could this be because I'm runnning Ubuntu 20.04 LTS and ROS Noetic? I grabbed the melodic-devel branch from github. And just to be clear about what I'm doing I cloned the github contents into ~/husky_ws/src/

cd ~/husky_ws/
catkin_make
source ~/husky_ws/devel/setup.bash/
roslaunch husky_gazebo husky_clear_world.launch

and then I run into missing resources such as

resource not found: lms1xx

which I install, but then there's always another error it seems like. Could this be a fundamental problem with my ROS installation or how I'm calling things above?

ildaniel gravatar image ildaniel  ( 2020-06-06 11:43:05 -0500 )edit

Well, I do not know if there is an issue regarding the ROS distribution, but I think it should not be a problem of compatibility. But, what I did is cloning both repos, the one containing the husky_description and the one with the lms1xx_description, sourced the workspace and launched with roslaunch husky_gazebo husky_empty_world.launch. Then no error appears. As a way of "debugging" what is happening you could just run a virtual enviroment with a ROS Noetic/Melodic and try to reproduce your steps. By the way, how you installed the lms1xx package? from apt? lms1xx repository contains a Noetic branch, but the xacro file you are using: sick_lms1xx.urdf.xacro is the same as the one Melodic uses, so it is compatible with the Melodic branch of husky description.

Weasfas gravatar image Weasfas  ( 2020-06-06 14:40:59 -0500 )edit

So I tried following the steps on a different machine on 18.04.4 LTS and ROS Melodic and found no issues. Maybe I unknowingly completed the steps in a different way, but regardless this allowed me to get through it. Thank you for your help!

ildaniel gravatar image ildaniel  ( 2020-06-07 13:39:40 -0500 )edit

Great!, glad I helped you. Cheers

Weasfas gravatar image Weasfas  ( 2020-06-08 04:15:42 -0500 )edit

Hello @ildaniel ! I have the same problem. Were you able to solve the problem in Ros Noetic? Thanks!

marihm gravatar image marihm  ( 2020-07-11 23:17:12 -0500 )edit

I'm using ROS Melodic, but the following steps should work smoothly, let me know if they do:

cd
mkdir -p test_ws/src
cd test_ws/src
git clone https://github.com/husky/husky
cd ~/test_ws
rosdep install --from-paths src --ignore-src -r -y
catkin_make
source ~/test_ws/devel/setup.bash
roslaunch husky_gazebo husky_empty_world.launch

After installing all necessary dependencies I've recovered from many issues

ildaniel gravatar image ildaniel  ( 2020-07-12 12:08:51 -0500 )edit

Thanks for your answer! I had no luck, same error appears despite I had followed your suggestion. I have looked into the .xacro files and everything seems to be ok, the base_laser_mount link is defined in the sick_lms1xx.urdf.xacro file which is located in lms1xx/urdf. I have just commented the lines which defines the laser links and joints in the husky.urdf.xacro file and I have managed to load Husky in Gazebo without the laser. I think it has something to do with ROS Noetic because I have also been working with ROS Melodic and I didn't have any problems.

marihm gravatar image marihm  ( 2020-07-12 23:28:06 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
4

answered 2020-10-29 14:57:11 -0500

updated 2021-01-10 09:35:18 -0500

This error seems to arise only on noetic:

First of all, if you want to simulate Husky in Gazebo, make sure you clone hector_gazebo_plugins, husky_gazebo, husky_control, husky_description, LMS1xx and interactive_marker_twist_server into the src/ folder of your workspace.

Once you have done that, build your workspace.

Finally, edit line 142 and line 144 in the husky_description folder of the husky repository:

FROM:

    <sick_lms1xx_mount prefix="base"/>

    <sick_lms1xx frame="base_laser" topic="scan" robot_namespace="$(arg robot_namespace)"/>

TO:

    <xacro:sick_lms1xx_mount prefix="base"/>

    <xacro:sick_lms1xx frame="base_laser" topic="scan" robot_namespace="$(arg robot_namespace)"/>


Note: Please let me know if this solution doesn't work out for you. If in case it does, feel free to upvote my answer.

edit flag offensive delete link more

Question Tools

3 followers

Stats

Asked: 2020-06-05 20:32:32 -0500

Seen: 1,119 times

Last updated: Jan 10 '21