Bicycle Model & Stanley Controller

This interactive simulator explores Bicycle Model & Stanley Controller in Engineering. Kinematic bicycle (rear-axle): δ = θ_e + atan2(k_e·e, v) Stanley path-following law. Pick oval, race-track, lemniscate, sine-road or S-curve and tune k_e, v, L; live cross-track e(t) and steering δ(t). Use the controls to change the scenario; watch the visualization and any graphs or readouts to connect the model with lectures, labs, and homework.

Who it's for: Best once you already know the basic definitions and want to build intuition. Typical context: Engineering.

Key terms

  • bicycle
  • model
  • stanley
  • controller
  • bicycle stanley
  • engineering

How it works

**Kinematic bicycle model** with the **Stanley path-following controller** used by Stanford's eponymous DARPA Grand Challenge winner. The control law combines two terms: align with the path heading (θ_e) and pull toward the path proportionally to **cross-track error e** measured at the **front axle**, scaled by 1/v: **δ = θ_e + atan2(k_e · e, v)**. Increase **k_e** for tighter tracking on tight curves; decrease it to avoid oscillations. Try changing speed **v** with a fixed **k_e** to see why the atan2 normalization keeps tracking stable across speeds. Bottom panel plots the **cross-track error e(t)** in pink and the **steering δ(t)** in yellow.

Key equations

Bicycle: ẋ = v cosθ, ẏ = v sinθ, θ̇ = (v/L) tanδ
Stanley: δ = θ_e + atan2(k_e · e, v_x), δ ∈ [−δ_max, δ_max]