Skip to content

fix(honda): arbitrate Alpha Long braking from compensated force - #124

Open
RiskyBiscuit-arc wants to merge 1 commit into
firestar5683:Domfrom
RiskyBiscuit-arc:fix-honda-alpha-long-gas-brake
Open

fix(honda): arbitrate Alpha Long braking from compensated force#124
RiskyBiscuit-arc wants to merge 1 commit into
firestar5683:Domfrom
RiskyBiscuit-arc:fix-honda-alpha-long-gas-brake

Conversation

@RiskyBiscuit-arc

Copy link
Copy Markdown

Summary

Port the Honda Bosch Alpha Long gas/brake arbitration fix to StarPilot while
preserving StarPilot's separate Accord 11G MVL crossover behavior.

Ordinary Bosch propulsion magnitude is calculated from gas_pedal_force, which
contains requested acceleration plus hill and aerodynamic road-load compensation.
Before this change, StarPilot passes no force value for ordinary Bosch vehicles, so
the CAN packer falls back to raw requested acceleration to decide whether gas or
braking is active. The magnitude and mode are therefore selected in different
physical domains.

This change:

  • selects ordinary Bosch brake entry below -0.12 m/s² adjusted force;
  • releases braking above -0.02 m/s², creating a stateful coast band;
  • preserves the stopping-state brake override and resets state when long control is
    inactive;
  • passes adjusted force through to the CAN packer for ordinary Bosch vehicles; and
  • enforces gas/brake mutual exclusion again at the final CAN boundary.

The Accord 11G MVL path keeps its existing force crossover and is not retuned by
this PR.

Fault evidence and rationale

The original failure route, 00000002--aa8501ddcb, captures PCM P061B beginning
at 951.918310 seconds. The preceding 3.681 seconds contain a continuous outgoing
Honda 0x1DF contradiction: positive GAS_COMMAND together with negative
ACCEL_COMMAND, BRAKE_REQUEST=1, and BRAKE_LIGHTS=1. Across the route there
are 1,584 frames with positive gas and asserted braking.

The installed controller that produced that route enabled gas from adjusted force
but enabled braking independently from raw acceleration. P061B appearing during the
sustained contradiction makes Honda's powertrain command/torque plausibility monitor
a plausible cause of the check-engine fault. This is strong timing and A/B evidence,
not proof of the PCM's proprietary internal decision. A memory leak is not supported
by the route: relevant process memory remains stable, available RAM stays above
554 MiB, and there is no OOM, process restart, invalid CAN, or openpilot ACC fault.

The first raw-acceleration-only correction prevented simultaneous commands but caused
an acceleration/coast cycle. On route 00000003--1423cb6de2, it suppressed positive
road-load-compensated gas for about 23.96 of 87.3 engaged seconds and repeatedly
reapplied hundreds of gas units as raw acceleration crossed the gate.

The follow-up route, 00000004--dcc6a5b59e, showed why keeping raw acceleration as
the brake selector still felt unnatural on inclines and with leads: 2,336 brake
frames occurred while reconstructed adjusted tractive force was positive, including
1,987 frames that suppressed positive calculated gas. This discontinuity is especially
visible in full E2E mode, where small model-requested acceleration changes can cross a
raw threshold even though hill/drag compensation still calls for propulsion.

Exact-source open-loop replay of the final same-domain candidate produced zero
positive-gas-plus-brake frames. It reduced brake runs from 39 to 11 on the follow-up
route and from 22 to 11 on the complete fault route, while preserving propulsion on
all 1,584 original conflict frames. The owner reports that road testing so far has
not reproduced the fault and longitudinal behavior is smoother, particularly in full
E2E mode. That report is encouraging but does not yet prove long-duration P061B
prevention or establish these thresholds as final for every Honda Bosch platform.

Validation

  • StarPilot Honda suite: 210 passed
  • Panda Honda safety suite: 369 passed, 267 skipped
  • Ruff: all three changed files pass
  • git diff --check: passes
  • PR diff: three Honda files only

The dedicated StarPilot acceleration test cannot import locally because the checked-in
msgq/ipc_pyx.so is not a valid Mach-O binary on this Mac. This PR does not change the
planner; its full-E2E benefit comes from removing the downstream actuator-mode
discontinuity after the planner output.

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.

1 participant