Skip to content

tensaur/drone

Repository files navigation

drone

drone is a reinforcement learning based drone controller and simulator tool, which is included in PufferLib as a first-party simulator example.

This project was presented at the 2025 Warwick AI summit. The slides for this talk are available here.

Setup

A demo version of this environment is provided in the PufferLib repo, which is updated to the latest stable version once ready. We also maintain the development version in this repo which is symlinked into the pufferlib submodule for easy building and training during development.

A setup script is provided to automate the initialisation of git submodules, correct creation of symlinks, config for drone hardware and to create an initial build of the env code. This script requires uv to be installed.

git clone https://github.com/tensaur/drone.git
cd drone
./setup.sh

Usage

Once the setup process is complete, the puffer command will be available while the virtual environment is active. This can be used to train and run the RL policy.

# train
puffer train puffer_drone --train.device [cpu|mps|cuda]

# eval
puffer eval puffer_drone --train.device [cpu|mps|cuda] --load-model-path latest

For details on building and flashing the firmware to hardware (Crazyflie 2.1 Brushless) see the docs here.

Demo

droneflyinginnit.1.mov

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT License

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, shall be licensed as above, without any additional terms or conditions.