# AirSim

> A drone and car simulator on Unreal Engine, built for AI research rather than gameplay

- Category: Robotics & Embodied AI / Simulators & Synthetic Environments
- Language: C++
- Licence: MIT
- Repository: https://github.com/microsoft/AirSim
- Website: https://microsoft.github.io/AirSim/
- Canonical page: https://ai-tldr.dev/tools/airsim/

## In short

AirSim is Microsoft AI & Research's "simulator for drones, cars and more, built on Unreal Engine", with an experimental Unity release alongside it. It sits in the Simulators & Synthetic Environments category of the Robotics & Embodied AI tools and is open-source, written in C++ and licensed MIT. To get started: download a precompiled environment.

## Overview

AirSim is Microsoft AI & Research's "simulator for drones, cars and more, built on Unreal Engine", with an experimental Unity release alongside it. It is open source and cross-platform, and its purpose is stated plainly: to enable AI research in deep learning, computer vision and reinforcement learning for autonomous vehicles — the simulator exists so that models can be trained and tested without risking hardware.

Two features set it apart from a general engine. It supports software-in-the-loop simulation with real flight controllers including PX4 and ArduPilot, plus hardware-in-the-loop, so the control stack under test is the same one that would fly the aircraft. And it offers a Computer Vision mode in which physics is switched off and the camera is positioned freely, which is how you harvest images and ground-truth labels from a scene without flying anything through it at all.

Vehicles can be driven manually or programmatically, and the APIs are exposed in C++, Python, C# and Java, so a training loop written in Python can command the same simulator a C++ controller is being validated against. Weather effects are simulated. Precompiled binaries are published on GitHub Releases for the quickest start, with build instructions for Windows, Linux and macOS in the documentation. The project is released under the MIT licence.

## What it does

- Drone and car simulation on Unreal Engine, with an experimental Unity release
- Software-in-the-loop with PX4 and ArduPilot flight controllers, plus hardware-in-the-loop
- Computer Vision mode: physics disabled, camera positioned freely for data collection
- Manual and programmatic vehicle control
- APIs in C++, Python, C# and Java
- Simulated weather effects
- Precompiled binaries on GitHub Releases; builds for Windows, Linux and macOS

## Getting started

The fastest route is a precompiled binary plus the Python client package. Commands below come from the project README and the official API documentation.

1. Download a precompiled environment

   Prebuilt binaries for Windows and Linux are published on the releases page; macOS is build-from-source.

```text
https://github.com/Microsoft/AirSim/releases
```

2. Install the Python client

   The client package talks to a running simulator over its API port.

```bash
pip install airsim
```

3. Connect and take control

   Start the simulator binary, then connect from Python. Use `airsim.CarClient()` instead for car-based vehicles.

```python
import airsim

# connect to the AirSim simulator
client = airsim.MultirotorClient()
client.confirmConnection()
client.enableApiControl(True)
client.armDisarm(True)
```

4. Collect data in Computer Vision mode

   Computer Vision mode disables physics and lets the camera be positioned anywhere in the scene — the mode to use when you want images and ground truth rather than a flight.

```text
https://microsoft.github.io/AirSim/
```

5. Or wire in a real flight controller

   For software- or hardware-in-the-loop work, connect PX4 or ArduPilot following the setup guides in the documentation, so the control stack under test is the real one.

```text
https://microsoft.github.io/AirSim/
```

## When to use it

- Reach for it when training a drone or driving policy that would be expensive to crash in hardware
- Reach for it when you need synthetic images with ground truth — Computer Vision mode skips the physics entirely
- Reach for it when a PX4 or ArduPilot stack has to be exercised in software- or hardware-in-the-loop
- Reach for it when a reinforcement-learning loop in Python must drive the same simulator a C++ controller runs against
