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.
Originally posted by Raskkii with karma: 376 on 2018-04-03
This answer was ACCEPTED on the original site
Post score: 0