Installation
Clone the repository and install the framework. PyBullet Swarm Sim is designed to be minimal in setup.
git clone https://github.com/SimarcLabs/pybullet-swarm-sim.git
cd pybullet-swarm-sim
pip install -e .
Optional Extras:
# Web dashboard (FastAPI + Plotly)
pip install -e ".[dashboard]"
# RL training support (Stable-Baselines3)
pip install -e ".[rl]"
Running Examples (CLI)
All examples run headlessly via the PyBullet GUI. No config files are required.
Formation Flight (8 drones, V-shape):
python -m swarm_sim.examples.formation_flight --n-drones 8 --formation v
Boids Flocking (12 drones):
python -m swarm_sim.examples.flocking --n-drones 12
Battle Mode (Flocking vs PSO):
python -m swarm_sim.battle.runner --algo-alpha flocking --algo-bravo pso --drones-alpha 10 --drones-bravo 10 --duration 20 --job-id battle-demo
Launching the Web Dashboard
The dashboard provides a browser-based interface for configuring simulations, viewing interactive 3D trajectories, comparing algorithms, and training MARL agents.
python -m swarm_sim.dashboard
The server will start on http://127.0.0.1:8000 and open automatically in your browser.