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
48.87k stars 8.91k forks source link

VW experimental long: Sudden Deceleration From Stop #29224

Open dingyifei opened 1 year ago

dingyifei commented 1 year ago

Describe the bug

Sudden braking when the gas pedal is pressed from a stop and OP engaged.

The issue occurred in Segment 26.

Previous conversation for reference

you were engaged down to a standstill, and successfully went into standstill (a specific state of the ACC subsystem)
[4:23 AM]
you then pressed the gas pedal, and you appear to have disengage on gas enabled
[4:24 AM]
the drivetrain/stopping coordinator will drop the EPB if ACC is disengaged while at standstill
[4:24 AM]
we actually don't have control over that
it's a feature with the car, that I'll have to think about how to deal with
[4:27 AM]
if you were to use stock ACC to follow someone to a stop, and while stopped, press the cancel button, the EPB would drop to prevent rollaway. this is by design.
[4:27 AM]
there are some different ACC control states, which I don't use right now, that are meant for use when the driver is using accel to override. it may be time to do that.
[4:28 AM]
right now this looks to the car like a disengage, and I probably need to show it as driver override to avoid the EPB drop
[4:28 AM]
there are some other nuances to why I'm not doing so now, and I will have to think about them
[4:30 AM]
TSK-side handling of the EPB is a safety thing, like, if the ACC radar suddenly failed/broke/crashed while you were behind a stopped car, the process of dropping the EPB is automatic and taken care of by the TSK independent of the ACC radar
[4:31 AM]
that's why EPB is required for stop-and-go cars, because the driver may not be fully attentive if the car has been at standstill for a while, so the car needs to safely handle the case of radar failure

Which car does this affect?

VW Tiguan R-Line 4Motion 2020 (US)

Provide a route where the issue occurs

4e144f64a2535890|2023-03-27--18-14-02--26

openpilot version

master-ci V0.9.1

Additional info

@jyoung8607

jyoung8607 commented 11 months ago

Within the MQB ACC protocol, openpilot longitudinal always disengages on gas. Even with NDOG toggled on, the temporary disconnect of longitudinal control is handled as ACC disengagement. This is mostly okay while in motion, but disengaging while stopped will set the EPB. If the driver applies gas override input while stopped, depending on timing, the car can end up fighting the driver trying to stop again.

Stock ACC remains engaged during all driver gas input, with a special state meant to indicate gas-override is active. The stock ACC radar even keeps sending desired accel. The ECU/drivetrain coordinator executes something like max(acc_desired_accel, driver_desired_accel) for a nice smooth handoff experience.

In a perfect world, we'd implement the entire stock ACC protocol including the smooth handoff, but calculating and sending desired accel while longitudinal control is overridden would need changes to safety policy/design as well as higher level controls, and is otherwise a Whole Big Thing that I'm not proposing at this time.

As a more realistic solution, we can implement the gas-override state for the MQB ACC protocol, but just send zero desired acceleration. This is no worse-off than we are today, and should fix the case of standstill departure override. Unfortunately it's still going to break Panda abstractions a little bit, because zero desired acceleration is different from our inactive accel value. I will think about the cleanest way to implement it.

sshane commented 8 months ago

Putting it in the override state and sending 0/inactive accel sounds like the plan.

jyoung8607 commented 7 months ago

Currently having some end users test a potential fix.

LANdrew12 commented 1 month ago

@jyoung8607 Has the test been working? I'm not sure if its fixed since I never accelerate from stops because now I intervene at every stop to prevent it.