Skip to content

GM: use GM safety model even if passive#487

Closed
vntarasov wants to merge 1 commit intocommaai:develfrom
vntarasov:gm-passive
Closed

GM: use GM safety model even if passive#487
vntarasov wants to merge 1 commit intocommaai:develfrom
vntarasov:gm-passive

Conversation

@vntarasov
Copy link
Copy Markdown

Symptom:
On some GM cars, in stock, openpilot will start-stop recording arbitrarily during the drive.

Problem:
"car started" on GM uses CAN-based ignition hook, and on cars where battery voltage drops below openpilot's threshold (e.g. when engine turns off on a full stop), drive recording stops. Main two cases are 1) chffrplus, and 2) openpilot forced to passive mode because stock LKA / ACC modules are online.

Proposal:
Instead of tweaking battery voltage threshold (doesn't fix the problem for soft hybrids), always use GM's CAN-based ignition logic on GM cars, even in chffrplus / passive openpilot.

Pros:

  • Setting safety model to noOutput is redundant, since controlsd sets sendcan to None if passive.
  • If either LKA or ACC commands are being sent by stock modules, GM safety model in Panda goes to full silence, not even chimes or radar configuration will be sent.

Cons:

  • GM safety model in Panda doesn't know if openpilot is running in passive mode, and, for example, will still set controls_allowed to 1, if driver presses "set" / "reset". On GM cars without LKA/ACC features, or with those modules disconnected, chffrplus would drive on sending-ready panda.

Let me know if you guys can think of a better solution, or if GM safety model needs a special "passive" mode, for example, entered by passing a special CarParams.safetyParam.

@rbiasini
Copy link
Copy Markdown
Contributor

... or if GM safety model needs a special "passive" mode, for example, entered by passing a special CarParams.safetyParam.

I think a better solution would be to define a "gm passive safety model" in panda, where fwd hook is no_output, but the ignition hook remains the gm one (the same thing should be done for other cars as well). For safety reasons, I would prefer passive==1 to put panda in a state where any message sending is disallowed.

@vntarasov
Copy link
Copy Markdown
Author

Will add gm_passive safety model.

@rbiasini rbiasini closed this May 5, 2019
@vntarasov vntarasov deleted the gm-passive branch September 10, 2019 05:04
sshane referenced this pull request in sshane/openpilot Dec 2, 2019
pd0wm pushed a commit that referenced this pull request Apr 7, 2020
74d10cc Fixed possible race condition (#487)
a05361e cleanup safety_replay dockerfile (#486)
fe73dcc Openpilot-tools is deprecated (#484)
da8e00f TX message guaranteed delivery (#421)
d8f6184 Add ISO number for longitudinal limits flag comment
6a60b78 touch ups
2ce6536 comments on unsafe flags
d880134 remove from there as well
055ea07 remove that unsafe flag since it isn't implemented and it's unclear how to
4e98bbe Apply unsafe allow gas mode to all cars. (#480)
0c2c149 Fixing libusb busy error (#174)
753c42c Update Board Mac SDK Install script to work on clean mac (#146)
b9a9ea3 Unsafe gas disengage mods, fix test compile warning (#481)
08ef92d Safety model for Volkswagen PQ35/PQ46/NMS (#474)
51e0a55 Support code for unsafe mode unit tests (#478)
5325b62 current_safety_mode
7908b72 update updating unsafe mode
98503e8 disable stock honda AEB in unsafe mode (#477)
01b2ccb one more
9a30265 weak steering while not engaged
577f10b added options for unsafe mode
83cf7bf update comment
4556e74 enable unsafe mode, toggle for use by forks that so choose
de89fcd Nissan leaf (#473)

git-subtree-dir: panda
git-subtree-split: 74d10cc
pd0wm pushed a commit that referenced this pull request Apr 8, 2020
74d10cc Fixed possible race condition (#487)
a05361e cleanup safety_replay dockerfile (#486)
fe73dcc Openpilot-tools is deprecated (#484)
da8e00f TX message guaranteed delivery (#421)
d8f6184 Add ISO number for longitudinal limits flag comment
6a60b78 touch ups
2ce6536 comments on unsafe flags
d880134 remove from there as well
055ea07 remove that unsafe flag since it isn't implemented and it's unclear how to
4e98bbe Apply unsafe allow gas mode to all cars. (#480)
0c2c149 Fixing libusb busy error (#174)
753c42c Update Board Mac SDK Install script to work on clean mac (#146)
b9a9ea3 Unsafe gas disengage mods, fix test compile warning (#481)
08ef92d Safety model for Volkswagen PQ35/PQ46/NMS (#474)
51e0a55 Support code for unsafe mode unit tests (#478)
5325b62 current_safety_mode
7908b72 update updating unsafe mode
98503e8 disable stock honda AEB in unsafe mode (#477)
01b2ccb one more
9a30265 weak steering while not engaged
577f10b added options for unsafe mode
83cf7bf update comment
4556e74 enable unsafe mode, toggle for use by forks that so choose
de89fcd Nissan leaf (#473)

git-subtree-dir: panda
git-subtree-split: 74d10cc
pd0wm pushed a commit that referenced this pull request Apr 8, 2020
74d10cc Fixed possible race condition (#487)
a05361e cleanup safety_replay dockerfile (#486)
fe73dcc Openpilot-tools is deprecated (#484)
da8e00f TX message guaranteed delivery (#421)
d8f6184 Add ISO number for longitudinal limits flag comment
6a60b78 touch ups
2ce6536 comments on unsafe flags
d880134 remove from there as well
055ea07 remove that unsafe flag since it isn't implemented and it's unclear how to
4e98bbe Apply unsafe allow gas mode to all cars. (#480)
0c2c149 Fixing libusb busy error (#174)
753c42c Update Board Mac SDK Install script to work on clean mac (#146)
b9a9ea3 Unsafe gas disengage mods, fix test compile warning (#481)
08ef92d Safety model for Volkswagen PQ35/PQ46/NMS (#474)
51e0a55 Support code for unsafe mode unit tests (#478)
5325b62 current_safety_mode
7908b72 update updating unsafe mode
98503e8 disable stock honda AEB in unsafe mode (#477)
01b2ccb one more
9a30265 weak steering while not engaged
577f10b added options for unsafe mode
83cf7bf update comment
4556e74 enable unsafe mode, toggle for use by forks that so choose
de89fcd Nissan leaf (#473)

git-subtree-dir: panda
git-subtree-split: 74d10cc
pd0wm pushed a commit that referenced this pull request Apr 9, 2020
bc90b60 toyota: use universal gas pressed bit (#488)
74d10cc Fixed possible race condition (#487)
a05361e cleanup safety_replay dockerfile (#486)
fe73dcc Openpilot-tools is deprecated (#484)
da8e00f TX message guaranteed delivery (#421)
d8f6184 Add ISO number for longitudinal limits flag comment
6a60b78 touch ups
2ce6536 comments on unsafe flags
d880134 remove from there as well
055ea07 remove that unsafe flag since it isn't implemented and it's unclear how to
4e98bbe Apply unsafe allow gas mode to all cars. (#480)
0c2c149 Fixing libusb busy error (#174)
753c42c Update Board Mac SDK Install script to work on clean mac (#146)
b9a9ea3 Unsafe gas disengage mods, fix test compile warning (#481)
08ef92d Safety model for Volkswagen PQ35/PQ46/NMS (#474)
51e0a55 Support code for unsafe mode unit tests (#478)
5325b62 current_safety_mode
7908b72 update updating unsafe mode
98503e8 disable stock honda AEB in unsafe mode (#477)
01b2ccb one more
9a30265 weak steering while not engaged
577f10b added options for unsafe mode
83cf7bf update comment
4556e74 enable unsafe mode, toggle for use by forks that so choose
de89fcd Nissan leaf (#473)

git-subtree-dir: panda
git-subtree-split: bc90b60
pd0wm pushed a commit that referenced this pull request Apr 9, 2020
bc90b60 toyota: use universal gas pressed bit (#488)
74d10cc Fixed possible race condition (#487)
a05361e cleanup safety_replay dockerfile (#486)
fe73dcc Openpilot-tools is deprecated (#484)
da8e00f TX message guaranteed delivery (#421)
d8f6184 Add ISO number for longitudinal limits flag comment
6a60b78 touch ups
2ce6536 comments on unsafe flags
d880134 remove from there as well
055ea07 remove that unsafe flag since it isn't implemented and it's unclear how to
4e98bbe Apply unsafe allow gas mode to all cars. (#480)
0c2c149 Fixing libusb busy error (#174)
753c42c Update Board Mac SDK Install script to work on clean mac (#146)
b9a9ea3 Unsafe gas disengage mods, fix test compile warning (#481)
08ef92d Safety model for Volkswagen PQ35/PQ46/NMS (#474)
51e0a55 Support code for unsafe mode unit tests (#478)
5325b62 current_safety_mode
7908b72 update updating unsafe mode
98503e8 disable stock honda AEB in unsafe mode (#477)
01b2ccb one more
9a30265 weak steering while not engaged
577f10b added options for unsafe mode
83cf7bf update comment
4556e74 enable unsafe mode, toggle for use by forks that so choose
de89fcd Nissan leaf (#473)

git-subtree-dir: panda
git-subtree-split: bc90b60
pd0wm pushed a commit that referenced this pull request Apr 10, 2020
500370a Make sure relay faults make it to the health packet (#492)
bc90b60 toyota: use universal gas pressed bit (#488)
74d10cc Fixed possible race condition (#487)
a05361e cleanup safety_replay dockerfile (#486)
fe73dcc Openpilot-tools is deprecated (#484)
da8e00f TX message guaranteed delivery (#421)
d8f6184 Add ISO number for longitudinal limits flag comment
6a60b78 touch ups
2ce6536 comments on unsafe flags
d880134 remove from there as well
055ea07 remove that unsafe flag since it isn't implemented and it's unclear how to
4e98bbe Apply unsafe allow gas mode to all cars. (#480)
0c2c149 Fixing libusb busy error (#174)
753c42c Update Board Mac SDK Install script to work on clean mac (#146)
b9a9ea3 Unsafe gas disengage mods, fix test compile warning (#481)
08ef92d Safety model for Volkswagen PQ35/PQ46/NMS (#474)
51e0a55 Support code for unsafe mode unit tests (#478)
5325b62 current_safety_mode
7908b72 update updating unsafe mode
98503e8 disable stock honda AEB in unsafe mode (#477)
01b2ccb one more
9a30265 weak steering while not engaged
577f10b added options for unsafe mode
83cf7bf update comment
4556e74 enable unsafe mode, toggle for use by forks that so choose
de89fcd Nissan leaf (#473)

git-subtree-dir: panda
git-subtree-split: 500370a
pd0wm pushed a commit that referenced this pull request Apr 14, 2020
6c442b4 Safety Test Refactor: Volkswagen MQB (#493)
f07a6ee panda recover should go through bootstub first (#498)
8cc3a35 remove cadillac (#496)
62e4d3c Chrysler: fix missing button signal on TX (#490)
abce8f3 Safety Test Refactor: Toyota + support code (#491)
500370a Make sure relay faults make it to the health packet (#492)
bc90b60 toyota: use universal gas pressed bit (#488)
74d10cc Fixed possible race condition (#487)
a05361e cleanup safety_replay dockerfile (#486)
fe73dcc Openpilot-tools is deprecated (#484)
da8e00f TX message guaranteed delivery (#421)
d8f6184 Add ISO number for longitudinal limits flag comment
6a60b78 touch ups
2ce6536 comments on unsafe flags
d880134 remove from there as well
055ea07 remove that unsafe flag since it isn't implemented and it's unclear how to
4e98bbe Apply unsafe allow gas mode to all cars. (#480)
0c2c149 Fixing libusb busy error (#174)
753c42c Update Board Mac SDK Install script to work on clean mac (#146)
b9a9ea3 Unsafe gas disengage mods, fix test compile warning (#481)
08ef92d Safety model for Volkswagen PQ35/PQ46/NMS (#474)
51e0a55 Support code for unsafe mode unit tests (#478)
5325b62 current_safety_mode
7908b72 update updating unsafe mode
98503e8 disable stock honda AEB in unsafe mode (#477)
01b2ccb one more
9a30265 weak steering while not engaged
577f10b added options for unsafe mode
83cf7bf update comment
4556e74 enable unsafe mode, toggle for use by forks that so choose
de89fcd Nissan leaf (#473)

git-subtree-dir: panda
git-subtree-split: 6c442b4
pd0wm pushed a commit that referenced this pull request Apr 14, 2020
ccf13b7 No more infinite while loops in CAN init (#499)
6c442b4 Safety Test Refactor: Volkswagen MQB (#493)
f07a6ee panda recover should go through bootstub first (#498)
8cc3a35 remove cadillac (#496)
62e4d3c Chrysler: fix missing button signal on TX (#490)
abce8f3 Safety Test Refactor: Toyota + support code (#491)
500370a Make sure relay faults make it to the health packet (#492)
bc90b60 toyota: use universal gas pressed bit (#488)
74d10cc Fixed possible race condition (#487)
a05361e cleanup safety_replay dockerfile (#486)
fe73dcc Openpilot-tools is deprecated (#484)
da8e00f TX message guaranteed delivery (#421)
d8f6184 Add ISO number for longitudinal limits flag comment
6a60b78 touch ups
2ce6536 comments on unsafe flags
d880134 remove from there as well
055ea07 remove that unsafe flag since it isn't implemented and it's unclear how to
4e98bbe Apply unsafe allow gas mode to all cars. (#480)
0c2c149 Fixing libusb busy error (#174)
753c42c Update Board Mac SDK Install script to work on clean mac (#146)
b9a9ea3 Unsafe gas disengage mods, fix test compile warning (#481)
08ef92d Safety model for Volkswagen PQ35/PQ46/NMS (#474)
51e0a55 Support code for unsafe mode unit tests (#478)
5325b62 current_safety_mode
7908b72 update updating unsafe mode
98503e8 disable stock honda AEB in unsafe mode (#477)
01b2ccb one more
9a30265 weak steering while not engaged
577f10b added options for unsafe mode
83cf7bf update comment
4556e74 enable unsafe mode, toggle for use by forks that so choose
de89fcd Nissan leaf (#473)

git-subtree-dir: panda
git-subtree-split: ccf13b7
pd0wm pushed a commit that referenced this pull request Apr 16, 2020
715b1a1 Hyundai-Kia-Genesis (HKG) (#503)
6f105e8 Safety Test Refactor: Subaru (#502)
57cc954 Safety Test Refactor: GM (#504)
dd01c3b Safety Test Refactor: Hyundai (#505)
592c2c8 add support to can_unique.py for Cabana CSV format. (#506)
ccf13b7 No more infinite while loops in CAN init (#499)
6c442b4 Safety Test Refactor: Volkswagen MQB (#493)
f07a6ee panda recover should go through bootstub first (#498)
8cc3a35 remove cadillac (#496)
62e4d3c Chrysler: fix missing button signal on TX (#490)
abce8f3 Safety Test Refactor: Toyota + support code (#491)
500370a Make sure relay faults make it to the health packet (#492)
bc90b60 toyota: use universal gas pressed bit (#488)
74d10cc Fixed possible race condition (#487)
a05361e cleanup safety_replay dockerfile (#486)
fe73dcc Openpilot-tools is deprecated (#484)
da8e00f TX message guaranteed delivery (#421)
d8f6184 Add ISO number for longitudinal limits flag comment
6a60b78 touch ups
2ce6536 comments on unsafe flags
d880134 remove from there as well
055ea07 remove that unsafe flag since it isn't implemented and it's unclear how to
4e98bbe Apply unsafe allow gas mode to all cars. (#480)
0c2c149 Fixing libusb busy error (#174)
753c42c Update Board Mac SDK Install script to work on clean mac (#146)
b9a9ea3 Unsafe gas disengage mods, fix test compile warning (#481)
08ef92d Safety model for Volkswagen PQ35/PQ46/NMS (#474)
51e0a55 Support code for unsafe mode unit tests (#478)
5325b62 current_safety_mode
7908b72 update updating unsafe mode
98503e8 disable stock honda AEB in unsafe mode (#477)
01b2ccb one more
9a30265 weak steering while not engaged
577f10b added options for unsafe mode
83cf7bf update comment
4556e74 enable unsafe mode, toggle for use by forks that so choose
de89fcd Nissan leaf (#473)

git-subtree-dir: panda
git-subtree-split: 715b1a1
pd0wm pushed a commit that referenced this pull request Apr 16, 2020
715b1a1 Hyundai-Kia-Genesis (HKG) (#503)
6f105e8 Safety Test Refactor: Subaru (#502)
57cc954 Safety Test Refactor: GM (#504)
dd01c3b Safety Test Refactor: Hyundai (#505)
592c2c8 add support to can_unique.py for Cabana CSV format. (#506)
ccf13b7 No more infinite while loops in CAN init (#499)
6c442b4 Safety Test Refactor: Volkswagen MQB (#493)
f07a6ee panda recover should go through bootstub first (#498)
8cc3a35 remove cadillac (#496)
62e4d3c Chrysler: fix missing button signal on TX (#490)
abce8f3 Safety Test Refactor: Toyota + support code (#491)
500370a Make sure relay faults make it to the health packet (#492)
bc90b60 toyota: use universal gas pressed bit (#488)
74d10cc Fixed possible race condition (#487)
a05361e cleanup safety_replay dockerfile (#486)
fe73dcc Openpilot-tools is deprecated (#484)
da8e00f TX message guaranteed delivery (#421)
d8f6184 Add ISO number for longitudinal limits flag comment
6a60b78 touch ups
2ce6536 comments on unsafe flags
d880134 remove from there as well
055ea07 remove that unsafe flag since it isn't implemented and it's unclear how to
4e98bbe Apply unsafe allow gas mode to all cars. (#480)
0c2c149 Fixing libusb busy error (#174)
753c42c Update Board Mac SDK Install script to work on clean mac (#146)
b9a9ea3 Unsafe gas disengage mods, fix test compile warning (#481)
08ef92d Safety model for Volkswagen PQ35/PQ46/NMS (#474)
51e0a55 Support code for unsafe mode unit tests (#478)
5325b62 current_safety_mode
7908b72 update updating unsafe mode
98503e8 disable stock honda AEB in unsafe mode (#477)
01b2ccb one more
9a30265 weak steering while not engaged
577f10b added options for unsafe mode
83cf7bf update comment
4556e74 enable unsafe mode, toggle for use by forks that so choose
de89fcd Nissan leaf (#473)

git-subtree-dir: panda
git-subtree-split: 715b1a1
pd0wm pushed a commit that referenced this pull request Apr 17, 2020
4c7755c Match Panda DFU entry fix in "make recover" process (#509)
0336f62 Pedal gas pressed safety limits (#507)
715b1a1 Hyundai-Kia-Genesis (HKG) (#503)
6f105e8 Safety Test Refactor: Subaru (#502)
57cc954 Safety Test Refactor: GM (#504)
dd01c3b Safety Test Refactor: Hyundai (#505)
592c2c8 add support to can_unique.py for Cabana CSV format. (#506)
ccf13b7 No more infinite while loops in CAN init (#499)
6c442b4 Safety Test Refactor: Volkswagen MQB (#493)
f07a6ee panda recover should go through bootstub first (#498)
8cc3a35 remove cadillac (#496)
62e4d3c Chrysler: fix missing button signal on TX (#490)
abce8f3 Safety Test Refactor: Toyota + support code (#491)
500370a Make sure relay faults make it to the health packet (#492)
bc90b60 toyota: use universal gas pressed bit (#488)
74d10cc Fixed possible race condition (#487)
a05361e cleanup safety_replay dockerfile (#486)
fe73dcc Openpilot-tools is deprecated (#484)
da8e00f TX message guaranteed delivery (#421)
d8f6184 Add ISO number for longitudinal limits flag comment
6a60b78 touch ups
2ce6536 comments on unsafe flags
d880134 remove from there as well
055ea07 remove that unsafe flag since it isn't implemented and it's unclear how to
4e98bbe Apply unsafe allow gas mode to all cars. (#480)
0c2c149 Fixing libusb busy error (#174)
753c42c Update Board Mac SDK Install script to work on clean mac (#146)
b9a9ea3 Unsafe gas disengage mods, fix test compile warning (#481)
08ef92d Safety model for Volkswagen PQ35/PQ46/NMS (#474)
51e0a55 Support code for unsafe mode unit tests (#478)
5325b62 current_safety_mode
7908b72 update updating unsafe mode
98503e8 disable stock honda AEB in unsafe mode (#477)
01b2ccb one more
9a30265 weak steering while not engaged
577f10b added options for unsafe mode
83cf7bf update comment
4556e74 enable unsafe mode, toggle for use by forks that so choose
de89fcd Nissan leaf (#473)

git-subtree-dir: panda
git-subtree-split: 4c7755c
pd0wm pushed a commit that referenced this pull request Apr 17, 2020
884afa0 Safety Test Refactor: Chrysler and Volkswagen PQ (#508)
d77b72d Safety Test Refactor: Nissan (#510)
4c7755c Match Panda DFU entry fix in "make recover" process (#509)
0336f62 Pedal gas pressed safety limits (#507)
715b1a1 Hyundai-Kia-Genesis (HKG) (#503)
6f105e8 Safety Test Refactor: Subaru (#502)
57cc954 Safety Test Refactor: GM (#504)
dd01c3b Safety Test Refactor: Hyundai (#505)
592c2c8 add support to can_unique.py for Cabana CSV format. (#506)
ccf13b7 No more infinite while loops in CAN init (#499)
6c442b4 Safety Test Refactor: Volkswagen MQB (#493)
f07a6ee panda recover should go through bootstub first (#498)
8cc3a35 remove cadillac (#496)
62e4d3c Chrysler: fix missing button signal on TX (#490)
abce8f3 Safety Test Refactor: Toyota + support code (#491)
500370a Make sure relay faults make it to the health packet (#492)
bc90b60 toyota: use universal gas pressed bit (#488)
74d10cc Fixed possible race condition (#487)
a05361e cleanup safety_replay dockerfile (#486)
fe73dcc Openpilot-tools is deprecated (#484)
da8e00f TX message guaranteed delivery (#421)
d8f6184 Add ISO number for longitudinal limits flag comment
6a60b78 touch ups
2ce6536 comments on unsafe flags
d880134 remove from there as well
055ea07 remove that unsafe flag since it isn't implemented and it's unclear how to
4e98bbe Apply unsafe allow gas mode to all cars. (#480)
0c2c149 Fixing libusb busy error (#174)
753c42c Update Board Mac SDK Install script to work on clean mac (#146)
b9a9ea3 Unsafe gas disengage mods, fix test compile warning (#481)
08ef92d Safety model for Volkswagen PQ35/PQ46/NMS (#474)
51e0a55 Support code for unsafe mode unit tests (#478)
5325b62 current_safety_mode
7908b72 update updating unsafe mode
98503e8 disable stock honda AEB in unsafe mode (#477)
01b2ccb one more
9a30265 weak steering while not engaged
577f10b added options for unsafe mode
83cf7bf update comment
4556e74 enable unsafe mode, toggle for use by forks that so choose
de89fcd Nissan leaf (#473)

git-subtree-dir: panda
git-subtree-split: 884afa0
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