gym-pybullet-drones: Quadcopter RL Environment

PyBullet-based Gymnasium environments for single and multi-agent reinforcement learning of quadcopter control.

Stars
★ 2.2k
Last updated
11d ago v1.0.0
FARS reviewed
Nov 08, 2026
License
MIT
Primary language
Python

At a glance

How it runs
CLILibrary / SDK
Works with
Platform-specific
Cost
Free, no paid service needed
Setup effort
Medium · a few setup steps
You'll need
Python 3.10PyBulletGymnasiumStable-Baselines3condaShell / CLINetwork access
Typical use
Researchers developing quadcopter control algorithms can use the environment for single-agent reinforcement learning experiments like hover or trajectory tracking.
Not a fit if
  • Users needing the Betaflight SITL example outside Ubuntu
  • Teams unwilling to manage a conda environment
  • NVIDIA systems without working OpenGL context
Website
arxiv.org/pdf/2103.02142 ↗ set on GitHub
Maintenance
Commits in the last 30 dayslast commit 2026-11-21latest release v1.0.0 (2021-03-09)+1.6 ★/day over 7 days

What does this agent do, and when should you use it?

gym-pybullet-drones is a minimalist refactoring of the original repository, providing PyBullet-based Gymnasium environments for single and multi-agent reinforcement learning of quadcopter control. It integrates with Stable-Baselines3 2.0 and supports SITL with Betaflight and Crazyflie firmware. The repository includes PID control examples, a downwash effect example, and reinforcement learning examples. The environment was presented at IROS 2021 and has been featured in GitHub's Maintainer Spotlight. Installation requires a conda environment with Python 3.10, and it is tested on Ubuntu and macOS but the Betaflight SITL example is Ubuntu-only.

This repository provides Gymnasium environments (e.g., gym-pybullet-drones) for quadcopter control tasks, simulating physics with PyBullet. It supports single and multi-agent scenarios (e.g., two-drone hover). It includes PID control examples (pid.py, pid_velocity.py), a downwash effect example (downwash.py), and reinforcement learning examples (learn.py, play.py) that use Stable-Baselines3's PPO. It also integrates with Betaflight SITL (via beta.py) and pycffirmware (cf.py). All examples are run via command line, and tests can be executed with pytest tests/.

  1. Researchers developing quadcopter control algorithms can use the environment for single-agent reinforcement learning experiments like hover or trajectory tracking.
  2. Multi-agent systems researchers can simulate multi-drone coordination tasks using the --multiagent true option, e.g., hovering at different heights.
  3. Control engineers can quickly validate position and velocity control algorithms with the PID examples, adjusting parameters.
  4. Users interested in Betaflight firmware can test control algorithms in SITL on Ubuntu, interacting with real firmware.
  5. Educators can use the repository for teaching reinforcement learning and multi-agent control, leveraging Stable-Baselines3 integration.

Key setup facts

Pulled from the install and usage notes below. The project README has the current values.

Install / run
  • pip install -e
Environment variables
LATEST_MODEL
Runtime
Python 3.10

How do you install or deploy this agent?

Clone the repo and create a conda environment (Python 3.10):

git clone https://github.com/learnsyslab/gym-pybullet-drones.git
cd gym-pybullet-drones/
conda create -n drones python=3.10
conda activate drones
pip install -e .

If needed, install build-essential to build PyBullet.

How do you use this agent?

Navigate to the examples directory and run scripts:

cd gym_pybullet_drones/examples/
python pid.py
python learn.py
python learn.py --multiagent true
LATEST_MODEL=$(ls -t results | head -n 1) && python play.py --model_path "results/${LATEST_MODEL}/best_model.zip"

Run tests with pytest tests/. For Betaflight SITL, build the Betaflight firmware separately and run beta.py.

Safety boundaries, hardening & integrations

Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.

Declared capability surface (blast radius)

Local shell command execution

Can run terminal commands; pair with approval gates or container/OS sandboxing.

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

What are this agent's strengths and limitations?

Pros
  • PyBullet-based physics simulation provides realistic dynamics.
  • Compatible with Gymnasium and Stable-Baselines3 2.0, easing integration with existing RL toolchains.
  • Supports both single and multi-agent scenarios, covering a range of research needs.
  • Includes PID and RL examples, lowering the barrier to entry.
Limitations
  • Betaflight SITL example is Ubuntu-only, limiting cross-platform deployment.
  • Requires conda environment management, with specific setup steps.
  • Dependent on PyBullet, which may have GPU/OpenGL context issues on some NVIDIA systems.
  • This is a refactored version; the original IROS 2021 codebase is on a different branch.

How does this agent compare with similar options?

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
gym-pybullet-drones: Quadcopter RL Environment This agent 52 · Major gaps CLIFree ★ 2.2k 11d ago Python —
Mobile-Agent: A Family of Powerful GUI Agents 32 · Major gaps Hosted serviceFreemium ★ 9.4k 1mo ago Python —
GOD Agent Society Control Room 54 · Major gaps CLIFree + model costs ★ 1.3k 8d ago Python OpenAI API
EDDI Conversational AI Orchestration 80 · Good Self-hosted serviceFree + model costs ★ 393 1d ago Java OpenAI API

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Major gaps
52/ 100 5-point scale 2.6 / 5
Trust 13/29
Reliability 5/14
Adaptability 12/18
Convention 10/18
Effectiveness 7/13
Verifiability 5/8
Why each dimension lost points
Trust13 / 29 · 2.2/5

The code and examples are centered on local PyBullet simulation and training; CI declares contents: read, supporting a moderate least-privilege score. The README describes installation, cloning Betaflight SITL, and running examples, but does not document confirmation for external effects or rollback. Sensitive-data handling is not addressed. Dependencies have names and version constraints but no supplied security audit or lockfile evidence. The README gives paper, repository, and lab affiliations, but publisher identity remains unknown, so attribution is not fully established.

Reliability5 / 14 · 1.8/5

The README's Gymnasium, SB3, and PettingZoo examples align with the project description. Test source covers the PettingZoo API, observations, and action mapping, supporting ordinary static consistency. Dependency availability is qualified by Python and platform requirements; the README gives some build guidance but no locked environment. The sample shows no user-facing error diagnosis or recovery guidance, so failure-message support scores zero.

Adaptability12 / 18 · 3.3/5

Documentation covers PID, downwash, single- and multi-agent reinforcement learning, PettingZoo, and Betaflight SITL. It explains per-agent observations and shared team rewards. Ubuntu and SITL drone-count constraints are stated, while simulator-model and broader capability boundaries remain thin, so these criteria do not receive full marks.

Convention10 / 18 · 2.8/5

The README is organized around installation, usage, tests, and citation, with control, RL, and multi-agent examples. The package name and version are explicit in pyproject.toml, and installation notes include platform-specific dependency guidance. The MIT license text is complete and earns full marks. Limitations appear only as scattered platform constraints and TODOs; the sample has no changelog, and maintenance responsibility is only partially indicated by authorship and repository affiliation.

Effectiveness7 / 13 · 2.7/5

Example commands, code snippets, and result-path instructions help users run simulation and training, and the PettingZoo wrapper offers a clear multi-agent integration benefit. Installation includes building pybullet locally and several scientific dependencies, while runtime or resource costs are not quantified, limiting the cost-benefit score.

Verifiability5 / 8 · 3.1/5

The main capability claims have corresponding evidence across README examples, dependency declarations, and test source; PettingZoo API behavior and action mapping have test-source support. Static evidence supports ordinary traceability, but it cannot establish successful installation, training outcomes, or current CI results. This review distinguishes documented claims from visible source evidence and does not claim execution.

Risks and how to mitigate them
  • The README gives Python 3.12, Ubuntu 24.04/macOS 26, and pybullet build guidance; support for other platforms and dependency combinations is unknown from this sample.
  • The Betaflight SITL example clones and runs external SITL executables; confirm the local build steps, drone count, and runtime environment before use.
  • Test source and CI configuration are present, but this static review did not execute tests or verify CI results for this revision.
Evidence confidence: Low Reviewed Nov 08, 2026 Reviewed revision 348b5c18a4bb New commits since this review; the score may not cover them
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/gym-pybullet-drones.svg)](https://followagents.com/en/agents/gym-pybullet-drones)
<a href="https://followagents.com/en/agents/gym-pybullet-drones"><img src="https://followagents.com/badge/gym-pybullet-drones.svg" alt="FARS review"></a>

Recent releases

Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.

  1. v1.0.0

FAQ

Does it support Windows or macOS?
The repo states it is tested on Ubuntu 22.04 and macOS 26.2, but the Betaflight SITL example is Ubuntu-only. Windows is not mentioned and may require adaptation.
Is a GPU required?
No, but Ubuntu users with NVIDIA GPUs might encounter OpenGL context issues and need to adjust PRIME mode.
How to access the original paper version?
Run git checkout paper to switch to the original codebase.
Does it support multi-agent training?
Yes, learn.py --multiagent true provides a two-drone hover example.
Was this page helpful?
View on GitHub ↗ Install ↓

Related concepts