drone-swarm
Python SDK for multi-drone swarm orchestration.
Turn a collection of ArduPilot drones into a coordinated swarm with 10 lines of Python.
from drone_swarm import Swarm
import asyncio
async def main():
swarm = Swarm()
swarm.add("alpha", "udp:127.0.0.1:14550")
swarm.add("bravo", "udp:127.0.0.1:14560")
await swarm.connect()
await swarm.takeoff(altitude=10)
await swarm.formation("v", spacing=15)
await swarm.rtl()
asyncio.run(main())
Why drone-swarm?
| Problem | Status Quo | drone-swarm |
|---|---|---|
| Coordinate multiple drones | Raw MAVLink from scratch | swarm.formation("v") |
| Test without hardware | Manual SITL setup per drone | Swarm.simulate(n=5) |
| Handle mid-flight failures | Hope for the best | Auto-failsafe + replanning |
| Preflight safety checks | DIY scripts | run_preflight_checks() |
Features
- Swarm coordination -- synchronized takeoff, landing, RTL, and formations
- Formation flying -- V-shape, line, grid, circle, orbit, and custom patterns
- Mission planning -- area sweep, patrol, orbit point, and intercept
- Safety first -- preflight checks (GPS, battery, compass, failsafes, Remote ID, vibration), geofencing, emergency land/kill
- Simulation -- built-in SITL launcher for hardware-free testing
- Async-native -- built on asyncio for concurrent multi-drone I/O
- Telemetry -- real-time position, battery, and heartbeat monitoring with auto-RTL on low battery
- Configurable -- YAML/dict config with sensible defaults
Quick Install
pip install drone-swarm
Requires Python 3.11+. For simulation support:
pip install drone-swarm[sim]
Documentation
Full docs, tutorials, and API reference: docs/index.md
Who is this for?
- Developers building drone applications (agriculture, inspection, SAR, mapping)
- Researchers studying swarm robotics and multi-agent coordination
- Students learning autonomous systems and MAVLink
- Startups building commercial drone services
- Defense integrators needing an open, auditable swarm layer
Contributing
Contributions welcome. See CONTRIBUTING.md for guidelines.
git clone https://github.com/yuyongju/drone-swarm.git
cd drone-swarm
pip install -e ".[dev]"
pytest
License
MIT License. See LICENSE for details.
Metadata
Release files for drone-swarm 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| drone_swarm-0.1.1.tar.gz | 3.0 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| drone_swarm-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 3.1 MB
Release files / drone_swarm-0.1.1.tar.gz
| Download URL | drone_swarm-0.1.1.tar.gz |
|---|---|
| Size | 3.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5c37ac0204f72da65a580d3ab18bad904bbee94aeb126faa398363c98e5cbc80
|
|
BLAKE2b-256 checksum How to use checksums |
edc57a904c52b9511e17f57cf65c5aaccd734f28a131208434dc8a283158a415
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / drone_swarm-0.1.1-py3-none-any.whl
| Download URL | drone_swarm-0.1.1-py3-none-any.whl |
|---|---|
| Size | 72.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2025321e0119ce20304855454b06515851768e931532fb761e7a0819d8cbae8b
|
|
BLAKE2b-256 checksum How to use checksums |
dd0c555879dd619ea9da804f8d017a388ecbf8b4620c1f5c72f75c2fc5bc8b7b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|