Simulation Installation and Environment Setup (Windows)
Note: This page applies only to Windows users.
Table of Contents
It is recommended you follow this tutorial in the order listed.
Installing Unreal Engine
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 5.2.1. Project AirSim, which allows us to simulate multirotors in Unreal, will only work for this version.
Once Unreal Engine has finished downloading, you will need to run it once before doing anything else. You can continue on to the following steps until told otherwise.
Installing Git
Go to the following link and download Git. The installer should prompt you to set up your credentials needed for downloading GitHub repositories
Installing Containers
We run the flight-code environment and the ArduPilot simulation in containers, managed with Podman inside WSL. Head to our container setup page and follow the instructions there, then come back here.
Installing Project AirSim
Visual Studio
To install Project 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.
- NOTE: Microsoft does not keep their older Visual Studio versions on their downloads page, so this is a google drive link to a known working installer.
When installing Visual Studio, there are several things you must check for the simulation to work.
- Under Workloads (you should start in this page):
Desktop development with C++
- Under Individual Components (to the right of Workloads):
Windows 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)
You will need to go to C:\Users\<YOUR_USER>\AppData\Unreal Engine\UnrealBuildTool\BuildConfiguration.xml
- If you cannot find the AppData folder, the easiest way it to enable
Hidden Itemsin File Explorer. You can do this by going toview>show>Hidden Items. - If that does not work you can try pressing the
WindowsandRkeys at the same time. This should open a prompt in the bottom left of your screen calledRun. In the search box type%appdata%and press enter. This should put you in yourC:\Users\<YOUR_USER>\AppData\Roamingfolder.
Now replace the contents of BuildConfiguration.xml with the following:
<?xml version="1.0" encoding="utf-8" ?>
<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
<WindowsPlatform>
<CompilerVersion>14.37.32822</CompilerVersion>
</WindowsPlatform>
</Configuration>
Project AirSim
Project AirSim is an Unreal Engine plugin for simulating multirotors and cars that is maintained by IAMAISIM; it is the backbone of simulation.
To install Project AirSim, follow these steps:
- clone the AirSim GitHub repository:
git clone https://github.com/iamaisim/ProjectAirSim.git- the location of your local copy does not matter, as long as you know where it is.
- Make sure to close out of all terminals opened prior to this step, if you don’t environment variables can and will break.
- Launch
x64 Native Tools Command Prompt for VS 2022(using Windows search)- Navigate to where you cloned Project AirSim with the
cdcommand - Run
set UE_ROOT=C:\path\to\UE_5.2 - Run the command
build.cmd all - Wait for Project AirSim to build
- You can move on to the next step while waiting, this will take a while.
- Navigate to where you cloned Project AirSim with the
Environment Setup
Simulation Git Repository
For accessing/editing the actual simulation repository do:
git clone https://github.com/MissouriMRR/Simulation.git
The simulation code lives as a submodule inside the competition repository, so clone the competition repo with submodules rather than cloning the simulation repo on its own.
Open a terminal (by typing Terminal in the Windows search), cd to where you want the repository, and run:
git clone --recurse-submodules https://github.com/MissouriMRR/<REPO>.git
This creates a <REPO>\ directory, with the simulation code at <REPO>\simulation\. If you have already cloned it without --recurse-submodules, run this from inside the repository to fill the submodule in:
git submodule update --init --recursive
The containers run inside WSL, so clone somewhere WSL can reach. A path on your Windows drive is fine — WSL sees it under
/mnt/c/....
Simulation Unreal Repository
We have our own self-hosted GitHub repository on the bay computer (Ricky), to get access to you will need to do a few things:
- Run
ssh-keygen -t ed25519 -C "your_email@example.com"in a terminal.- You can press ‘Enter’ 3x to skip through setting whether you want the file to require a passphrase. Or you can set it, just don’t forget it
- Run
cat ~/.ssh/id_ed25519.pubin a terminal - Copy the output to your clipboard
- Message this to the Simulation Project Lead or Special Projects Lead with context, and they should be able to get you set up
- Once they give you the go-ahead, you will need to be on the school’s network.
- If you are not, you can still access it, you just need to download the school’s VPN
- At
https://openvpn.mst.edu/download the correct OpenVPN client for your computer - Also download the latest .ovpn file under
Configuration Files - Once both have downloaded and you have installed the OpenVPN software, there will be a button to upload a file
- Press said button and select the .ovpn file you downloaded earlier
- You are now on the school’s WiFi!
- Now you should be able to download the repository with
git clone git@131.151.19.149:SimulationRepository.git
Next Steps
If you’ve run all the above steps, you’re environment should be set up!
Next, you should go to the flying page to see how to fly the virtual drone with Python code.