Prerequsities
- The ROS Noetic installed.
- The MRS UAV System installed.
- The MRS UAV Gazebo Simulation installed.
- Place
source /usr/share/gazebo/setup.sh
in your.bashrc
file (or therc
file of your shell).
Starting the simulation
Running the simulation consists of several steps, which are automated using a tmuxinator script. Examples of tmuxinator files can be found in the tmux folder within the mrs_uav_gazebo_simulation package. With the system installed, you can find them (and then copy them elsewhere) by running
roscd mrs_uav_gazebo_simulation/tmux
Each folder contains a different simulation scenario.
The simlation scenario will be started by calling the start.sh
script within its folder.
This will call the tmuxinator
utility that uses the prescription in the session.yml
file to spawn a tmux
session.
roscd mrs_uav_gazebo_simulation/tmux/one_drone
./start.sh
You should be presented with the windows of the "Gazebo simulator" and the "Rviz" upon starting the session.
Stopping the simulation
You have two options:
a) Run the ./kill.sh
script.
b) Hit the killing shortcut: ctrl+a k
(ctrl+a
and then k
). A menu will appear in which you confirm the selection.
Configuring the UAV
The UAVs are not part of the simulation world, but are spawned dynamically after the world has started.
The spawning is handler by a ROS node mrs_drone_spawner
that can introduce new UAVs into the world based on user's command.
The properties of the drones are defined within the session.yml
on the line
- waitForGazebo; rosservice call /mrs_drone_spawner/spawn "1 $UAV_TYPE --enable-rangefinder --enable-ground-truth"
See the drone spawner documentation page for details on how to modify the drone configurations.