Flightmare is a flexible modular quadrotor simulator.
This is an updated version of Flightmare that includes newer libraries and docker support. Most of the changes revolve around flightrl and creating a drone environment that is abstracted from the C++ based physics/simulation environment.
Flightmare is composed of two main components: a configurable rendering engine built on Unity and a flexible physics engine for dynamics simulation. Those two components are totally decoupled and can run independently from each other. Flightmare comes with several desirable features:
- A large multi-modal sensor suite, including an interface to extract the 3D point-cloud of the scene.
- An API for reinforcement learning which can simulate hundreds of quadrotors in parallel.
- An integration with a virtual-reality headset for interaction with the simulated environment.
Flightmare can be used for various applications, including path-planning, reinforcement learning, visual-inertial odometry, deep learning, human-robot interaction, etc.
- While Flightmare is originally intended for Python 3.6 and Ubuntu 18.04, updates have been made to include Python 3.9 and Ubuntu 20.04, which is what the Docker runs on. This also includes support for CUDA devices up to CUDA 12.4.
- Updated Dockerfile and
.devcontainerfor a streamlined coding process. - Added support for stable_baselines3 and PyTorch so models such as PPO can be run.
- 2 New environments for reinforcement learning based training:
- Gate-Flying Drone
- 12 Dimensional observation state
- Includes the ability to add gates from Python.
- Also checks gate collision without rigidbodies.
- Hover Drone
- 34 Dimensional observation state
- 12 Dimensions are unused, since hover drone weights are used as a pre-training before the gate-flying drone, which needs all 34 dimensions.
- Can configure the initial random rotation of the drone at the starting state
- Includes support for cumulative learning of the model.
- 34 Dimensional observation state
- Gate-Flying Drone
The updated content only includes
flightrlandflightlib, as of the time of writing, no work has been done to update and testflightrosorflightrender(we have used unity standalone for any rendering). Proceed with caution.
Until the Andruil AI Grand Prix competition qualifiers end, I will not be updating the gate-flying drone environment/code unless there are errors.
Build the dockerfile using docker build -t flightmare ..
-
If only running on docker
docker run --gpus all -it -d flightmare
-
Docker with Visual Studio Code
- Ensure that DevContainers is installed as an extension
- Press
CTRL+SHIFT+Pand selectDev Containers: Attach to Running Container...
After docker is built, to run anything in flightrl:
- Run
pip3 install .inside offlightrl - If recompiling anything from C++, run
pip3 install .inside offlightlib
Run
export FLIGHTMARE_PATH=/workspaceif running into any other issues unrelated to packages.
@inproceedings{song2020flightmare,
title={Flightmare: A Flexible Quadrotor Simulator},
author={Song, Yunlong and Naji, Selim and Kaufmann, Elia and Loquercio, Antonio and Scaramuzza, Davide},
booktitle={Conference on Robot Learning},
year={2020}
}
This project is released under the MIT License. Please review the License file for more details.
