commaai / openpilot

openpilot is an operating system for robotics. Currently, it upgrades the driver assistance system in 275+ supported cars.
https://comma.ai/openpilot
MIT License
49.61k stars 9.02k forks source link

VW MQB: Conflict between openpilot and Emergency Assist #23274

Closed jyoung8607 closed 8 months ago

jyoung8607 commented 2 years ago

Describe the bug

When openpilot is engaged, the stock ACC setpoint sometimes decreases to zero without any driver-discernable cause.

For cars that support Emergency Assist, the camera detects long stretches of low driver input torque and tries to take various actions to rouse the driver, and failing that, bring the car to a safe stop in the safest lane it can identify.

Most of those warnings and actions are ignored because openpilot is replacing the involved messages, but in the case of gateway (J533) integration, the camera and ACC radar are still in direct communication, and the ACC radar will see and and execute an EA request to stop the car. This won't happen for openpilot users integrated at the camera.

What hardware does this issue affect?

comma three, comma two, EON Gold

Which car does this affect?

Any VW MQB with Emergency Assist

Provide a route where the issue occurs

0cd0b7f7e31a3853|2021-12-20--03-34-26

openpilot version

0.8.12

Additional info

Thanks to @Saber422 for reproducing the issue and supplying not only a route, but an idea for the probable cause!

I'm not sure why we haven't seen more complaints of this nature in the past. That said, EA is only a few years old, and for a given model/year it isn't necessarily enabled for all import regions. There are multiple EA behavior variants, for different markets and legal homologation requirements, and I think only one variant may be causing us problems.

The simplest fix is to placate Emergency Assist; we'll tell it there's driver input torque so EA never kicks in. I plan to do this by filtering LH_EPS_03 and rewriting EPS_Lenkmoment (driver input torque) with the sum of true driver input torque and openpilot's own steering output. This will require a matching Panda safety update.

zorrobyte commented 2 years ago

While I don't have anything to contribute here, I did quite enjoy learning about the feature and the edge case. That's wild!