Multiple UAS
UAT 366 Indoor Autonomous and Multi-Unmanned Aircraft Systems
Lesson
By the end of this module you will be able to
- Assign tasks to several drones by exhaustive search and compare with a greedy method
- Compute the closest approach of two drone paths between waypoints
- Explain downwash, the Boids rules and ORCA in multi-drone flight
- Estimate the communication bandwidth of a drone swarm
Why this matters
One drone cannot count the whole warehouse in a night; three can do it faster, but new questions arise. Which drone does which job? Do the paths cross? Does the downwash from an upper drone disturb one below? Can the network carry every drone’s data? The review by Chung et al. (2018) concludes that multi-drone coordination must handle task allocation, path planning and communication together.
Task allocation
Matching drones to tasks with the least total distance is the assignment problem, solved exactly by the Hungarian method (Kuhn, 1955). For small numbers exhaustive search works. A greedy method, where each drone in turn takes its nearest remaining task, is fast but can be very poor.
Example 1 Exhaustive search versus greedy
import math
from itertools import permutations
drones = [(0, 0), (0, 30), (60, 0), (60, 30)]
tasks = [(10, 25), (35, 15), (30, 5), (50, 25)]
cost = [[math.dist(d, t) for t in tasks] for d in drones]
best = min(permutations(range(4)), key=lambda p: sum(cost[i][p[i]] for i in range(4)))
used, greedy = set(), []
for i in range(4):
j = min((j for j in range(4) if j not in used), key=lambda j: cost[i][j])
used.add(j)
greedy.append(j)
for name, plan in (("optimal", best), ("greedy", greedy)):
total = sum(cost[i][plan[i]] for i in range(4))
pairs = ", ".join(f"D{i + 1}->T{plan[i] + 1}" for i in range(4))
print(f"{name:<8} {total:6.1f} m {pairs}")
optimal 81.9 m D1->T3, D2->T1, D3->T2, D4->T4
greedy 131.0 m D1->T1, D2->T2, D3->T4, D4->T3
D1 takes its nearest task T1 first, which forces D2, close to T1, to travel far. The total is much worse than the optimum. For dozens of drones, use the Hungarian method, which finds the optimum without trying every permutation.
Closest approach between waypoints
The knowledge unit on swarm trajectories warns that checking only at waypoints can miss close approaches between them. Two drones swapping places are 2 m apart at both the start and the end, yet collide halfway.
Example 2 Closest approach between two path segments
Assume both drones move in straight lines at constant rates over the same interval.
def closest(a0, a1, b0, b1, t0=0.0, dt=2.0):
r0 = [a - b for a, b in zip(a0, b0)]
dr = [(a1i - b1i) - r for a1i, b1i, r in zip(a1, b1, r0)]
dd = sum(v * v for v in dr)
u = 0.0 if dd == 0 else min(1.0, max(0.0, -sum(r * d for r, d in zip(r0, dr)) / dd))
d = sum((r + u * v) ** 2 for r, v in zip(r0, dr)) ** 0.5
return d, t0 + u * dt
cases = {
"swap on the same line": ((-1, 0, 2), (1, 0, 2), (1, 0, 2), (-1, 0, 2)),
"swap 0.5 m apart sideways": ((-1, 0, 2), (1, 0, 2), (1, 0.5, 2), (-1, 0.5, 2)),
"one above the other": ((0, 0, 2.0), (2, 0, 2.0), (0, 0, 2.4), (2, 0, 2.4)),
}
for name, (a0, a1, b0, b1) in cases.items():
d, t = closest(a0, a1, b0, b1)
print(f"{name:<26} ends {sum((a - b) ** 2 for a, b in zip(a0, b0)) ** 0.5:.1f} m apart -> "
f"min {d:.2f} m at t {t:.1f} s")
swap on the same line ends 2.0 m apart -> min 0.00 m at t 1.0 s
swap 0.5 m apart sideways ends 2.1 m apart -> min 0.50 m at t 1.0 s
one above the other ends 0.4 m apart -> min 0.40 m at t 0.0 s
In the third case the drones stay 0.4 m apart vertically the whole way, which looks safe, but the lower drone sits in the downwash of the upper one. Hönig et al. (2018) therefore model each drone as an ellipsoid that is longer vertically than horizontally, so the vertical separation threshold must be larger than the horizontal one. The actual values must come from testing the drone model in use.
Flocking and mutual avoidance
- Boids (Reynolds, 1987) simulates a flock with three rules each bird applies on its own. The original names are collision avoidance, velocity matching and flock centering; today they are usually called separation, alignment and cohesion. There is no central commander.
- ORCA (van den Berg et al., 2011) extends velocity obstacles so that each drone takes half the responsibility for avoidance, suitable for many drones deciding independently.
- Crazyswarm (Preiss et al., 2017) is an experimental platform for swarms of small indoor drones, now available as Crazyswarm2 on ROS 2. Kushleyev et al. (2013) demonstrated agile indoor flight of many drones. Drone shows use software such as Skybrush with pre-planned trajectories.
A pre-planned show is different from a swarm that decides for itself. Warehouse stock counting usually combines central planning with local avoidance.
Communication
Every drone sends frequent position and status updates, and the total bandwidth grows with the number of drones.
Example 3 Swarm bandwidth
MSG_BYTES, RATE_HZ, OVERHEAD = 60, 30, 1.3 # position message, rate, protocol overhead
for n in (3, 10, 50):
kbps = n * RATE_HZ * MSG_BYTES * 8 * OVERHEAD / 1000
print(f"{n:>2} drones: {kbps:6.1f} kbit/s for position updates only")
3 drones: 56.2 kbit/s for position updates only
10 drones: 187.2 kbit/s for position updates only
50 drones: 936.0 kbit/s for position updates only
These figures exclude camera video. If every drone streamed video, bandwidth would rise by hundreds of times. Processing on board and sending only results matters a great deal in multi-drone work.
Module lab
Lab: two drones in the lab
- Use the code from Example 1 to assign stock-counting tasks to two or three drones and compare with greedy.
- Plan each drone’s path, check the closest approach of every segment with the code from Example 2, and fix any below the threshold.
- Test in SITL or Crazyswarm2 simulation first, then fly two real drones at low speed.
- Measure downwash by holding one drone above another at different separations and logging the lower drone’s disturbance.
- Measure the real network bandwidth during flight and compare with Example 3.
Common mistakes
Watch out
- Using greedy without checking its quality.
- Checking separation only at waypoints.
- Using the same vertical and horizontal separation despite downwash.
- Streaming video from every drone over one network.
- Flying multiple drones for the first time for real without simulating first.
Summary
- Task allocation is an assignment problem, solved exactly by the Hungarian method; greedy can be very poor.
- Closest approach must be checked between waypoints, not only at them.
- Downwash requires larger vertical separation than horizontal separation.
- Boids and ORCA let each drone decide for itself; bandwidth grows with the number of drones.
Check your understanding
- With 5 drones and 5 tasks, how many possible assignments are there?
- Drone A goes from (0, 0) to (4, 0) while drone B goes from (4, 1) to (0, 1) over the same time. What is the closest distance?
- Why is checking only at waypoints not enough?
- What are the popular names of the three Boids rules?
- 20 drones each send 60-byte messages 30 times per second (ignoring headers). What bandwidth is used?
Answers
- 1 m, when they pass at x = 2.
- Two drones can come close between waypoints even if they are apart at every waypoint.
- Separation, alignment and cohesion.
- bit/s = 288 kbit/s
Key formulas
| Closest approach of two drones in one segment | |
| Total bandwidth |
Key references
- Kuhn, H. W. (1955). The Hungarian method for the assignment problem. Naval Research Logistics Quarterly, 2(1–2), 83–97. link
- Chung, S.-J., Paranjape, A. A., Dames, P., Shen, S., & Kumar, V. (2018). A survey on aerial swarm robotics. IEEE Transactions on Robotics, 34(4), 837–855. link
- Kushleyev, A., Mellinger, D., Powers, C., & Kumar, V. (2013). Towards a swarm of agile micro quadrotors. Autonomous Robots, 35(4), 287–300. link
- Preiss, J. A., Hönig, W., Sukhatme, G. S., & Ayanian, N. (2017). Crazyswarm: A large nano-quadcopter swarm. In 2017 IEEE International Conference on Robotics and Automation (pp. 3299–3304). IEEE. link
- Hönig, W., Preiss, J. A., Kumar, T. K. S., Sukhatme, G. S., & Ayanian, N. (2018). Trajectory planning for quadrotor swarms. IEEE Transactions on Robotics, 34(4), 856–869. link
- Reynolds, C. W. (1987). Flocks, herds and schools: A distributed behavioral model. ACM SIGGRAPH Computer Graphics, 21(4), 25–34. link
- van den Berg, J., Guy, S. J., Lin, M., & Manocha, D. (2011). Reciprocal n-body collision avoidance. In Robotics research (Springer Tracts in Advanced Robotics, Vol. 70, pp. 3–19). Springer. link
- IMRCLab. Crazyswarm2: A ROS 2 testbed for aerial robot teams [Documentation]. link
- CollMot Robotics. Skybrush Live documentation. link
Further reading
Study the assigned knowledge units in advance, review media and take the module quiz
In class / field
Intensive lab and field practice recorded in a lab notebook
Learning evidence: Lab notebook signed by the instructor