Note: discontinued and incorporated into larger project here: https://github.com/tjards/swarming_sim
This project implements flocking for a large network of aerial vehicles. The strategy is based on the (elegant) 3-part distributed formulation proposed in:
Reza Olfati-Saber, "Flocking for Multi-Agent Dynamic Systems: Algorithms and Theory", IEEE Transactions on Automatic Control, Vol. 51 (3), 3 Mar 2006.
The formulation involves three distinct terms:
- Alpha-Alpha Interaction (alignment) - encourages the agents to align in a lattice formation. The function represents other vehicles as "alpha" agents.
- Alpha-Beta Interaction (obstacle avoidance) - discourages the agents from colliding with obstacles. The function represents obstacles as "beta" agents.
- Gamma Feedback (navigation) - encourages motion towards a static or dynamic target. The function represents the target as a "gamma" agent.
When combined together, these terms produce an emergent behaviour that is refered to as "flocking".
Below are several animated plots showing the behaviour of the network. Obstacles are defined as spherical objects in space (in red) or as planes (in magenta). The vehicles are represented in blue. The target is green. We generate dashed blue lines to show when vehicles successfully form a lattice with neighbouring vehicles.