UQR Autonomous · Steering A/B · eufs_sim variable_grip

Stanley now beats RPP under variable grip

One change to the Stanley law — regulate the car's course onto the path instead of its heading — reverses the earlier result. Validated against the variable_grip branch physics (matched to 3.7×10⁻¹³) with the real controllers in a closed loop. Tracking error is cross-track RMS in metres; lower is better.

6/7
drivable tracks won by Stanley (only loss: the sharp-cornered rectangle)
up to 48%
tighter than RPP on the steady grip test — and ahead at every grip level
48/48
golden fixtures matched vs the branch physics (eufs · goose · ADS-DV)

The grip effect — steady-radius cornering

Same corner, same speed; only tyre grip changes. This isolates the mechanism, free of corner-cutting. Stanley wins at every grip level.

RPP Stanley + sideslip bar length = tracking error · shorter is better

Track by track

Real eufs tracks with the variable_grip branch's own grip zones, averaged over seeds and speeds where both laws stay on track. Bar = error (shorter is better).

TrackRPPStanleyError (m)ΔWinner

Lap times — small_track (104 m loop)

A working controller has to actually complete clean laps at pace. RPP and the improved Stanley post matched times at matched speed — the win is tracking quality, not pace.

Speed policyRPPStanley + sideslipStanley (default)
cruise ~5.1 m/s 19.6 s 19.6 s clean 17.8 s 26 hits · DSQ
push ~6.7 m/s 14.4 s 14.6 s clean 12.7 s 26 hits · DSQ

Default Stanley's quicker times are corner-cutting into cones (disqualified), not real pace. Absolute lap time is set by the longitudinal speed profile — a bench stand-in — so read the matched-pace, far-fewer-strikes result, not the seconds.

Visual comparisons

Driven paths and per-corner error on the real tracks (push pace, full grip). Steel = RPP, amber = Stanley + sideslip.

small_track: default Stanley cuts corners and clips 26 cones; sideslip version holds the line with zero strikes
Why the fix works. Default Stanley (red) rides inside the line — the standing sideslip offset — clipping 26 cones. The course-compensated law (amber) hugs the centerline: 0 strikes.
small_track cross-track error around the lap: RPP peaks near 1.4 m at corners, Stanley near 1.0 m
Error around the lap. At both major corners RPP peaks near 1.4 m; Stanley + sideslip holds ~1.0 m.

Following the real lap-time-optimiser line — not just the centreline

Re-run with every law following the actual shipping LTO (the CasADi/IPOPT min-time solver the car runs), driven offline at the LTO's own optimal speed profile — 9–12 m/s, e.g. small_track laps in ~9 s. This is how the car really races.

– 1
tracks won by Stanley at full grip on the real LTO line — lower deviation and fewer strikes on every one but rand
0 vs 3
cone strikes on small_track at 11 m/s — Stanley stays clean where RPP cone-DSQs (~30% tighter overall)
grip-blind
the raw LTO speed profile is planned for full grip, so under low grip both laws over-drive — a longitudinal gap (the on-car grip governor), not a steering one
All 9 eufs tracks on the real LTO line at full grip — steel = RPP, amber = Stanley + sideslip, green dashed = LTO line. Stanley wins 6 of 9. Narrow tracks (comp_2021, hairpins) DSQ both at LTO pace; the number is mean cross-track (m) and cone hits.
boa_constrictor driven path, RPP vs Stanley on the LTO line
boa_constrictor✓ StanleyRPP 0.87 m · 14 hits  |  Stanley 0.59 m · 6 hits
small_track driven path, RPP vs Stanley on the LTO line
small_track✓ StanleyRPP 0.61 m · 3 hits  |  Stanley 0.49 m · 0 hits
peanut driven path, RPP vs Stanley on the LTO line
peanut✓ StanleyRPP 0.88 m · 15 hits  |  Stanley 0.65 m · 5 hits
bone driven path, RPP vs Stanley on the LTO line
bone✓ StanleyRPP 0.95 m · 17 hits  |  Stanley 0.58 m · 6 hits
rand driven path, RPP vs Stanley on the LTO line
rand✗ RPPRPP 0.33 m · 2 hits  |  Stanley 0.54 m · 10 hits
rectangle driven path, RPP vs Stanley on the LTO line
rectangle✓ StanleyRPP 0.67 m · 4 hits  |  Stanley 0.50 m · 2 hits
its_a_mess driven path, RPP vs Stanley on the LTO line
its_a_mess✓ StanleyRPP 1.25 m · 26 hits  |  Stanley 0.84 m · 17 hits
comp_2021 driven path, RPP vs Stanley on the LTO line
comp_2021✗ RPPRPP 1.59 m · 49 hits  |  Stanley 1.64 m · 58 hits
hairpins_increasing_difficulty driven path, RPP vs Stanley on the LTO line
hairpins_increasing_difficultymixedRPP 1.26 m · 149 hits  |  Stanley 3.03 m · 12 hits

Absolute strikes are high for both — the LTO races at 9–12 m/s on cone-lined tracks barely wider than the car, so both clip; the win is relative. The LTO optimises for the same eufs vehicle the plant simulates; solver is CasADi/IPOPT min-time with a convex min-curvature QP warm-start (used directly when the NLP maxes iterations).

Can you trust the simulation?

The plant is a port of the branch's DynamicBicycle, checked against the branch's own golden fixtures. The controllers are the real shipping code.

48/48
golden fixtures matched across three cars and the un-zoned baseline
3.7e-13
worst deviation from branch physics (acceptance gate: 1e-9)
140
existing controller tests still pass — new term is off by default

What changed

A dynamic car cornering at the limit slides: its velocity points off its heading by the body-slip angle β. Kinematic Stanley nulls heading error, so it settles with a standing offset that grows with grip loss. The fix regulates course (heading + β) onto the path:

heading_err − sideslip_gain · β   (β = atan2(v_y, v_x))

β grows with understeer, so the term self-stiffens in low-grip zones. Removing the offset also let the cross-track gain firm up (0.3 → 0.6), which tightened tracking and improved jitter robustness. Default gain is 0 — bit-identical to today's law until switched on.

Honest caveats

  • Past the physical grip limit, no law helps — if a corner can't be made, both slide off; Stanley can be marginally worse into a saturated tyre. Runs stay in the achievable envelope.
  • rectangle is the one loss — four sharp 90° corners with long straights, where sideslip gives no benefit and the firmer gain overshoots.
  • Two tracks excluded (comp_2021, hairpins): too narrow for a 1.5 m car — both laws clip regardless; Stanley is still ~2:1 less-bad.
  • Idealised inputs — perfect-EKF sideslip and a modelled planner jitter; full Gazebo/ROS confirmation is future work.