Skip to main content

Python SDK for multi-drone swarm orchestration over MAVLink

Project description

drone-swarm

Python SDK for multi-drone swarm orchestration.

PyPI version Downloads License: MIT CI Python

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

drone_swarm-0.1.0.tar.gz (2.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

drone_swarm-0.1.0-py3-none-any.whl (71.3 kB view details)

Uploaded Python 3

File details

Details for the file drone_swarm-0.1.0.tar.gz.

File metadata

  • Download URL: drone_swarm-0.1.0.tar.gz
  • Upload date:
  • Size: 2.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for drone_swarm-0.1.0.tar.gz
Algorithm Hash digest
SHA256 053d5c2fe6a3c4910451509b8bf54f73327729efcd9b54584c62a6ba067717f2
MD5 7f06b9db62b40207b38a8068dd157ef5
BLAKE2b-256 d3f433b30518b8e0c50242de860ec8054cc0c816c51c63e85833b928fafe3c95

See more details on using hashes here.

File details

Details for the file drone_swarm-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: drone_swarm-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 71.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for drone_swarm-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5c030b012f7e7cdaecb9f9d5a51e8ca016fe81fdaba0941c029c212c3f04634c
MD5 bc84ac8ba4ea853542d062d2293bedd1
BLAKE2b-256 b17c4f0bd6e537766ced269dbcc5f3b6264d4823c55c404b5eaeb17284a581bf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page