Home▸Articles▸Robotics & Kinematics

Lane Keeping Lab: Pure Pursuit and Stanley Controller

A comprehensive study of autonomous vehicle lane-keeping algorithms using the kinematic bicycle model.

mysimulator teamUpdated June 2026≈ 3 min read▶ Open the simulation

What Pure Pursuit Is

Pure pursuit is an algorithm used for path following where a vehicle steers towards a target point that lies ahead of its current position along the desired path. This approach simplifies the control problem by focusing on the immediate target, making it computationally efficient and easy to implement.

The key idea behind pure pursuit is to calculate the angle required to steer the vehicle so that it follows the path as closely as possible, without considering the curvature of the path or the vehicle's dynamics.

Stanley Controller

The Stanley controller is a more advanced algorithm designed for autonomous vehicles. It combines pure pursuit with a proportional-derivative (PD) controller to adjust both steering and speed based on the current position relative to the desired path.

By incorporating a PD controller, the Stanley method can better handle variations in the vehicle's dynamics and improve stability and accuracy compared to pure pursuit alone.

live demo · related simulation● LIVE

Kinematic Bicycle Model

The kinematic bicycle model is a simplified representation of a car's motion that assumes no acceleration or deceleration, only turning. This model focuses on the vehicle's orientation and position relative to its path, making it ideal for studying steering dynamics.

By using this model, researchers can analyze how different control algorithms perform under various conditions without the complexity introduced by dynamic effects.

Comparing Pure Pursuit and Stanley

In the Lane Keeping Lab simulation, pure pursuit and the Stanley controller are compared side by side to evaluate their performance. This allows for a detailed analysis of how each algorithm handles different path characteristics and vehicle dynamics.

By measuring steady-state circle offset and maximum stable speed against analytic predictions, the simulation provides insights into which algorithm is more suitable for specific driving conditions.

Frequently asked questions

What are the main differences between pure pursuit and Stanley controllers?

Pure pursuit focuses on steering towards a target point ahead of the vehicle's current position, while the Stanley controller combines this with a PD controller to adjust both steering and speed. This makes Stanley more robust in handling variations in dynamics.

Why is the kinematic bicycle model used in this simulation?

The kinematic bicycle model simplifies vehicle dynamics by assuming no acceleration or deceleration, making it easier to study steering behavior without the complexity of dynamic effects.

How does the Lane Keeping Lab measure performance of these controllers?

Performance is measured using steady-state circle offset and maximum stable speed against analytic predictions. These metrics help in understanding how well each controller follows a path under different conditions.

Can this simulation be used to test other vehicle models or control algorithms?

Yes, the Lane Keeping Lab is designed to be flexible and can accommodate various vehicle models and control algorithms for further research and development.

Try it live

Everything above runs in your browser — open Lane Keeping Lab: Pure Pursuit, Stanley and the Kinematic Bicycle Model and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open Lane Keeping Lab: Pure Pursuit, Stanley and the Kinematic Bicycle Model simulation

What did you find?

Add reproduction steps (optional)