openpilot icon indicating copy to clipboard operation
openpilot copied to clipboard

Don't adjust set speed when resuming to exit cruise standstill

Open sshane opened this issue 3 years ago • 3 comments

Should allow you to exit standstill on first resume button press, then increments set speed on any subsequent presses (assuming you exit standstill for a few seconds after pressing resume, like Toyota.). Only really applicable on GM as it's the only make that you need to press resume while being not pcmCruise

sshane avatar Aug 17 '22 23:08 sshane

@twilsonco can you stress test this branch?

  • [ ] See if you can reproduce runaway on master, then try to reproduce here
  • [ ] Resume/set from a stop
  • [ ] Get into a cruise standstill state behind car, then press resume to exit standstill (no set speed change), then press resume again (should increment set speed if you leave standstill for a few seconds)

sshane avatar Aug 18 '22 04:08 sshane

See if you can reproduce runaway on master, then try to reproduce here

Reproduced it twice on master by pressing and holding the resume button as it transitioned into standstill, then releasing the button. Once in each of these routes. I wasn't able to reproduce it by, when slowing with the brake pedal, holding resume while coming to a stop and then releasing. c11fcb510a549332|2022-08-20--16-19-29 c11fcb510a549332|2022-08-20--16-22-34 Performed the same procedure twice with the fix branch and it did not trigger the runaway set speed. I was able to increment and decrement the set speed while stopped behind a lead c11fcb510a549332|2022-08-20--16-35-02

Resume/set from a stop

Set/resume while stopped with brakes pressed gives a "can't engage under 18" alert. Same when done while creeping 2mph without brakes pressed. Same despite initial or subsequent engagement. c11fcb510a549332|2022-08-20--16-46-39

Get into a cruise standstill state behind car, then press resume to exit standstill (no set speed change), then press resume again (should increment set speed if you leave standstill for a few seconds)

On the fix branch, pressing resume after a lead pulls away (i.e. when the long planner is requesting positive acceleration) exits standstill and openpilot resumes. However, first press exits standstill and increments set speed. (same route as above) c11fcb510a549332|2022-08-20--16-46-39

twilsonco avatar Aug 20 '22 23:08 twilsonco

Hmm, it looks like your car exited standstill before the pressed=False button event so it treated it as a normal increment of set speed. I'll try to handle that

sshane avatar Aug 23 '22 08:08 sshane

Will re-open with a working branch

sshane avatar Oct 10 '22 17:10 sshane