The goal pulls, the obstacles push, and the robot rolls downhill. Khatib turned motion planning into physics: an attractive well at the goal, a repulsive hill around each obstacle, and the robot follows the negative gradient of their sum — a fast, reactive planner with no search. Down the center, data flows: the field goes in, the descent runs, the path comes out. The blue team builds and defends it; the red team finds the trap it cannot escape.
source O. Khatib, Real-Time Obstacle Avoidance for Manipulators and Mobile Robots, Int. J. of Robotics Research 5(1), 1986, pp. 90–98 — doi:10.1177/027836498600500106. Rendered, not quoted.
One scalar field over the plane: U(x) = Uatt(x) + Σ Urep(x). The robot moves along −∇U.
Attractive — a bowl at the goal: Uatt = ½ ka·d(goal)². Its pull points straight at the goal and grows with distance. Repulsive — Khatib's hill: Urep = ½ kr(1/d − 1/ρ₀)² when d ≤ ρ₀, and exactly 0 past the influence radius ρ₀.
Live force decomposition at the robot's start:
| term | ‖ force ‖ | points |
|---|
The goal pulls and the obstacles push — Khatib, 1986. It is a reactive planner: gradient-descend the field, no search tree, real-time cheap — and, by construction, trapped by local minima.
That is the exact inverse of the-rrt, which samples the free space and is probabilistically complete but keeps no field to descend. One is smooth and blind; the other is jagged and thorough. Each sphere is the other's premise.
The blue team's live check: re-run the descent on both canonical maps and confirm the known truth — open map reaches & clears, the U-trap halts at ∇U = 0 short of the goal. If red drops the repulsion, this badge is where it shows.
The inputs are a start, a goal, and a set of circular obstacles — each a body radius r inside an influence radius ρ₀ — plus two gains.
| parameter | symbol | value |
|---|---|---|
| attractive gain | ka | 1.0 |
| repulsive gain | kr | 2.2 |
| influence radius | ρ₀ | 2.0 |
| body radius | r | 0.75 |
Click anywhere on the panel below to drop the robot at a new start. Everything downstream is computed from these numbers — nothing is looked up.
The path is traced by stepping along −∇U from the start until the goal is reached or the field goes flat. Change the map or the start — it recomputes on the spot.
What the machine produces, proven: on the open map the descent reaches the goal and the whole path stays collision-free (clearance > r); on the U-trap it halts at a point where ∇U ≈ 0 yet ‖robot − goal‖ > 3 — a genuine local minimum, the classic failure. The current run's verdict is above; these two facts are the output.
The blue team's witness (left) confirms this live; the red team (right) tries to make the path lie.
Only special constructions escape this — Rimon & Koditschek's navigation functions and harmonic (Laplace) fields have no spurious minima, but they cost global structure the reactive method was invented to avoid. The trap on the right is not a bug in this code; it is a property of the method.
"A potential field always finds a path if one exists." Cut. False — a concave obstacle traps it at a local minimum. Completeness needs a navigation function or harmonic field, not plain descent.
"The repulsive push is felt everywhere." Cut. It is exactly zero beyond the influence radius ρ₀ — Khatib's cutoff, asserted to the bit in the witness.
"Gradient descent reaches the global minimum." Kept, corrected. Only when the field is convex. Add one concave obstacle and descent finds a local minimum that is not the goal.
The red team's move: drop the repulsive term — keep only the pull to the goal. Now the path is a straight line that drives through the obstacle. The blue team's witness (window 7) is watching.
Drop the push and the robot ignores the obstacle: the descended path collides, the collision-free check fails, and the witness recomputes and turns red. Nothing is faked; the attack is real and it is caught.