gym-pybullet-drones: Quadcopter RL Environment
PyBullet-based Gymnasium environments for single and multi-agent reinforcement learning of quadcopter control.
- Source repo
- learnsyslab/gym-pybullet-drones
- Stars
- ★ 2.2k
- Last updated
- 11d ago v1.0.0
- FARS reviewed
- Nov 08, 2026
- License
- MIT
- Primary language
- Python
- FA score
- 52/100 · Major gaps
At a glance
- How it runs
- Works with
- Platform-specific
- Cost
- Free, no paid service needed
- Setup effort
- Medium · a few setup steps
- You'll need
- 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
- Source review
- 52/100 · Major gaps
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/.
- Researchers developing quadcopter control algorithms can use the environment for single-agent reinforcement learning experiments like hover or trajectory tracking.
- Multi-agent systems researchers can simulate multi-drone coordination tasks using the
--multiagent trueoption, e.g., hovering at different heights. - Control engineers can quickly validate position and velocity control algorithms with the PID examples, adjusting parameters.
- Users interested in Betaflight firmware can test control algorithms in SITL on Ubuntu, interacting with real firmware.
- 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)
Can run terminal commands; pair with approval gates or container/OS sandboxing.
Makes outbound requests; verify telemetry settings and model data routing on private repos.
What are this agent's strengths and limitations?
- 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.
- 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?
Why each dimension lost points
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.
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.
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.
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.
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.
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.
- 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.
Recent releases
Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.
FAQ
Does it support Windows or macOS?
Is a GPU required?
How to access the original paper version?
git checkout paper to switch to the original codebase.Does it support multi-agent training?
learn.py --multiagent true provides a two-drone hover example.Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.