Skip to content

ford ALP: restore StarPilot reference guards (narrow lane, laneline std, NaN params) - #179

Merged
alan-polk merged 3 commits into
BluePilotDev:bp-dev-ALPfrom
ghbarker:alp-guards
Aug 14, 2026
Merged

ford ALP: restore StarPilot reference guards (narrow lane, laneline std, NaN params)#179
alan-polk merged 3 commits into
BluePilotDev:bp-dev-ALPfrom
ghbarker:alp-guards

Conversation

@ghbarker

@ghbarker ghbarker commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Description

Three small hardenings to the angle-mode lane centering trim, each restoring behavior from the StarPilot reference the port was based on:

  • Narrow-lane floor restored. np.interp saturates below its first breakpoint, so the width-tolerance table scored a 1.5 m "lane" (double-stripe repaint, gore-point paint) at full trust 0.81 — with confident probs that's scale 1.0 and full-authority centering between stripes. StarPilot rejected width < 2.6 m; this restores that floor as a smooth edge (2.4–2.8 m) to match the blend design. No change from 2.8 m up.
  • Laneline std restored into the confidence min(). Prob says a line exists; std says how well we know where it is. Rain/glare produces high-prob, high-std lines that previously got full centering weight. StarPilot gated at std 0.3; this fades 0.3 → 0.5 instead of gating hard.
  • NaN guard on offset/gain. Both are float params and NaN passes straight through clip() — a corrupt param propagated into kappa_cmd. Reset instead.

The fourth item from the original version of this PR (a post-gain ceiling on the applied correction) is split out to #181 per review, so the ceiling value can be chosen from on-road testing without blocking these guards.

Verification

Unit tests only — not road-tested (car is down). Five new tests: one per guard (narrow lane, high std, NaN offset, NaN gain) plus one that pins the current fallback-bias semantics as-is; all five fail on bp-dev-ALP without this change. In the existing suite, the fake model fixture regains laneLineStds and a few gain values were adjusted; 25/25 pass.

The three reference guards (narrow-lane floor, laneline std, NaN params) stay.
The 0.0015 post-gain ceiling moves to a follow-up PR so the ceiling value can
be chosen from on-road testing; tests revert to the uncapped 0.004 ceiling.
narrow-lane floor, laneline std, NaN params, and a pin on the fallback-bias
semantics (constant push by design). All five fail without the guards.
@ghbarker ghbarker changed the title ford ALP: restore StarPilot guards (narrow lane, laneline std, NaN pa… ford ALP: restore StarPilot reference guards (narrow lane, laneline std, NaN params) Aug 13, 2026
@alan-polk
alan-polk merged commit b3f31c2 into BluePilotDev:bp-dev-ALP Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants