gym-pybullet-drones provides PyBullet simulation environments for single- and multi-agent quadcopter control, built for Gymnasium and Stable-Baselines3.
Overview
gym-pybullet-drones is a streamlined refactor of the original gym-pybullet-drones project, aimed at compatibility with Gymnasium, Stable-Baselines3 2.0, and Betaflight software-in-the-loop testing.
It offers PyBullet-based environments for learning and evaluating quadcopter control, including single-agent and multi-agent setups. Examples cover classic control, downwash effects, reinforcement learning with PPO, and multi-agent RL via a PettingZoo wrapper that exposes one agent per drone with shared team rewards.
The PettingZooWrapper presents multi-drone aviaries through PettingZoo’s Parallel API so MARL libraries built on PettingZoo can consume them. Each agent sees its own observation row while team rewards and episode flags stay shared, and env.state() exposes all drone kinematics for centralized critics.
Installation has been tested on Intel x64 with Ubuntu and on Apple Silicon with macOS. An optional Betaflight SITL example is documented for Ubuntu only.
Key features
- PyBullet quadcopter aviaries
- Gymnasium environment API
- Stable-Baselines3 PPO examples
- Multi-agent PettingZoo wrapper
- Control and downwash demos
- Betaflight SITL example on Ubuntu
- Single- and multi-drone agents
Use cases
- Train RL policies for quadcopter control
- Multi-agent drone MARL experiments
- Control research with PyBullet physics
- Betaflight SITL integration tests