Distributed Model Predictive Control (DMPC) for Multi-Drone Motion Planning with Dynamic Goal Locations
SwarmSync extends traditional DMPC approaches to handle dynamic goal tracking in multi-agent drone systems using physics-based simulation with gym-pybullet-drones.
Traditional DMPC approaches assume static goal locations known at the start. SwarmSync addresses real-world scenarios where drones need to:
- Track moving targets in real-time
- Adapt trajectories to changing mission objectives
- Maintain collision-free paths with dynamic goals
- Coordinate multiple agents in dense environments
- Bézier Curve Parameterization: Smooth trajectory generation
- On-Demand Collision Avoidance: 50% faster than traditional BVC methods
- Event-Triggered Replanning: Adaptive response to disturbances and goal changes
- Distributed QP Optimization: Real-time solving at 5 Hz planning rate
- gym-pybullet-drones Integration: Physics-based quadrotor dynamics with Crazyflie 2.0 models
Adapting the optimization problem to track moving targets while preserving collision-free guarantees in a realistic physics simulator.
# Python 3.7+
pip install numpy matplotlib pybullet pybullet_data tqdmgit clone https://github.com/Shreyas0812/SwarmSync.git
cd SwarmSyncpython viz_trajectory.pypython viz_trajectory_goals.py --trajectory trajectories.txt --goals goals.txtOr use the shorthand:
python viz_trajectory_goals.py -t trajectories.txt -g goals.txtpython plot_results_python.pyThis generates:
- Distance to target over time
- 3D trajectory animations
- Performance metrics
Contains the planned trajectories for all drones:
- Line 1:
N N_cmd pmin[3] pmax[3](metadata) - Lines 2-4: Initial positions
pofor N drones (x, y, z) - Lines 5-7: Final positions
pffor N_cmd commanded drones - Lines 8+: Trajectory data
pk(3 lines per drone: x, y, z coordinates over time)
Contains dynamic goal trajectories:
- 3 lines per drone (x, y, z coordinates)
- Each line has timestep columns showing goal evolution
SwarmSync/
│
├── viz_trajectory_goals.py # PyBullet visualization with dynamic goals
├── viz_trajectory.py # PyBullet visualization with static goals
├── plot_results_python.py # MATLAB-equivalent plotting script
│
├── trajectories.txt # Generated trajectory data
├── goals.txt # Dynamic goal trajectories
│
├── DMPC-Pitch.md # Project presentation (Marp slides)
├── DMPC-Pitch.pdf # Compiled presentation
│
└── README.md # This file
- ✓ 90%+ success rate with 30 agents in dense environments
- ✓ 50% reduction in travel time vs. traditional methods
- ✓ Real-time capable (20 Hz control with 20 drones)
- Shreyas Raorane (@Shreyas0812)
- Kabir Puri (@kaRpuri)