A distributed, decentralized peer-to-peer navigation mesh and multi-agent flocking telemetry engine designed for autonomous UAV drone swarms in GPS-denied and ad-hoc communication environments.
[UAV-01] <-- 5.8 GHz UDP Heartbeat --> [UAV-02]
\ /
\ /
v v
[Separation] <--- [Reynolds 3D] ---> [Cohesion]
| |
+------------ [UAV-03] ------------+
|
[3D Geofence Enforcer]
- Separation: Inverse-distance weighted repulsive steering prevents mid-air inter-agent collisions.
- Alignment: Vector consensus aligns the headings of local flockmates within a configurable sensing horizon.
- Cohesion: Center-of-mass attraction guarantees cluster integrity during high-speed migrations.
- Target Seeking: Smooth 3D pursuit of navigational waypoints and formation targets.
- Obstacle Avoidance: Artificial Potential Field (APF) repulsive velocity barriers against static and dynamic aerial obstacles.
- Low-latency, connectionless peer-to-peer telemetry heartbeat broadcasting.
- Dynamic ad-hoc mesh adjacency tracking and network graph diameter computation.
- Automatic node liveness monitoring with dead-peer eviction.
- Raft-inspired decentralized leader election for fleet-wide mission commands.
- Minimum-jerk quintic polynomial interpolation generating smooth
$C^2$ continuous flight paths. - Real-time containment clamping within inclusion flight corridors (
INCLUSION_AABB). - Radial clearance repulsion from no-fly zones (
EXCLUSION_CYLINDER). - Automatic flight duration estimation and failsafe return-to-home boundaries.
swarm-nav-mesh/
├── .github/
│ └── workflows/
│ └── ci.yml
├── src/
│ ├── mesh/
│ │ ├── __init__.py
│ │ └── peer.py
│ ├── swarm/
│ │ ├── __init__.py
│ │ ├── flocking.py
│ │ └── ros2_node.py
│ └── telemetry/
│ ├── __init__.py
│ └── planner.py
├── tests/
│ ├── test_mesh.py
│ ├── test_swarm.py
│ └── test_telemetry.py
├── pyproject.toml
├── setup.py
└── README.md
git clone https://github.com/ER-brocode/swarm-nav-mesh.git
cd swarm-nav-mesh
pip install -e ".[dev]"python -m swarm.flocking# Terminal 1: Drone Alpha
python -m mesh.peerpytest tests/ -v- Swarm Convergence: Validated 6-agent flocking convergence to shared targets with zero collision breaches.
- Mesh Consensus: 100% loopback UDP heartbeat packet reception and dynamic leader election.
- Geofence Safety: Strict boundary clamping validated for both 3D bounding boxes and radial exclusion cylinders.
Licensed under the Apache 2.0 License. Author: koushik4475 (koushik4475@gmail.com).