Repository navigation
honda: port the current Bosch-A radar parser from Honda-PTM-Testing - #3
Conversation
…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>
There was a problem hiding this comment.
Thanks for contributing to opendbc! In order for us to review your PR as quickly as possible, check the following:
- Convert your PR to a draft unless it's ready to review
- Read the contributing docs
- Before marking as "ready for review", ensure:
- the goal is clearly stated in the description
- all the tests are passing
- include a route or your device' dongle ID if relevant
|
Verified included in the current development line through #4: Fast-forwarded opendbc's Closing any remaining open PR bookkeeping as included via #4. This is an inclusion/history audit, not additional replay or road validation. |
Brings nrdr's Bosch-A radar parser up to the current one from Biscuit-Labs/openpilot Honda-PTM-Testing. The decoder moves into its own module,
opendbc/car/honda/bosch_a_radar.py. That file is a byte-for-byte copy of Testing's, except that the constructor takes(CP, CP_SP).radar_interface.pynow only picks Nidec or Bosch-A and hands off. nrdr's gate (thehonda_bosch_a_radarDBC,radarUnavailable) and the Nidec path are unchanged.What changes against nrdr's current parser:
measured = False. A degraded point is safer than a deleted one.point_statuses)The settings that were toggles on Testing are fixed on here, with no Params reads: rail interval on, range-derived coast on, newborn leads not published, U11 floor marked unmeasured. The DBC is unchanged: Testing's DBC still has a stale 0.05712 range factor, and nrdr's 0.0625 is the right one.
RadarInterfacegains a settablev_ego, used by the reversing bound, andpoint_statuses. Both are optional for callers. The openpilot side (radard at 14.35 Hz,v_egofrom card, Bosch-A longitudinal) follows in a separate PR to nrdr/openpilot.Tests
test_bosch_a_decoder.py, 139 tests from Testing, andtest_bosch_a_radar_interface.py, 14 tests. nrdr's owntest_bosch_a_radar.pyis kept; its expectations are updated for the 1/72 scale, 14.35 Hz, the per-car offset and held stale points. No test was deleted.opendbc/car/honda/tests: 1209 passed, 43 failed. Before this change: 1045 passed, the same 43 failed (42 intest_mvl_priority.py, 1 intest_mvl_sync.py).opendbc/car/tests: 805 passed, 384 skipped, unchanged.🤖 Generated with Claude Code