Ask Your Question
0

Launching husky_gazebo from another launch file with a different world

asked 2020-10-16 11:57:57 -0600

Malkecero gravatar image

Hi,

I'm trying to launch the husky_gazebo simulation (version 0.4.4) from another launch file and loading it in the Robocup world. The simulation runs successfully but the Robocup world isn't loaded.

Here is the code written in my launch file:

<launch>
    <include file="$(find husky_gazebo)/launch/husky_empty_world.launch">
        <arg name="world_name" value="$(find husky_gazebo)/worlds/robocup14_spl_field.world"/>
    </include>
</launch>

If instead I run directly from the terminal the following line:

roslaunch husky_gazebo husky_empty_world.launch world_name:=worlds/robocup14_spl_field.world

then it works. I don't have any related error or warning shown in the terminal at launch (some PID gains no set but I also get this when launching with the line above in the terminal).

What am I missing ?

Thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-12-26 08:39:29 -0600

Mik_Ferrari gravatar image

Hi, I ran into the exact same problem and solved it by changing the launch file as follows:

<launch>
    <include file="$(find husky_gazebo)/launch/husky_empty_world.launch">
        <arg name="world_name" value="/usr/share/gazebo-9/worlds/robocup14_spl_field.world"/>
    </include>
</launch>

I think the issue was caused by the fact that worlds/robocup14_spl_field.world is not located under husky_gazebo, but rather under /usr/share/gazebo-9.

I hope it applies to your situation too.

PS: Attending ETHZ ROS Course Programming for Robotics? ;)

edit flag offensive delete link more

Comments

1

I just went back today to this old piece of code and tried yours, it works! Thanks!

I was indeed following the ETHZ ROS Course ;)

Malkecero gravatar image Malkecero  ( 2021-01-23 11:53:29 -0600 )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

Stats

Asked: 2020-10-16 11:57:57 -0600

Seen: 48 times

Last updated: Oct 16 '20