Home | Tutorials | Wiki | Issues
Ask Your Question
0

Costume world fail to load in Hector_quadrotor_gazeboo

asked 2018-04-02 18:03:10 -0500

Caesar84 gravatar image

hi there. I am trying to load a costume world for Hector_quadrotor_gazebo , lets say 3.world which is basically roslaunch hector_quadrotor_gazebo quadrotor_empty_world.launch then added some buildings and objects and saved the new world as 3.world.

how can launch this world later on ? i had followed the tutorial in 'http://learn.turtlebot.com/2015/02/03/6/' which worked fine for turtlebot but didnt work for hector_quadrotor.

iam new to ROS and Gazebo so excuse my question.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-04-03 05:59:30 -0500

Raskkii gravatar image

So if you look at the contents of the quadrotor_empty_world.launch take note of the following section:

<include file="$(find gazebo_ros)/launch/empty_world.launch">
  <arg name="paused" value="$(arg paused)"/>
  <arg name="use_sim_time" value="$(arg use_sim_time)"/>
  <arg name="gui" value="$(arg gui)"/>
  <arg name="headless" value="$(arg headless)"/>
  <arg name="debug" value="$(arg debug)"/>
</include>

This .launch file passes arguments to gazebo_ros's empty_world.launch file. If you look at the empty_world.launch file, you'll see the following line:

<arg name="world_name" default="worlds/empty.world"/> <!-- Note: the world_name is with respect to GAZEBO_RESOURCE_PATH environmental variable -->

This line means that you can pass this file a world_name argument to open any .world file you'd like.

So to answer your question, add a line (or make a copy if you don't want to change the original file) to the quadrotor_empty_world.launch file like so:

<include file="$(find gazebo_ros)/launch/empty_world.launch">
  <arg name="paused" value="$(arg paused)"/>
  <arg name="use_sim_time" value="$(arg use_sim_time)"/>
  <arg name="gui" value="$(arg gui)"/>
  <arg name="headless" value="$(arg headless)"/>
  <arg name="debug" value="$(arg debug)"/>
  <arg name="world_name" value="path/to/3.world"/>
</include>

And then obviously input the correct path to your 3.world file.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-04-02 18:03:10 -0500

Seen: 40 times

Last updated: Apr 03