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

Always send loud alert when cruise disables in specific braking scenario #468

Closed
wants to merge 4 commits into from
Closed

Conversation

ghost
Copy link

@ghost ghost commented Dec 16, 2018

For Honda users without the pedal that allow OP to stop their car to a standstill, there are sometimes instances where a potential safety issue may occur in the following sequence:

  1. the car brakes because lead car is slowing,
  2. the car falls below the minimum cruise threshold and cruise disables
  3. the lead car pulls away
  4. car is now below cruise min speed so it can't accelerate, the non-loud alert is displayed and OP is disabled - the user doesn't notice.
  5. the lead car brakes - OP is disabled so it doesn't brake.
  6. the user is caught flat footed because they weren't aware that step 4 happened because couldn't hear / see the subtle alert that OP was disabled

This is a safety concern as it happened to me a few times before I got my pedal. Sending the loud alert mitigates this risk.

For users without the pedal there are sometimes instances where
1.  the car brakes because lead car is slowing, 
2.  the car falls below the minimum cruise threshold and cruise disables
3.  the lead car pulls away
4.  car is now below cruise so can't accelerate, the non-loud alert is displayed and OP is disabled - the user doesn't notice
5.  the lead car brakes
6.  the user is caught flat footed because they weren't aware that step 4 happened because couldn't hear / see the subtle alert that OP was disabled

This is a safety concern as it happened to me a few times before I got my pedal.  Sending the loud alert mitigates this risk.
if ret.vEgo < self.CP.minEnableSpeed + 2.:
events.append(create_event('speedTooLow', [ET.IMMEDIATE_DISABLE]))
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm ok with the change, but you should change this in the alert database. speedTooLow is still what we want to be issued

Copy link
Author

Choose a reason for hiding this comment

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

Done. Restored the commented out code and changed alert.py instead.

@@ -530,7 +530,7 @@ def update(self, c):
events.append(create_event('parkBrake', [ET.NO_ENTRY, ET.USER_DISABLE]))

if self.CP.enableCruise and ret.vEgo < self.CP.minEnableSpeed:
events.append(create_event('speedTooLow', [ET.NO_ENTRY]))
events.append(create_event('speedTooLowNoEntry', [ET.NO_ENTRY]))
Copy link
Contributor

Choose a reason for hiding this comment

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

here you want to keep speedTooLow (the NoEntry is added in controlsd)

@@ -432,7 +432,7 @@ def __gt__(self, alert2):
"openpilot Canceled",
"Speed too low",
AlertStatus.normal, AlertSize.mid,
Priority.HIGH, VisualAlert.none, AudibleAlert.chimeDisengage, .4, 2., 3.),
Priority.HIGH, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, 1., 3., 4.),
Copy link
Contributor

Choose a reason for hiding this comment

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

mmm... but an audible alert (the same used for normal disengagement) is already issued. Your change just makes it louder, which I think is too annoying.
Sorry, I was under the impression that before your change OP wasn't issuing any audible alert.

@rbiasini rbiasini closed this Dec 24, 2018
@ghost ghost deleted the patch-1 branch December 25, 2018 09:49
Chrispreilly pushed a commit to Chrispreilly/openpilot that referenced this pull request Nov 21, 2019
pd0wm pushed a commit that referenced this pull request Mar 12, 2020
0696730 Toyota: add missing offset from speed signal (#469)
5b1a8dc Filtering LKAS HUD messages (#468)
99050f4 test_spam_can_buses was missing from Nissan
0f21b19 Cleanup pedal nomenclature (#467)
ceff91d Standardize brake safety tests (#465)
04809e1 Hyundai brake check (#464)
74c8ee0 Subaru brake check (#463)
4ecc6b3 Cleanup: avoid unnecessary bus checks in rx hooks
c7d0d5f Volkswagen safety updates: Phase 3 (#462)
4368748 WIP: Toyota brake check.  (#459)
2ef996f fix addr frequencies
e063b26 Second test fix tentative
88e2593 This should fix the test replay
ebb8866 Added NISSAN replay test
b2dbb50 remove toyota ipas safety code and tests (#460)
a379faf White Panda's Wi-Fi setup instructions (#457)
11ef24b Improve tests (#456)
fb02390 Subaru checksum counter (#455)
9a44499 Fix Subaru Legacy Torque driver bug (#454)
dfa6b07 separating subary legacy safety mode from global (#452)
dad5858 Chrysler: add brakepress cancellation (#451)
db94a5b Added Nissan safety (#244)
d7f1195 Chrysler Checksum/counter (#450)
96e535e abstract crc function (#448)
1b49d3e Hyundai: add gas disengage and tests (#447)
598074c Volkswagen safety updates: Phase 2 (#445)
b2ffaae Chrysler: disengage on gas press  (#442)
2ebbe36 Subaru: disengage on gas press (#446)
ccf75c4 Volkswagen safety updates: Phase 1 (#444)

git-subtree-dir: panda
git-subtree-split: 0696730
pd0wm pushed a commit that referenced this pull request Mar 12, 2020
0696730 Toyota: add missing offset from speed signal (#469)
5b1a8dc Filtering LKAS HUD messages (#468)
99050f4 test_spam_can_buses was missing from Nissan
0f21b19 Cleanup pedal nomenclature (#467)
ceff91d Standardize brake safety tests (#465)
04809e1 Hyundai brake check (#464)
74c8ee0 Subaru brake check (#463)
4ecc6b3 Cleanup: avoid unnecessary bus checks in rx hooks
c7d0d5f Volkswagen safety updates: Phase 3 (#462)
4368748 WIP: Toyota brake check.  (#459)
2ef996f fix addr frequencies
e063b26 Second test fix tentative
88e2593 This should fix the test replay
ebb8866 Added NISSAN replay test
b2dbb50 remove toyota ipas safety code and tests (#460)
a379faf White Panda's Wi-Fi setup instructions (#457)
11ef24b Improve tests (#456)
fb02390 Subaru checksum counter (#455)
9a44499 Fix Subaru Legacy Torque driver bug (#454)
dfa6b07 separating subary legacy safety mode from global (#452)
dad5858 Chrysler: add brakepress cancellation (#451)
db94a5b Added Nissan safety (#244)
d7f1195 Chrysler Checksum/counter (#450)
96e535e abstract crc function (#448)
1b49d3e Hyundai: add gas disengage and tests (#447)
598074c Volkswagen safety updates: Phase 2 (#445)
b2ffaae Chrysler: disengage on gas press  (#442)
2ebbe36 Subaru: disengage on gas press (#446)
ccf75c4 Volkswagen safety updates: Phase 1 (#444)

git-subtree-dir: panda
git-subtree-split: 0696730
pd0wm pushed a commit that referenced this pull request Mar 13, 2020
0696730 Toyota: add missing offset from speed signal (#469)
5b1a8dc Filtering LKAS HUD messages (#468)
99050f4 test_spam_can_buses was missing from Nissan
0f21b19 Cleanup pedal nomenclature (#467)
ceff91d Standardize brake safety tests (#465)
04809e1 Hyundai brake check (#464)
74c8ee0 Subaru brake check (#463)
4ecc6b3 Cleanup: avoid unnecessary bus checks in rx hooks
c7d0d5f Volkswagen safety updates: Phase 3 (#462)
4368748 WIP: Toyota brake check.  (#459)
2ef996f fix addr frequencies
e063b26 Second test fix tentative
88e2593 This should fix the test replay
ebb8866 Added NISSAN replay test
b2dbb50 remove toyota ipas safety code and tests (#460)
a379faf White Panda's Wi-Fi setup instructions (#457)
11ef24b Improve tests (#456)
fb02390 Subaru checksum counter (#455)
9a44499 Fix Subaru Legacy Torque driver bug (#454)
dfa6b07 separating subary legacy safety mode from global (#452)
dad5858 Chrysler: add brakepress cancellation (#451)
db94a5b Added Nissan safety (#244)
d7f1195 Chrysler Checksum/counter (#450)
96e535e abstract crc function (#448)
1b49d3e Hyundai: add gas disengage and tests (#447)
598074c Volkswagen safety updates: Phase 2 (#445)
b2ffaae Chrysler: disengage on gas press  (#442)
2ebbe36 Subaru: disengage on gas press (#446)
ccf75c4 Volkswagen safety updates: Phase 1 (#444)

git-subtree-dir: panda
git-subtree-split: 0696730
pd0wm pushed a commit that referenced this pull request Mar 13, 2020
0696730 Toyota: add missing offset from speed signal (#469)
5b1a8dc Filtering LKAS HUD messages (#468)
99050f4 test_spam_can_buses was missing from Nissan
0f21b19 Cleanup pedal nomenclature (#467)
ceff91d Standardize brake safety tests (#465)
04809e1 Hyundai brake check (#464)
74c8ee0 Subaru brake check (#463)
4ecc6b3 Cleanup: avoid unnecessary bus checks in rx hooks
c7d0d5f Volkswagen safety updates: Phase 3 (#462)
4368748 WIP: Toyota brake check.  (#459)
2ef996f fix addr frequencies
e063b26 Second test fix tentative
88e2593 This should fix the test replay
ebb8866 Added NISSAN replay test
b2dbb50 remove toyota ipas safety code and tests (#460)
a379faf White Panda's Wi-Fi setup instructions (#457)
11ef24b Improve tests (#456)
fb02390 Subaru checksum counter (#455)
9a44499 Fix Subaru Legacy Torque driver bug (#454)
dfa6b07 separating subary legacy safety mode from global (#452)
dad5858 Chrysler: add brakepress cancellation (#451)
db94a5b Added Nissan safety (#244)
d7f1195 Chrysler Checksum/counter (#450)
96e535e abstract crc function (#448)
1b49d3e Hyundai: add gas disengage and tests (#447)
598074c Volkswagen safety updates: Phase 2 (#445)
b2ffaae Chrysler: disengage on gas press  (#442)
2ebbe36 Subaru: disengage on gas press (#446)
ccf75c4 Volkswagen safety updates: Phase 1 (#444)

git-subtree-dir: panda
git-subtree-split: 0696730
pd0wm pushed a commit that referenced this pull request Mar 13, 2020
0696730 Toyota: add missing offset from speed signal (#469)
5b1a8dc Filtering LKAS HUD messages (#468)
99050f4 test_spam_can_buses was missing from Nissan
0f21b19 Cleanup pedal nomenclature (#467)
ceff91d Standardize brake safety tests (#465)
04809e1 Hyundai brake check (#464)
74c8ee0 Subaru brake check (#463)
4ecc6b3 Cleanup: avoid unnecessary bus checks in rx hooks
c7d0d5f Volkswagen safety updates: Phase 3 (#462)
4368748 WIP: Toyota brake check.  (#459)
2ef996f fix addr frequencies
e063b26 Second test fix tentative
88e2593 This should fix the test replay
ebb8866 Added NISSAN replay test
b2dbb50 remove toyota ipas safety code and tests (#460)
a379faf White Panda's Wi-Fi setup instructions (#457)
11ef24b Improve tests (#456)
fb02390 Subaru checksum counter (#455)
9a44499 Fix Subaru Legacy Torque driver bug (#454)
dfa6b07 separating subary legacy safety mode from global (#452)
dad5858 Chrysler: add brakepress cancellation (#451)
db94a5b Added Nissan safety (#244)
d7f1195 Chrysler Checksum/counter (#450)
96e535e abstract crc function (#448)
1b49d3e Hyundai: add gas disengage and tests (#447)
598074c Volkswagen safety updates: Phase 2 (#445)
b2ffaae Chrysler: disengage on gas press  (#442)
2ebbe36 Subaru: disengage on gas press (#446)
ccf75c4 Volkswagen safety updates: Phase 1 (#444)

git-subtree-dir: panda
git-subtree-split: 0696730
pd0wm pushed a commit that referenced this pull request Mar 14, 2020
0696730 Toyota: add missing offset from speed signal (#469)
5b1a8dc Filtering LKAS HUD messages (#468)
99050f4 test_spam_can_buses was missing from Nissan
0f21b19 Cleanup pedal nomenclature (#467)
ceff91d Standardize brake safety tests (#465)
04809e1 Hyundai brake check (#464)
74c8ee0 Subaru brake check (#463)
4ecc6b3 Cleanup: avoid unnecessary bus checks in rx hooks
c7d0d5f Volkswagen safety updates: Phase 3 (#462)
4368748 WIP: Toyota brake check.  (#459)
2ef996f fix addr frequencies
e063b26 Second test fix tentative
88e2593 This should fix the test replay
ebb8866 Added NISSAN replay test
b2dbb50 remove toyota ipas safety code and tests (#460)
a379faf White Panda's Wi-Fi setup instructions (#457)
11ef24b Improve tests (#456)
fb02390 Subaru checksum counter (#455)
9a44499 Fix Subaru Legacy Torque driver bug (#454)
dfa6b07 separating subary legacy safety mode from global (#452)
dad5858 Chrysler: add brakepress cancellation (#451)
db94a5b Added Nissan safety (#244)
d7f1195 Chrysler Checksum/counter (#450)
96e535e abstract crc function (#448)
1b49d3e Hyundai: add gas disengage and tests (#447)
598074c Volkswagen safety updates: Phase 2 (#445)
b2ffaae Chrysler: disengage on gas press  (#442)
2ebbe36 Subaru: disengage on gas press (#446)
ccf75c4 Volkswagen safety updates: Phase 1 (#444)

git-subtree-dir: panda
git-subtree-split: 0696730
pd0wm pushed a commit that referenced this pull request Mar 16, 2020
0696730 Toyota: add missing offset from speed signal (#469)
5b1a8dc Filtering LKAS HUD messages (#468)
99050f4 test_spam_can_buses was missing from Nissan
0f21b19 Cleanup pedal nomenclature (#467)
ceff91d Standardize brake safety tests (#465)
04809e1 Hyundai brake check (#464)
74c8ee0 Subaru brake check (#463)
4ecc6b3 Cleanup: avoid unnecessary bus checks in rx hooks
c7d0d5f Volkswagen safety updates: Phase 3 (#462)
4368748 WIP: Toyota brake check.  (#459)
2ef996f fix addr frequencies
e063b26 Second test fix tentative
88e2593 This should fix the test replay
ebb8866 Added NISSAN replay test
b2dbb50 remove toyota ipas safety code and tests (#460)
a379faf White Panda's Wi-Fi setup instructions (#457)
11ef24b Improve tests (#456)
fb02390 Subaru checksum counter (#455)
9a44499 Fix Subaru Legacy Torque driver bug (#454)
dfa6b07 separating subary legacy safety mode from global (#452)
dad5858 Chrysler: add brakepress cancellation (#451)
db94a5b Added Nissan safety (#244)
d7f1195 Chrysler Checksum/counter (#450)
96e535e abstract crc function (#448)
1b49d3e Hyundai: add gas disengage and tests (#447)
598074c Volkswagen safety updates: Phase 2 (#445)
b2ffaae Chrysler: disengage on gas press  (#442)
2ebbe36 Subaru: disengage on gas press (#446)
ccf75c4 Volkswagen safety updates: Phase 1 (#444)

git-subtree-dir: panda
git-subtree-split: 0696730
pd0wm pushed a commit that referenced this pull request Mar 16, 2020
0696730 Toyota: add missing offset from speed signal (#469)
5b1a8dc Filtering LKAS HUD messages (#468)
99050f4 test_spam_can_buses was missing from Nissan
0f21b19 Cleanup pedal nomenclature (#467)
ceff91d Standardize brake safety tests (#465)
04809e1 Hyundai brake check (#464)
74c8ee0 Subaru brake check (#463)
4ecc6b3 Cleanup: avoid unnecessary bus checks in rx hooks
c7d0d5f Volkswagen safety updates: Phase 3 (#462)
4368748 WIP: Toyota brake check.  (#459)
2ef996f fix addr frequencies
e063b26 Second test fix tentative
88e2593 This should fix the test replay
ebb8866 Added NISSAN replay test
b2dbb50 remove toyota ipas safety code and tests (#460)
a379faf White Panda's Wi-Fi setup instructions (#457)
11ef24b Improve tests (#456)
fb02390 Subaru checksum counter (#455)
9a44499 Fix Subaru Legacy Torque driver bug (#454)
dfa6b07 separating subary legacy safety mode from global (#452)
dad5858 Chrysler: add brakepress cancellation (#451)
db94a5b Added Nissan safety (#244)
d7f1195 Chrysler Checksum/counter (#450)
96e535e abstract crc function (#448)
1b49d3e Hyundai: add gas disengage and tests (#447)
598074c Volkswagen safety updates: Phase 2 (#445)
b2ffaae Chrysler: disengage on gas press  (#442)
2ebbe36 Subaru: disengage on gas press (#446)
ccf75c4 Volkswagen safety updates: Phase 1 (#444)

git-subtree-dir: panda
git-subtree-split: 0696730
pd0wm pushed a commit that referenced this pull request Mar 16, 2020
0696730 Toyota: add missing offset from speed signal (#469)
5b1a8dc Filtering LKAS HUD messages (#468)
99050f4 test_spam_can_buses was missing from Nissan
0f21b19 Cleanup pedal nomenclature (#467)
ceff91d Standardize brake safety tests (#465)
04809e1 Hyundai brake check (#464)
74c8ee0 Subaru brake check (#463)
4ecc6b3 Cleanup: avoid unnecessary bus checks in rx hooks
c7d0d5f Volkswagen safety updates: Phase 3 (#462)
4368748 WIP: Toyota brake check.  (#459)
2ef996f fix addr frequencies
e063b26 Second test fix tentative
88e2593 This should fix the test replay
ebb8866 Added NISSAN replay test
b2dbb50 remove toyota ipas safety code and tests (#460)
a379faf White Panda's Wi-Fi setup instructions (#457)
11ef24b Improve tests (#456)
fb02390 Subaru checksum counter (#455)
9a44499 Fix Subaru Legacy Torque driver bug (#454)
dfa6b07 separating subary legacy safety mode from global (#452)
dad5858 Chrysler: add brakepress cancellation (#451)
db94a5b Added Nissan safety (#244)
d7f1195 Chrysler Checksum/counter (#450)
96e535e abstract crc function (#448)
1b49d3e Hyundai: add gas disengage and tests (#447)
598074c Volkswagen safety updates: Phase 2 (#445)
b2ffaae Chrysler: disengage on gas press  (#442)
2ebbe36 Subaru: disengage on gas press (#446)
ccf75c4 Volkswagen safety updates: Phase 1 (#444)

git-subtree-dir: panda
git-subtree-split: 0696730
Vaggysag pushed a commit to Vaggysag/openpilot that referenced this pull request Apr 21, 2020
* Filtering LKAS HUD messages

* Added nissan test_fwd_hook()

* Added Nissan TX_MSGS safety test

Co-authored-by: rbiasini <riccardo.biasini@gmail.com>
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