Gazebo launch file switch between world files
I have a package built and have successfully tested the tutorial world and spawned several robots. However I want to make my own worlds now, but want to easily switch the world that I am using. So if I want to be able to do something like:
roslaunch lawnbot_gazebo lawnbot.launch -gas_station_world
to start the gas station world then do:
roslaunch lawnbot_gazebo lawnbot.launch -bot_test_world
I am not trying to run multiple worlds at once. I just want to choose the world to start from the terminal instead of modifying the launch file every time I want to change the world.
Here is my launch file:
<launch>
<!-- We resume the logic in empty_world.launch, changing only the name of the world to be launched -->
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="world_name" value="$(find lawnbot_gazebo)/worlds/lawnbot_tutorial_gas_station.world"/>
<!-- more default parameters can be changed here -->
</include>
</launch>
How do I add arguments that specify which world I am trying to load? Do I have to have multiple launch files?