Make sure you have read the prerequisites.
- Download the Unreal 4 engine from unreal.com. While the Unreal Engine is open source, cross platform and free to download, registration is still required as of this writing. You need version 4.14 or higher.
- After the download, run the Epic Game Launcher and click the big yellow "Install" button under the Unreal Engine tab.
AirSim code has two external dependencies: Eigen library and Boost library.
- If you don't have already, install Boost.
- If you don't have already, install Eigen.
- You need Visual Studio 2015 Update 3 (make sure to install VC++). Other versions haven't been tested.
- Start VS2015 x64 Native Tools Command Prompt. Create a folder for repo and run
git clone https://github.com/Microsoft/AirSim.git
- Run
build
. If everything goes ok, it will copy all the binaries that you need to Unreal/Plugins folder in your repo. This Plugins folder can then be simply copied to your Unreal environment. - Linux build is coming... stay tuned.
To run the simulator, you need an environment and its very easy to create one! Unreal Marketplace has dozens of prebuilt extra-ordinarily detailed environments ranging from Moon to Mars and everything in between. The one we have used for testing is called Modular Neighborhood Pack but you can use any environment.
- Either purchase an environment from Unreal Marketplace or choose one of the free ones such as Infinity Blade series. Alternatively, if you look under the Learn tab in Epic Game Launcher, you will find many free samples that you can use. One of our favorites is "A Boy and His Kite" which is a 100 square miles of highly detailed environment (caution: you will need very beefy PC to run it!).
- Once you have the environment, you can simply go to the Library tab of the Epic Game Launcher and add in to any project you like. We recommend creating a new blank C++ project with no Starter Content and add your environment in to it. Tip: if the environment comes with MatineeActor, delete it to avoid any demo sequences.
Copy the Unreal\Plugins
folder from the build you did in the above section into the root of your Unreal project's folder. The overall structure should look something like this:
In your Unreal project's .uproject file, add Plugins section and key "AdditionalDependencies" so your project file looks like this:
{
"FileVersion": 3,
"EngineAssociation": "4.14",
"Category": "",
"Description": "",
"Modules": [
{
"Name": "MyUnrealProject",
"Type": "Runtime",
"LoadingPhase": "Default",
"AdditionalDependencies": [
"AirSim"
]
}
],
"Plugins": [
{
"Name": "AirSim",
"Enabled": true
}
]
}
You are all ready to go now!
- Right click on the Unreal project .uproject file, then Generate Visual Studio Project files.
- Double click on .sln file to open the solution.
- Hit F5.
- After Unreal Editor comes up select SimGameMode in the World settings.
- Make sure your environment has a Player Start component or add one. This is where the quadrotor will be placed.
- Hit Play button.
Congratulations! You are now running AirSim in your own Unreal environment.
Note: if you have any trouble getting drone to fly, check your hard drive performance.