Skip to content

Bosch-A longitudinal: Testing's actuator modules on Bosch-A cars - #4

Merged
nrdr merged 2 commits into
nrdr:nrdr-developmentfrom
trung791997:bosch-a-long-actuator
Nov 8, 2026
Merged

nrdr merged 2 commits into
nrdr:nrdr-developmentfrom
trung791997:bosch-a-long-actuator

Conversation

@trung791997

Copy link
Copy Markdown

Stacked on #3 (the Bosch-A parser port). Review only the top commit, 427f198.

This brings Testing's Bosch-A actuator code from Biscuit-Labs/openpilot Honda-PTM-Testing into nrdr. On qualifying Bosch-A cars it replaces nrdr's gas and wind factors and its Bosch extra-brake controller. It is always on, with no toggles. Other cars are unchanged.

Ported from Testing: bosch_longitudinal.py (including BoschABrakeEdge), brake_onset.py, bosch_low_speed_brake.py and bosch_gas_learner.py.

  • brake_onset, bosch_low_speed_brake and bosch_gas_learner are byte-identical to Testing.
  • bosch_longitudinal only adds star7_params and update_mvl_gas. No number or logic from Testing changed.

When it runs

  • The car is a Bosch-A platform with the Bosch-A radar active (radarUnavailable False) and openpilot longitudinal. A Civic with its radar turned off keeps nrdr's path.
  • Cars using the alternate Bosch radar (BOSCH_ALT_RADAR) are not included, because nrdr's Bosch-A list leaves them out. Testing's list includes them. The 2019 Civic is not affected.

Gas learner

  • Testing's CivicGasLearner runs on HONDA_CIVIC_BOSCH only, as on Testing. Other Bosch-A cars get Testing's fixed gas and wind factors.
  • On the Civic it also replaces MVL's learner when MVL is on (mvl_longitudinal.py, update_mvl_gas). The car owner reported that MVL's learner over-revs on hills.
  • With MVL on, the Civic learner works on MVL's gas table, not on Testing's 750 table.

Stopping

  • On this path the stop counter counts the stopping state alone, as Testing does (Testing carcontroller l.257).
  • nrdr's extra accel <= 0 condition stays for every other Bosch car. That condition was there because nrdr's stopping ramp can still send positive acceleration. On this path the ramp is not used.
  • Result: if the planner says "stopping" but asks for positive acceleration, standstill stays held, where nrdr would release it.
  • test_bosch_stopping.py has updated Civic expectations that follow from this rule. The sent acceleration in the last case was recorded from a run.

hondacan.create_acc_commands gains an optional braking=None argument. Callers that leave it out get the old behaviour.

Tests

  • Static only. Nothing here is replay- or road-validated on nrdr.
  • Added test_bosch_longitudinal, test_brake_onset, test_bosch_low_speed_brake and test_bosch_gas_learner from Testing.
  • Added test_bosch_a_long_wiring, 11 tests covering the gate, the replaced controllers and the MVL learner swap.
  • opendbc/car/honda/tests: 1267 passed, 43 failed, 3 skipped. The 43 failures also fail without this change: 42 in test_mvl_priority.py and 1 in test_mvl_sync.py.
  • ruff is clean on the changed files.

🤖 Generated with Claude Code

Peter Nguyen and others added 2 commits November 8, 2026 13:38
…M-Testing

Moves the Bosch-A decoding into a new bosch_a_radar.py (BoschARadar), copied from
Biscuit-Labs Honda-PTM-Testing. RadarInterface(CP, CP_SP) now delegates the Bosch-A
path to it and keeps only the Nidec path and nrdr's selection (DBC name plus
radarUnavailable). The old inline Bosch-A code is deleted. point_statuses and a
settable v_ego are exposed on the wrapper.

Behavior now matches Testing: per-car ROM range offset, U11 at 1/72 m/s, 14.35 Hz,
life-counter saturation, rail bounds, coast bounds including reversing coast,
re-anchor/innovation, vrel-rate check, raw U11 0 = unmeasured. Testing's former
toggles are hard-coded to its current defaults; no Params reads, no DBC changes.

Tests: ported Testing's decoder tests (139) and radar-interface tests (the portable
ones, 14 incl. parametrized); nrdr's 82 tests kept with expectations updated where
Testing intentionally changed them (1/72 U11, 14.35 Hz, -346/128 offset, stale
velocity no longer deletes the point).

Evidence is static tests only; nothing here is road- or replay-validated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…A cars

Ports bosch_longitudinal (BoschABrakeEdge), brake_onset, bosch_low_speed_brake and
bosch_gas_learner from Biscuit-Labs Honda-PTM-Testing. On qualifying Bosch-A cars they
replace nrdr's gas/wind factors and Bosch extra-brake controller. The Civic gas learner
(HONDA_CIVIC_BOSCH only, as on Testing) also replaces MVL's learner when MVL is on.
The stop counter on this path follows Testing (stopping state alone). Static evidence only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nrdr
nrdr merged commit 427f198 into nrdr:nrdr-development Nov 8, 2026
1 check passed
@nrdr

nrdr commented Nov 8, 2026

Copy link
Copy Markdown
Owner

Reconciled the two repositories: opendbc's nrdr-development now points directly to 427f1986ed241f111d106cc72cdefbda5efe5f7f, the exact revision already selected by merged nrdr/openpilot#27. The fast-forward includes both this actuator commit and its parser parent (#3), with no merge conflicts or source edits.

PR #2's Civic Bosch/Insight 3840 torque limits remain present. The older radar PR #1 is already ported and superseded. This reconciliation does not add replay/road-validation evidence or deploy anything to a vehicle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants