Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GM: no speed limit to resume #352

Closed
wants to merge 1 commit into from
Closed

Conversation

vntarasov
Copy link

@vntarasov vntarasov commented Sep 6, 2018

Remove "18mph to engage" limit, through catching a PCM fault and showing the same "Speed too low" error instead.

Pros:

  • "resume" re-engagement is possible at much lower speeds. For 2017 Volt:
    • resume works at any speed, if brake pedal was not pressed since disengagement. Heh, I was able to resume from rolling backwards against an uphill (resume from negative speed?).
    • resume works above ~7 mph if brake pedal was pressed since disengagement.
  • 2018 has even lower limit to engage for both "set" and "res". With this change, we have a precise speed limit for engagement, no need for overshooting the limit, no need to dig for PCM states for various years.

Cons:

  • If PCM fault happens due to an unrelated bug, "Speed too low" would be a wrong message to show.
  • Different user experience compared to "wrong gear" and other known state errors: instead of showing "Speed too low" right away, PCM fault catching & message will happen split second after openpilot engages.

@vntarasov vntarasov changed the title GM: disengage on PCM fault GM: no speed limit to resume Sep 6, 2018
@vntarasov
Copy link
Author

Resuming from near-zero speeds:
resume-from-rolling-back

class AccState:
OFF = 0
ACTIVE = 1
FAULTED = 3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vntarasov , have you seen the AccState becoming FAULTED for other reasons other than the low speed lockout?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I think I understand what you mean: in this case the AccState will become FAULTED only immediately after the engagement. Does it stay FAULTED or it clears after you stop commanding gas?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, let me find someone willing to test it on 2018 Volt. On my 2017 Volt, speed-related FAULTED clears out as soon as openpilot disengages, but I haven't tested it on 2018 models. It would be rather inconvenient if PCM stays faulted.

Re: other ways to get to FAULTED: There was a bug with "isActive" vs "isEnabled", where PCM would go to FAULTED (for a few seconds on 2017 Volts, and until ACC is reset on 2018), fixed in #352. I don't know of other ways to get it to FAULTED other than stop sending keepalive messages (same GasRegenCmd, with "enabled" = False).

@vntarasov
Copy link
Author

Recovery from PCM fault due to attempt to engage at low speed is almost instant on 2017 Volt:
(It's also interesing that PCM goes to "1 - Success" at first, and then faults out)
pcm fault recovery 2017

@rbiasini
Copy link
Contributor

rbiasini commented Sep 6, 2018

behavior makes sense. Probably would not fault if you were commanding brakes, so it waits for a certain number of Gas commands before faulting.
So a weird behavior would be: you engage when Op wants to brake, and ACC would not fault until positive gas is commanded. Correct?

@vntarasov
Copy link
Author

vntarasov commented Sep 7, 2018

@rbiasini, there doesn't seem to be a trivial way to trick PCM to accelerate from below previously known limits :(

I tried various combinations of

  • "zero gas (no regen)", no friction braking
  • "zero gas (no regen)", 1 unit of friction braking
  • "little regen", no friction braking
  • "max ACC regen", zero friction braking
  • "max ACC regen", 80 units of friction braking

Everything would fault out PCM the same way, at same speed limits: going to "1" for a few messages, then to "3 - faulted".

Obviously there must be a way for FCB to kick in somehow, but I don't have a cabana logs for stock FCB, and chances are commanding gas would still not work from there.

@vntarasov
Copy link
Author

@rbiasini PCM fault in question clears on 2018 Volt as well, as soon as OP disengages.
The most interesting is that 2018 Volt has a much lower speed limit for the initial "set"-engagement (~11 kph), and it can always be resumed at any speed, regardless of brake pedal.

@rbiasini
Copy link
Contributor

@vntarasov , I'm ok merging this. Any more tests to be done you think?

@vntarasov
Copy link
Author

vntarasov commented Sep 20, 2018

@rbiasini, the only quirk is that the first time user presses "res" instead of "set", the message is "speed too low" instead of 'first engage must be through "set" '

@rbiasini
Copy link
Contributor

@vntarasov mmm... but that's unrelated to this change, right?

@vntarasov
Copy link
Author

The solution is to not make the resume button an ENABLE event if there is no set prior set speed. Will reopen when done.

@vntarasov vntarasov closed this Sep 20, 2018
rav4kumar pushed a commit to rav4kumar/openpilot that referenced this pull request May 27, 2019
ihsakashi pushed a commit to ihsakashi/openpilot that referenced this pull request Mar 20, 2021
* debug

* Revert lat changes for Corolla TSS2 and Prius

* Revert some Prius tuning

* Update safetyParam for TSS2 Corolla

* Fix safetyParams

* Add back TSS2 Corolla INDI tune

* Update custom RAV4 DBCs

* Revert kf tuning for TSS1 Corolla
nworb-cire pushed a commit to opgm/openpilot that referenced this pull request Aug 2, 2024
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.

2 participants