Simulation Installation and Environment Setup (Windows)
Note: This page applies only to Windows users.
There are several pieces of software needed to get up and running with the simulator, namely PX4, Unreal Engine, and MavSDK. You will also need the software ubiquitous to the software team:
Table of Contents
It is recommended you follow this tutorial in the order listed.
- Installing Unreal Engine
- Installing AirSim
- Initial Environment Setup
- Next Steps
- We will be using Unreal Engine for simulating virtual drones. If you have the Epic Games Launcher installed already (e.g., if you own Fortnite), you can download Unreal Engine from the “Unreal Engine” tab. If you don’t have the Epic Games Launcher, then you will have to download it to install Unreal Engine.
The Unreal Engine version you will download is 4.27.2. AirSim, which allows us to simulate multirotors in Unreal, does not work with Unreal Engine 5 or greater.
Finally, run Unreal Engine at least once before continuing to the next steps.
Installing AirSim
Visual Studio
To install AirSim, you must first install Microsoft’s Visual Studio Community 2022. This will also be the IDE you will use for programming C++ code for Unreal.
When installing, you must select the following: When installing, you must select the following under the Individual Components tab:
C++ Development PackWindows SDK 10.NET 8.0 Runtime (Long Term Support).NET Framework 4.8 SDKMSVC v143 - VS 2022 C++ x64/x86 build tools (v14.37-17.7)(Out of support)
AirSim
AirSim is an Unreal Engine plugin for simulating multirotors and cars that was previously maintained by Microsoft; it is the backbone of simulation.
To install AirSim, follow these steps:
- clone the AirSim GitHub repository:
git clone https://github.com/Microsoft/AirSim- the location of your local copy does not matter
- Launch
x64 Native Tools Command Prompt for VS 2022(using Windows search)- navigate to where you cloned AirSim with the
cdcommand - run the command
.\build.cmd - wait for AirSim to build
- you can move on to the next step while waiting
- navigate to where you cloned AirSim with the
Incompatible Execution Policy
If you encountered no errors completing the above, you may skip this.
Sometimes, Windows may not allow you to run PowerShell scripts due to your Execution Policy. To fix this, start a PowerShell/Terminal as Administrator (right-click the application as click “Run as Administrator”). Then, run the following command:
Set-ExecutionPolicy RemoteSigned
Afterward, restart all Terminal/PowerShell instances to apply the change.
Next Steps
If you’ve run all the above steps, you’re environment should be set up!