ORCA multi-robot collision avoidance
Ten robots on a circle must each reach the point opposite, so they all meet in the middle. Every step, each robot chooses its own velocity from the positions and velocities of the others, without communication.
Algorithm
For every neighbour \(B\), robot \(A\) finds the smallest change \(u\) of their relative velocity that avoids a collision within 3 s, takes half of it, and keeps the half-plane of velocities
A small linear program then picks, inside all these half-planes and the speed limit, the velocity closest to the one heading straight for the goal. If both robots of a pair choose from their half-planes, they cannot collide within the time horizon. Robots in perfect symmetry would stall in a ring, so every robot keeps slightly to the right, and the crowd flows through the middle like a roundabout.
Code Link
- PathPlanning.ORCA.orca.new_velocity(i: int, positions: ndarray, velocities: ndarray, preferred: ndarray) ndarray
ORCA velocity of robot i; the nearest neighbours’ half-planes come first, so in a crowd the farthest ones are the ones bent.
Standalone project and report
This algorithm is also published as a standalone project, robofan45/orca-collision-avoidance, with an installable package, tests that run on Linux, macOS and Windows, and an IEEE-style technical report (PDF) with measurements and a full bibliography.
Reference
J. van den Berg, S. J. Guy, M. Lin and D. Manocha, “Reciprocal n-Body Collision Avoidance”, Robotics Research: The 14th International Symposium ISRR, Springer, 2011
RVO2 Library, the authors’ reference implementation