← all repositories
learnsyslab/gym-pybullet-drones

A flight school for algorithms that can't crash real drones

PyBullet-based Gymnasium environments for training RL agents to control quadcopters without the insurance claims.

2.1k stars Python ML FrameworksDomain Apps
gym-pybullet-drones
Not currently ranked — collecting fresh signals.
star history

What it does

gym-pybullet-drones is a stripped-down simulator that wraps PyBullet physics in standard gymnasium interfaces for single and multi-agent quadcopter control. It ships with PID baselines, reinforcement learning examples via stable-baselines3, and hooks for running actual Betaflight or Crazyflie firmware in software-in-the-loop (SITL) mode.

The interesting bit

The project is deliberately a “minimalist refactoring” — the authors cannibalized their own IROS 2021 codebase to prioritize compatibility with modern RL tooling over feature bloat. The SITL bridge is the unusual angle: you can train in Python, then (in theory) drop the same firmware onto physical Crazyflie hardware.

Key highlights

  • Compatible with gymnasium and stable-baselines3 2.0
  • Multi-agent support with downwash aerodynamics between drones
  • Betaflight SITL integration (Ubuntu only) and pycffirmware bindings (cross-platform)
  • Tested on Intel x64/Ubuntu 22.04 and Apple Silicon/macOS 26.2
  • Original IROS 2021 paper codebase preserved on paper/master branches

Caveats

  • Betaflight SITL setup is manual and brittle: specific git checkout, commented C code, binary blob copying
  • Multi-drone Betaflight SITL is listed as not yet implemented in the WIP section
  • NVIDIA + Ubuntu users may hit OpenGL context errors requiring PRIME profile switching

Verdict

Worth a look for robotics grad students or anyone prototyping quadcopter RL who needs physics fidelity without leaving Python. Skip it if you need GPU-accelerated or differentiable simulation — the authors themselves point to crazyflow for that.

Frequently asked

What is learnsyslab/gym-pybullet-drones?
PyBullet-based Gymnasium environments for training RL agents to control quadcopters without the insurance claims.
Is gym-pybullet-drones open source?
Yes — learnsyslab/gym-pybullet-drones is open source, released under the MIT license.
What language is gym-pybullet-drones written in?
learnsyslab/gym-pybullet-drones is primarily written in Python.
How popular is gym-pybullet-drones?
learnsyslab/gym-pybullet-drones has 2.1k stars on GitHub.
Where can I find gym-pybullet-drones?
learnsyslab/gym-pybullet-drones is on GitHub at https://github.com/learnsyslab/gym-pybullet-drones.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.