Skip to content

reeeeemo/flightmare-updated

Repository files navigation

Flightmare (Updated!)

Build Status clang format License website

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:

  1. A large multi-modal sensor suite, including an interface to extract the 3D point-cloud of the scene.
  2. An API for reinforcement learning which can simulate hundreds of quadrotors in parallel.
  3. 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.

Website & Documentation

FLIGHTMARE VIDEO

Updated Content

  • 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 .devcontainer for 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.

The updated content only includes flightrl and flightlib, as of the time of writing, no work has been done to update and test flightros or flightrender (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.

Installation

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+P and select Dev Containers: Attach to Running Container...

After docker is built, to run anything in flightrl:

  • Run pip3 install . inside of flightrl
  • If recompiling anything from C++, run pip3 install . inside of flightlib

Run export FLIGHTMARE_PATH=/workspace if running into any other issues unrelated to packages.

Publication

@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}
}

PDF

License

This project is released under the MIT License. Please review the License file for more details.

About

An Open (and updated) Flexible Quadrotor Simulator!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors