A collection of MuJoCo-based robotics reinforcement learning environments built on the Gymnasium API.
learnsyslab/gym-pybullet-drones
PyBullet-based Gymnasium environments for training single and multi-agent reinforcement learning controllers for quadcopters.
- Stars
- 2,201
- Forks
- 578
- Open issues
- 111
- Last commit
- 2 days ago
What is it?
gym-pybullet-drones provides quadcopter simulation environments built on PyBullet physics and the Gymnasium API. It lets researchers and students train reinforcement learning policies for single-drone and multi-agent control, such as hovering, formation flight, and downwash interactions between drones.
The project is a streamlined refactor of an earlier IROS 2021 codebase, updated for Gymnasium and Stable-Baselines3 2.0. It includes classic PID and velocity controllers, an MRAC adaptive controller, and example scripts for training PPO agents with learn.py and replaying them with play.py.
It also includes a Betaflight SITL example on Ubuntu for running multiple simulated flight controllers against the environment.
Key features
- 01Gymnasium-compatible single-agent and multi-agent quadcopter environments
- 02Built on PyBullet physics simulation
- 03Includes PID, velocity control, and MRAC controller examples
- 04Stable-Baselines3 PPO training and playback scripts
- 05Downwash effect modeling between drones
- 06Betaflight SITL integration on Ubuntu
Use cases
- Training reinforcement learning controllers for quadcopter hover or trajectory tracking
- Researching multi-drone coordination and formation flight
- Testing control algorithms against Betaflight firmware in software-in-the-loop setups
Quick start
- 1
Clone the repository
git clone https://github.com/learnsyslab/gym-pybullet-drones.git - 2
Create and activate a conda environment with Python 3.12
conda create -n drones python=3.12 && conda activate drones - 3
Install the package in editable mode
pip3 install -e . - 4
Run a PID control example
cd gym_pybullet_drones/examples/ && python3 pid.py
Things to know
- Building pybullet on Python 3.11 and newer may need a compiler or a macOS-specific CFLAGS workaround.
- The Betaflight SITL example works on Ubuntu only.
In collections
Topics
FAQ
- What is gym-pybullet-drones?
- PyBullet-based Gymnasium environments for training single and multi-agent reinforcement learning controllers for quadcopters. gym-pybullet-drones provides quadcopter simulation environments built on PyBullet physics and the Gymnasium API. It lets researchers and students train reinforcement learning policies for single-drone and multi-agent control, such as hovering, formation flight, and downwash interactions between drones.
- Is gym-pybullet-drones free to use? What license does it have?
- gym-pybullet-drones is open source under the MIT license. Check the license terms before using it in commercial products.
- Is gym-pybullet-drones still maintained?
- Actively maintained. The last commit to gym-pybullet-drones was on Nov 6, 2026.
- What can I use gym-pybullet-drones for?
- Training reinforcement learning controllers for quadcopter hover or trajectory tracking Researching multi-drone coordination and formation flight Testing control algorithms against Betaflight firmware in software-in-the-loop setups
- How do I install gym-pybullet-drones?
- Clone the repository: git clone https://github.com/learnsyslab/gym-pybullet-drones.git Create and activate a conda environment with Python 3.12: conda create -n drones python=3.12 && conda activate drones Install the package in editable mode: pip3 install -e . Run a PID control example: cd gym_pybullet_drones/examples/ && python3 pid.py
- Where can I get gym-pybullet-drones?
- The source code and installation instructions are on GitHub: https://github.com/learnsyslab/gym-pybullet-drones
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A lightweight Python driving simulator for reinforcement learning and autonomous driving research, with sensor simulation and Gymnasium-style environments.
A JAX-based quadrotor simulator that runs batched, differentiable drone simulations on CPU and GPU for Crazyflie 2.x drones.
A Python multirotor UAV simulator with lumped-parameter aerodynamics, built for teaching and research in estimation, planning, and control.
A Python library providing a standard API and reference environments for multi-agent reinforcement learning research, similar to Gymnasium.
A Gymnasium-compatible collection of simulated driving environments for training and testing autonomous driving and decision-making agents.