ROBOTICS 101Concept explainer

Stanley Controller

The Stanley controller steered the robot car that won the 2005 DARPA Grand Challenge. It looks at the front axle, and steers to fix two errors at once: the angle between the car and the path, and how far the front wheels are off the path.

The steering rule

With heading error \(\psi\), cross-track error \(e\) at the front axle, and speed \(v\):

$$\delta = \psi + \arctan\!\left(\frac{k\,e}{v}\right)$$

clamped to the steering limit. The first term lines the car up with the path, the second steers it back onto the path, more gently at higher speed.

What to notice

Stanley pulls back onto the path firmly from a large offset, since the arctangent saturates. Too high a gain makes it twitchy, too low lets it drift wide in curves. Compared with pure pursuit, the faint line, it tends to cut corners less, because it measures error right at the path instead of at a point ahead. It can be more sensitive to noise in the path's heading.