VTOL AirSim Quickstart Guide¶
This guide is for running a simulation of a tiltrotor VTOL vehicle inside a prebuilt binary of the CityBlocks world - a custom world modified for AirSim by the MAGICC Lab. The driving script, complete with trajectory generation, controllers, and an AirSim client, is geometric_control_airsim_sim.py
, located in the vtolsim repository.
Here is what you will need to do to run the script geometric_control_airsim_sim.py
:
- Download the latest CityBlocks zip archive here and unzip it to wherever you like
- Create a file at
~/Documents/AirSim/settings.json
- or modify it if it already exists - with the following settings (see the examplesettings.json
below):"SimMode": "Vtol"
- a vehicle with
"VehicleType": "vtolsimple"
- Clone the BYU-MAGICC fork of Airsim somewhere -
git@github.com:byu-magicc/AirSim
orhttps://github.com/byu-magicc/AirSim
- If you haven't already, create a python virtual environment specifically for AirSim (it will make everything simpler for AirSim)
- e.g.
python -m venv ~/.virtualenvs/airsim
- e.g.
- Activate your AirSim virtual environment
- e.g.
source ~/.virtualenvs/airsim/bin/activate
- e.g.
cd
intoAirSim/PythonClient
and runpip install -e .
- Now clone vtolsim:
git clone --recursive git@magiccvs.byu.edu:urbanmobility/vtolsim/vtolsim.git
cd
intovtolsim/geometric_controller
- In another terminal session, start running
<path to CityBlocks dir>/LinuxNoEditor/CityBlocks.sh
- Now you can run
python geometric_control_airsim_sim.py
and it should fly the trajectory.
Example settings.json
:¶
{
"SettingsVersion": 1.2,
"SimMode": "Vtol",
"ClockSpeed": 1.0,
"LogMessagesVisible": false,
"Vehicles": {
"uav0": {
"VehicleType": "vtolsimple"
}
}
}
Notes:
- Lower the
ClockSpeed
setting if your machine is struggling to run vtolsim + AirSim.- e.g.
"ClockSpeed": 0.6
to run the simulation at 60% real time
- e.g.
- Set
LogMessagesVisible: true
if you need that, but having it off is better for recording video.