# gym-pybullet-drones

A Gymnasium-compatible PyBullet simulation environment for single- and multi-agent reinforcement learning of quadcopter control, with Betaflight software-in-the-loop and classical PID control examples.

gym-pybullet-drones is a minimalist refactoring of the original quadcopter simulation environment, updated for compatibility with Gymnasium, Stable-Baselines3 2.0 and Betaflight software-in-the-loop. It provides physics-based drone simulation in PyBullet that can be driven by classical controllers, such as PID and PID-velocity control examples, or trained with reinforcement learning algorithms such as PPO from Stable-Baselines3, including single- and multi-agent setups.

Example scripts cover basic control, a downwash-effect simulation between multiple drones, and running the environment against real Betaflight flight-controller firmware in software-in-the-loop mode by building a SITL executable per simulated drone. A test suite runs with pytest, and the project has been featured in GitHub's Maintainer Spotlight.

It is tested on Intel x64 Ubuntu and Apple Silicon macOS, written in Python, and released under the MIT license.

Website: https://arxiv.org/pdf/2103.02142
