openpilot v0.5.5 release

old-commit-hash: 8f3539a27b
commatwo_master v0.5.5
Vehicle Researcher 7 years ago
parent 596adf8228
commit cda78d7547
  1. 21
      README.md
  2. 6
      RELEASES.md
  3. 9
      cereal/log.capnp
  4. 10
      common/ffi_wrapper.py
  5. 0
      selfdrive/assets/sounds/Icon
  6. 3
      selfdrive/assets/sounds/hq_disengaged.mp3
  7. 3
      selfdrive/assets/sounds/hq_engaged.mp3
  8. 3
      selfdrive/assets/sounds/hq_warning_0.mp3
  9. 3
      selfdrive/assets/sounds/hq_warning_1.mp3
  10. 3
      selfdrive/assets/sounds/hq_warning_2.mp3
  11. 3
      selfdrive/car/honda/interface.py
  12. 43
      selfdrive/car/toyota/radar_interface.py
  13. 2
      selfdrive/common/version.h
  14. 1
      selfdrive/controls/controlsd.py
  15. 239
      selfdrive/controls/lib/alertmanager.py
  16. 11
      selfdrive/controls/lib/lateral_mpc/Makefile
  17. 9
      selfdrive/controls/lib/longitudinal_mpc/Makefile
  18. 3
      selfdrive/controls/lib/planner.py
  19. 4
      selfdrive/locationd/ubloxd.py
  20. 2
      selfdrive/loggerd/loggerd
  21. 5
      selfdrive/registration.py
  22. 2
      selfdrive/sensord/gpsd
  23. 2
      selfdrive/sensord/sensord
  24. 1
      selfdrive/service_list.yaml
  25. 4
      selfdrive/visiond/visiond

@ -1,9 +1,9 @@
[![](https://i.imgur.com/VlKV6V8.png)](#) [![](https://i.imgur.com/UetIFyH.jpg)](#)
Welcome to openpilot Welcome to openpilot
====== ======
[openpilot](http://github.com/commaai/openpilot) is an open source driving agent. Currently it performs the functions of Adaptive Cruise Control (ACC) and Lane Keeping Assist System (LKAS) for Hondas, Acuras, Toyotas, and a Chevy. It's about on par with Tesla Autopilot and GM Super Cruise, and better than [all other manufacturers](http://www.thedrive.com/tech/5707/the-war-for-autonomous-driving-part-iii-us-vs-germany-vs-japan). [openpilot](http://github.com/commaai/openpilot) is an open source driving agent. Currently it performs the functions of Adaptive Cruise Control (ACC) and Lane Keeping Assist System (LKAS) for selected Honda, Toyota, Acura, Lexus, Chevrolet, Hyundai, Kia. It's about on par with Tesla Autopilot and GM Super Cruise, and better than [all other manufacturers](http://www.thedrive.com/tech/5707/the-war-for-autonomous-driving-part-iii-us-vs-germany-vs-japan).
The openpilot codebase has been written to be concise and enable rapid prototyping. We look forward to your contributions - improving real vehicle automation has never been easier. The openpilot codebase has been written to be concise and enable rapid prototyping. We look forward to your contributions - improving real vehicle automation has never been easier.
@ -14,7 +14,7 @@ openpilot is developed by [comma.ai](https://comma.ai/) and users like you.
We have a [Twitter you should follow](https://twitter.com/comma_ai). We have a [Twitter you should follow](https://twitter.com/comma_ai).
Also, we have a 3500+ person [community on slack](https://slack.comma.ai). Also, we have a several thousand people community on [slack](https://slack.comma.ai).
<table> <table>
<tr> <tr>
@ -42,12 +42,12 @@ Supported Cars
------ ------
| Make | Model | Supported Package | Lateral | Longitudinal | No Accel Below | No Steer Below | | Make | Model | Supported Package | Lateral | Longitudinal | No Accel Below | No Steer Below |
| -------------------| ----------------------| ---------------------| --------| ---------------| -----------------| ---------------| | ---------------------| ----------------------| ---------------------| --------| ---------------| -----------------| ---------------|
| Acura | ILX 2016 | AcuraWatch Plus | Yes | Yes | 25mph<sup>1</sup>| 25mph | | Acura | ILX 2016 | AcuraWatch Plus | Yes | Yes | 25mph<sup>1</sup>| 25mph |
| Acura | ILX 2017 | AcuraWatch Plus | Yes | Yes | 25mph<sup>1</sup>| 25mph | | Acura | ILX 2017 | AcuraWatch Plus | Yes | Yes | 25mph<sup>1</sup>| 25mph |
| Acura | RDX 2018 | AcuraWatch Plus | Yes | Yes | 25mph<sup>1</sup>| 12mph | | Acura | RDX 2018 | AcuraWatch Plus | Yes | Yes | 25mph<sup>1</sup>| 12mph |
| GM<sup>3</sup> | Volt 2017 | Adaptive Cruise | Yes | Yes | 0mph | 7mph | | Chevrolet<sup>3</sup>| Volt 2017 | Adaptive Cruise | Yes | Yes | 0mph | 7mph |
| GM<sup>3</sup> | Volt 2018 | Adaptive Cruise | Yes | Yes | 0mph | 7mph | | Chevrolet<sup>3</sup>| Volt 2018 | Adaptive Cruise | Yes | Yes | 0mph | 7mph |
| Honda | Accord 2018 | All | Yes | Stock | 0mph | 3mph | | Honda | Accord 2018 | All | Yes | Stock | 0mph | 3mph |
| Honda | Civic 2016 | Honda Sensing | Yes | Yes | 0mph | 12mph | | Honda | Civic 2016 | Honda Sensing | Yes | Yes | 0mph | 12mph |
| Honda | Civic 2017 | Honda Sensing | Yes | Yes | 0mph | 12mph | | Honda | Civic 2017 | Honda Sensing | Yes | Yes | 0mph | 12mph |
@ -66,9 +66,9 @@ Supported Cars
| Honda | Pilot 2019 | All | Yes | Yes | 25mph<sup>1</sup>| 12mph | | Honda | Pilot 2019 | All | Yes | Yes | 25mph<sup>1</sup>| 12mph |
| Honda | Ridgeline 2017 | Honda Sensing | Yes | Yes | 25mph<sup>1</sup>| 12mph | | Honda | Ridgeline 2017 | Honda Sensing | Yes | Yes | 25mph<sup>1</sup>| 12mph |
| Honda | Ridgeline 2018 | Honda Sensing | Yes | Yes | 25mph<sup>1</sup>| 12mph | | Honda | Ridgeline 2018 | Honda Sensing | Yes | Yes | 25mph<sup>1</sup>| 12mph |
| Hyundai<sup>6</sup>| Santa Fe 2019 | All | Yes | Stock | 0mph | 0mph | | Hyundai<sup>6</sup> | Santa Fe 2019 | All | Yes | Stock | 0mph | 0mph |
| Hyundai<sup>6</sup>| Elantra 2017 | SCC + LKAS | Yes | Stock | 19mph | 34mph | | Hyundai<sup>6</sup> | Elantra 2017 | SCC + LKAS | Yes | Stock | 19mph | 34mph |
| Hyundai<sup>6</sup>| Genesis 2018 | All | Yes | Stock | 19mph | 34mph | | Hyundai<sup>6</sup> | Genesis 2018 | All | Yes | Stock | 19mph | 34mph |
| Kia<sup>6</sup> | Sorento 2018 | All | Yes | Stock | 0mph | 0mph | | Kia<sup>6</sup> | Sorento 2018 | All | Yes | Stock | 0mph | 0mph |
| Kia<sup>6</sup> | Stinger 2018 | SCC + LKAS | Yes | Stock | 0mph | 0mph | | Kia<sup>6</sup> | Stinger 2018 | SCC + LKAS | Yes | Stock | 0mph | 0mph |
| Lexus | RX Hybrid 2017 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph | | Lexus | RX Hybrid 2017 | All | Yes | Yes<sup>2</sup>| 0mph | 0mph |
@ -103,8 +103,11 @@ Community Maintained Cars
| Make | Model | Supported Package | Lateral | Longitudinal | No Accel Below | No Steer Below | | Make | Model | Supported Package | Lateral | Longitudinal | No Accel Below | No Steer Below |
| ------- | ---------------------- | -------------------- | ------- | ------------ | -------------- | -------------- | | ------- | ---------------------- | -------------------- | ------- | ------------ | -------------- | -------------- |
| Honda | Fit 2018 | Honda Sensing | Yes | Yes | 25mph<sup>1</sup>| 12mph | | Honda | Fit 2018 | Honda Sensing | Yes | Yes | 25mph<sup>1</sup>| 12mph |
| Tesla | Model S 2012 | All | Yes | Not yet | Not applicable | 0mph |
| Tesla | Model S 2013 | All | Yes | Not yet | Not applicable | 0mph |
[[Honda Fit Pull Request]](https://github.com/commaai/openpilot/pull/266). [[Honda Fit Pull Request]](https://github.com/commaai/openpilot/pull/266).
[[Tesla Model S Pull Request]](https://github.com/commaai/openpilot/pull/246)
Community Maintained Cars are not confirmed by comma.ai to meet our [safety model](https://github.com/commaai/openpilot/blob/devel/SAFETY.md). Be extra cautious using them. Community Maintained Cars are not confirmed by comma.ai to meet our [safety model](https://github.com/commaai/openpilot/blob/devel/SAFETY.md). Be extra cautious using them.

@ -1,3 +1,9 @@
Version 0.5.5 (2018-10-20)
========================
* Increase allowed Honda positive accelerations
* Fix sporadic unexpected braking when passing semi-trucks in Toyota
* Fix gear reading bug in Hyundai Elantra thanks to emmertex!
Version 0.5.4 (2018-09-25) Version 0.5.4 (2018-09-25)
======================== ========================
* New Driving Model * New Driving Model

@ -410,6 +410,7 @@ struct Live100Data {
alertStatus @38 :AlertStatus; alertStatus @38 :AlertStatus;
alertSize @39 :AlertSize; alertSize @39 :AlertSize;
alertBlinkingRate @42 :Float32; alertBlinkingRate @42 :Float32;
alertType @44 :Text;
awarenessStatus @26 :Float32; awarenessStatus @26 :Float32;
angleOffset @27 :Float32; angleOffset @27 :Float32;
gpsPlannerActive @40 :Bool; gpsPlannerActive @40 :Bool;
@ -1558,6 +1559,13 @@ struct Boot {
lastPmsg @2 :Data; lastPmsg @2 :Data;
} }
struct LiveParametersData {
valid @0 :Bool;
gyroBias @1 :Float32;
angleOffset @2 :Float32;
}
struct Event { struct Event {
# in nanoseconds? # in nanoseconds?
logMonoTime @0 :UInt64; logMonoTime @0 :UInt64;
@ -1623,5 +1631,6 @@ struct Event {
orbFeaturesSummary @58 :OrbFeaturesSummary; orbFeaturesSummary @58 :OrbFeaturesSummary;
driverMonitoring @59 :DriverMonitoring; driverMonitoring @59 :DriverMonitoring;
boot @60 :Boot; boot @60 :Boot;
liveParameters @61 :LiveParametersData;
} }
} }

@ -6,7 +6,7 @@ from cffi import FFI
TMPDIR = "/tmp/ccache" TMPDIR = "/tmp/ccache"
def ffi_wrap(name, c_code, c_header, tmpdir=TMPDIR): def ffi_wrap(name, c_code, c_header, tmpdir=TMPDIR, cflags="", libraries=[]):
cache = name + "_" + hashlib.sha1(c_code).hexdigest() cache = name + "_" + hashlib.sha1(c_code).hexdigest()
try: try:
os.mkdir(tmpdir) os.mkdir(tmpdir)
@ -21,19 +21,19 @@ def ffi_wrap(name, c_code, c_header, tmpdir=TMPDIR):
mod = __import__(cache) mod = __import__(cache)
except Exception: except Exception:
print "cache miss", cache print "cache miss", cache
compile_code(cache, c_code, c_header, tmpdir) compile_code(cache, c_code, c_header, tmpdir, cflags, libraries)
mod = __import__(cache) mod = __import__(cache)
finally: finally:
os.close(fd) os.close(fd)
return mod.ffi, mod.lib return mod.ffi, mod.lib
def compile_code(name, c_code, c_header, directory): def compile_code(name, c_code, c_header, directory, cflags="", libraries=[]):
ffibuilder = FFI() ffibuilder = FFI()
ffibuilder.set_source(name, c_code, source_extension='.cpp') ffibuilder.set_source(name, c_code, source_extension='.cpp', libraries=libraries)
ffibuilder.cdef(c_header) ffibuilder.cdef(c_header)
os.environ['OPT'] = "-fwrapv -O2 -DNDEBUG -std=c++11" os.environ['OPT'] = "-fwrapv -O2 -DNDEBUG -std=c++11"
os.environ['CFLAGS'] = "" os.environ['CFLAGS'] = cflags
ffibuilder.compile(verbose=True, debug=False, tmpdir=directory) ffibuilder.compile(verbose=True, debug=False, tmpdir=directory)
def wrap_compiled(name, directory): def wrap_compiled(name, directory):

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:27d907bc15d51415a0e7efa45cb4aeea7990fa315996a60a8e6620e69872d275
size 30966

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:eebdb5490ebd2bddd1b93a863820068bc4d591e2cdcda823d946ba3fcde984b4
size 30963

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1e1f296234cdfeeb3d1e318c5b6a097fd27cc29baf4cb0d5d60929e26fef7f95
size 30965

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:62525ebc394905b0a02580d69afbf51fabf0f4f78c837a7b360acba88d93b7fa
size 31592

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1e417442f9d38b99fc0be9ab21e1d56c4f7c3f723a7563241c26208b799f64b1
size 30965

@ -10,7 +10,6 @@ from selfdrive.controls.lib.drive_helpers import create_event, EventTypes as ET,
from selfdrive.controls.lib.vehicle_model import VehicleModel from selfdrive.controls.lib.vehicle_model import VehicleModel
from selfdrive.car.honda.carstate import CarState, get_can_parser from selfdrive.car.honda.carstate import CarState, get_can_parser
from selfdrive.car.honda.values import CruiseButtons, CM, BP, AH, CAR, HONDA_BOSCH from selfdrive.car.honda.values import CruiseButtons, CM, BP, AH, CAR, HONDA_BOSCH
from selfdrive.controls.lib.planner import A_ACC_MAX
try: try:
from selfdrive.car.honda.carcontroller import CarController from selfdrive.car.honda.carcontroller import CarController
@ -128,7 +127,7 @@ class CarInterface(object):
# accelOverride is more or less the max throttle allowed to pcm: usually set to a constant # accelOverride is more or less the max throttle allowed to pcm: usually set to a constant
# unless aTargetMax is very high and then we scale with it; this help in quicker restart # unless aTargetMax is very high and then we scale with it; this help in quicker restart
return float(max(0.714, a_target / A_ACC_MAX)) * min(speedLimiter, accelLimiter) return float(min(speedLimiter, accelLimiter))
@staticmethod @staticmethod
def get_params(candidate, fingerprint): def get_params(candidate, fingerprint):

@ -10,24 +10,30 @@ import selfdrive.messaging as messaging
from selfdrive.car.toyota.values import NO_DSU_CAR from selfdrive.car.toyota.values import NO_DSU_CAR
RADAR_MSGS = list(range(0x210, 0x220)) RADAR_A_MSGS = list(range(0x210, 0x220))
RADAR_B_MSGS = list(range(0x220, 0x230))
def _create_radard_can_parser(): def _create_radard_can_parser():
dbc_f = 'toyota_prius_2017_adas.dbc' dbc_f = 'toyota_prius_2017_adas.dbc'
msg_n = len(RADAR_MSGS)
signals = zip(['LONG_DIST'] * msg_n + ['NEW_TRACK'] * msg_n + ['LAT_DIST'] * msg_n + msg_a_n = len(RADAR_A_MSGS)
['REL_SPEED'] * msg_n + ['VALID'] * msg_n, msg_b_n = len(RADAR_B_MSGS)
RADAR_MSGS * 5,
[255] * msg_n + [1] * msg_n + [0] * msg_n + [0] * msg_n + [0] * msg_n) signals = zip(['LONG_DIST'] * msg_a_n + ['NEW_TRACK'] * msg_a_n + ['LAT_DIST'] * msg_a_n +
checks = zip(RADAR_MSGS, [20]*msg_n) ['REL_SPEED'] * msg_a_n + ['VALID'] * msg_a_n + ['SCORE'] * msg_b_n,
RADAR_A_MSGS * 5 + RADAR_B_MSGS,
[255] * msg_a_n + [1] * msg_a_n + [0] * msg_a_n + [0] * msg_a_n + [0] * msg_a_n + [0] * msg_b_n)
checks = zip(RADAR_A_MSGS + RADAR_B_MSGS, [20]*(msg_a_n + msg_b_n))
return CANParser(os.path.splitext(dbc_f)[0], signals, checks, 1) return CANParser(os.path.splitext(dbc_f)[0], signals, checks, 1)
class RadarInterface(object): class RadarInterface(object):
def __init__(self, CP): def __init__(self, CP):
# radar # radar
self.pts = {} self.pts = {}
self.validCnt = {key: 0 for key in RADAR_MSGS} self.seen_valid = {key: False for key in RADAR_A_MSGS}
self.track_id = 0 self.track_id = 0
self.delay = 0.0 # Delay of radar self.delay = 0.0 # Delay of radar
@ -52,7 +58,7 @@ class RadarInterface(object):
tm = int(sec_since_boot() * 1e9) tm = int(sec_since_boot() * 1e9)
updated_messages.update(self.rcp.update(tm, True)) updated_messages.update(self.rcp.update(tm, True))
# TODO: do not hardcode last msg # TODO: do not hardcode last msg
if 0x21f in updated_messages: if 0x22f in updated_messages:
break break
errors = [] errors = []
@ -62,19 +68,20 @@ class RadarInterface(object):
ret.canMonoTimes = canMonoTimes ret.canMonoTimes = canMonoTimes
for ii in updated_messages: for ii in updated_messages:
if ii in RADAR_A_MSGS:
cpt = self.rcp.vl[ii] cpt = self.rcp.vl[ii]
if cpt['LONG_DIST'] >=255 or cpt['NEW_TRACK']: if cpt['LONG_DIST'] >= 255 or cpt['NEW_TRACK']:
self.validCnt[ii] = 0 # reset counter self.seen_valid[ii] = False # reset validity
if cpt['VALID'] and cpt['LONG_DIST'] < 255: if cpt['LONG_DIST'] < 255 and cpt['VALID']:
self.validCnt[ii] += 1 self.seen_valid[ii] = True
else:
self.validCnt[ii] = max(self.validCnt[ii] -1, 0) score = self.rcp.vl[ii+16]['SCORE']
#print ii, self.validCnt[ii], cpt['VALID'], cpt['LONG_DIST'], cpt['LAT_DIST'] # print ii, score, cpt['VALID'], cpt['LONG_DIST'], cpt['LAT_DIST']
# radar point only valid if there have been enough valid measurements # radar point only valid if it's a valid measurement and score is above 50
if self.validCnt[ii] > 0: if (cpt['VALID'] or score > 50) and cpt['LONG_DIST'] < 255 and self.seen_valid[ii]:
if ii not in self.pts or cpt['NEW_TRACK']: if ii not in self.pts or cpt['NEW_TRACK']:
self.pts[ii] = car.RadarState.RadarPoint.new_message() self.pts[ii] = car.RadarState.RadarPoint.new_message()
self.pts[ii].trackId = self.track_id self.pts[ii].trackId = self.track_id

@ -1 +1 @@
#define COMMA_VERSION "0.5.4-release" #define COMMA_VERSION "0.5.5-release"

@ -352,6 +352,7 @@ def data_send(perception_state, plan, plan_ts, CS, CI, CP, VM, state, events, ac
"alertSize": AM.alert_size, "alertSize": AM.alert_size,
"alertStatus": AM.alert_status, "alertStatus": AM.alert_status,
"alertBlinkingRate": AM.alert_rate, "alertBlinkingRate": AM.alert_rate,
"alertType": AM.alert_type,
"awarenessStatus": max(driver_status.awareness, 0.0) if isEnabled(state) else 0.0, "awarenessStatus": max(driver_status.awareness, 0.0) if isEnabled(state) else 0.0,
"driverMonitoringOn": bool(driver_status.monitor_on), "driverMonitoringOn": bool(driver_status.monitor_on),
"canMonoTimes": list(CS.canMonoTimes), "canMonoTimes": list(CS.canMonoTimes),

@ -18,6 +18,7 @@ AlertStatus = log.Live100Data.AlertStatus
class Alert(object): class Alert(object):
def __init__(self, def __init__(self,
alert_type,
alert_text_1, alert_text_1,
alert_text_2, alert_text_2,
alert_status, alert_status,
@ -30,6 +31,7 @@ class Alert(object):
duration_text, duration_text,
alert_rate=0.): alert_rate=0.):
self.alert_type = alert_type
self.alert_text_1 = alert_text_1 self.alert_text_1 = alert_text_1
self.alert_text_2 = alert_text_2 self.alert_text_2 = alert_text_2
self.alert_status = alert_status self.alert_status = alert_status
@ -60,475 +62,554 @@ class Alert(object):
class AlertManager(object): class AlertManager(object):
alerts = { alerts = {
alert.alert_type: alert
for alert in [
# Miscellaneous alerts # Miscellaneous alerts
"enable": Alert( Alert(
"enable",
"", "",
"", "",
AlertStatus.normal, AlertSize.none, AlertStatus.normal, AlertSize.none,
Priority.MID, None, "beepSingle", .2, 0., 0.), Priority.MID, None, "beepSingle", .2, 0., 0.),
"disable": Alert( Alert(
"disable",
"", "",
"", "",
AlertStatus.normal, AlertSize.none, AlertStatus.normal, AlertSize.none,
Priority.MID, None, "beepSingle", .2, 0., 0.), Priority.MID, None, "beepSingle", .2, 0., 0.),
"fcw": Alert( Alert(
"fcw",
"BRAKE!", "BRAKE!",
"Risk of Collision", "Risk of Collision",
AlertStatus.critical, AlertSize.full, AlertStatus.critical, AlertSize.full,
Priority.HIGHEST, "fcw", "chimeRepeated", 1., 2., 2.), Priority.HIGHEST, "fcw", "chimeRepeated", 1., 2., 2.),
"steerSaturated": Alert( Alert(
"steerSaturated",
"TAKE CONTROL", "TAKE CONTROL",
"Turn Exceeds Steering Limit", "Turn Exceeds Steering Limit",
AlertStatus.userPrompt, AlertSize.mid, AlertStatus.userPrompt, AlertSize.mid,
Priority.LOW, "steerRequired", "chimeSingle", 1., 2., 3.), Priority.LOW, "steerRequired", "chimeSingle", 1., 2., 3.),
"steerTempUnavailable": Alert( Alert(
"steerTempUnavailable",
"TAKE CONTROL", "TAKE CONTROL",
"Steering Temporarily Unavailable", "Steering Temporarily Unavailable",
AlertStatus.userPrompt, AlertSize.mid, AlertStatus.userPrompt, AlertSize.mid,
Priority.LOW, "steerRequired", "chimeDouble", .4, 2., 3.), Priority.LOW, "steerRequired", "chimeDouble", .4, 2., 3.),
"steerTempUnavailableMute": Alert( Alert(
"steerTempUnavailableMute",
"TAKE CONTROL", "TAKE CONTROL",
"Steering Temporarily Unavailable", "Steering Temporarily Unavailable",
AlertStatus.userPrompt, AlertSize.mid, AlertStatus.userPrompt, AlertSize.mid,
Priority.LOW, None, None, .2, .2, .2), Priority.LOW, None, None, .2, .2, .2),
"preDriverDistracted": Alert( Alert(
"preDriverDistracted",
"KEEP EYES ON ROAD: User Appears Distracted", "KEEP EYES ON ROAD: User Appears Distracted",
"", "",
AlertStatus.normal, AlertSize.small, AlertStatus.normal, AlertSize.small,
Priority.LOW, "steerRequired", None, 0., .1, .1, alert_rate=0.75), Priority.LOW, "steerRequired", None, 0., .1, .1, alert_rate=0.75),
"promptDriverDistracted": Alert( Alert(
"promptDriverDistracted",
"KEEP EYES ON ROAD", "KEEP EYES ON ROAD",
"User Appears Distracted", "User Appears Distracted",
AlertStatus.userPrompt, AlertSize.mid, AlertStatus.userPrompt, AlertSize.mid,
Priority.MID, "steerRequired", "chimeRepeated", .1, .1, .1), Priority.MID, "steerRequired", "chimeRepeated", .1, .1, .1),
"driverDistracted": Alert( Alert(
"driverDistracted",
"DISENGAGE IMMEDIATELY", "DISENGAGE IMMEDIATELY",
"User Was Distracted", "User Was Distracted",
AlertStatus.critical, AlertSize.full, AlertStatus.critical, AlertSize.full,
Priority.HIGH, "steerRequired", "chimeRepeated", .1, .1, .1), Priority.HIGH, "steerRequired", "chimeRepeated", .1, .1, .1),
"preDriverUnresponsive": Alert( Alert(
"preDriverUnresponsive",
"TOUCH STEERING WHEEL: No Driver Monitoring", "TOUCH STEERING WHEEL: No Driver Monitoring",
"", "",
AlertStatus.normal, AlertSize.small, AlertStatus.normal, AlertSize.small,
Priority.LOW, "steerRequired", None, 0., .1, .1, alert_rate=0.75), Priority.LOW, "steerRequired", None, 0., .1, .1, alert_rate=0.75),
"promptDriverUnresponsive": Alert( Alert(
"promptDriverUnresponsive",
"TOUCH STEERING WHEEL", "TOUCH STEERING WHEEL",
"User Is Unresponsive", "User Is Unresponsive",
AlertStatus.userPrompt, AlertSize.mid, AlertStatus.userPrompt, AlertSize.mid,
Priority.MID, "steerRequired", "chimeRepeated", .1, .1, .1), Priority.MID, "steerRequired", "chimeRepeated", .1, .1, .1),
"driverUnresponsive": Alert( Alert(
"driverUnresponsive",
"DISENGAGE IMMEDIATELY", "DISENGAGE IMMEDIATELY",
"User Was Unresponsive", "User Was Unresponsive",
AlertStatus.critical, AlertSize.full, AlertStatus.critical, AlertSize.full,
Priority.HIGH, "steerRequired", "chimeRepeated", .1, .1, .1), Priority.HIGH, "steerRequired", "chimeRepeated", .1, .1, .1),
"driverMonitorOff": Alert( Alert(
"driverMonitorOff",
"DRIVER MONITOR IS UNAVAILABLE", "DRIVER MONITOR IS UNAVAILABLE",
"Accuracy Is Low", "Accuracy Is Low",
AlertStatus.normal, AlertSize.mid, AlertStatus.normal, AlertSize.mid,
Priority.LOW, None, None, .4, 0., 4.), Priority.LOW, None, None, .4, 0., 4.),
"driverMonitorOn": Alert( Alert(
"driverMonitorOn",
"DRIVER MONITOR IS AVAILABLE", "DRIVER MONITOR IS AVAILABLE",
"Accuracy Is High", "Accuracy Is High",
AlertStatus.normal, AlertSize.mid, AlertStatus.normal, AlertSize.mid,
Priority.LOW, None, None, .4, 0., 4.), Priority.LOW, None, None, .4, 0., 4.),
"geofence": Alert( Alert(
"geofence",
"DISENGAGEMENT REQUIRED", "DISENGAGEMENT REQUIRED",
"Not in Geofenced Area", "Not in Geofenced Area",
AlertStatus.userPrompt, AlertSize.mid, AlertStatus.userPrompt, AlertSize.mid,
Priority.HIGH, "steerRequired", "chimeRepeated", .1, .1, .1), Priority.HIGH, "steerRequired", "chimeRepeated", .1, .1, .1),
"startup": Alert( Alert(
"startup",
"Be ready to take over at any time", "Be ready to take over at any time",
"Always keep hands on wheel and eyes on road", "Always keep hands on wheel and eyes on road",
AlertStatus.normal, AlertSize.mid, AlertStatus.normal, AlertSize.mid,
Priority.LOW_LOWEST, None, None, 0., 0., 15.), Priority.LOW_LOWEST, None, None, 0., 0., 15.),
"ethicalDilemma": Alert( Alert(
"ethicalDilemma",
"TAKE CONTROL IMMEDIATELY", "TAKE CONTROL IMMEDIATELY",
"Ethical Dilemma Detected", "Ethical Dilemma Detected",
AlertStatus.critical, AlertSize.full, AlertStatus.critical, AlertSize.full,
Priority.HIGHEST, "steerRequired", "chimeRepeated", 1., 3., 3.), Priority.HIGHEST, "steerRequired", "chimeRepeated", 1., 3., 3.),
"steerTempUnavailableNoEntry": Alert( Alert(
"steerTempUnavailableNoEntry",
"openpilot Unavailable", "openpilot Unavailable",
"Steering Temporarily Unavailable", "Steering Temporarily Unavailable",
AlertStatus.normal, AlertSize.mid, AlertStatus.normal, AlertSize.mid,
Priority.LOW, None, "chimeDouble", .4, 0., 3.), Priority.LOW, None, "chimeDouble", .4, 0., 3.),
"manualRestart": Alert( Alert(
"manualRestart",
"TAKE CONTROL", "TAKE CONTROL",
"Resume Driving Manually", "Resume Driving Manually",
AlertStatus.userPrompt, AlertSize.mid, AlertStatus.userPrompt, AlertSize.mid,
Priority.LOW, None, None, 0., 0., .2), Priority.LOW, None, None, 0., 0., .2),
"resumeRequired": Alert( Alert(
"resumeRequired",
"STOPPED", "STOPPED",
"Press Resume to Move", "Press Resume to Move",
AlertStatus.userPrompt, AlertSize.mid, AlertStatus.userPrompt, AlertSize.mid,
Priority.LOW, None, None, 0., 0., .2), Priority.LOW, None, None, 0., 0., .2),
"belowSteerSpeed": Alert( Alert(
"belowSteerSpeed",
"TAKE CONTROL", "TAKE CONTROL",
"Steer Unavailable Below ", "Steer Unavailable Below ",
AlertStatus.userPrompt, AlertSize.mid, AlertStatus.userPrompt, AlertSize.mid,
Priority.MID, "steerRequired", None, 0., 0., .1), Priority.MID, "steerRequired", None, 0., 0., .1),
"debugAlert": Alert( Alert(
"debugAlert",
"DEBUG ALERT", "DEBUG ALERT",
"", "",
AlertStatus.userPrompt, AlertSize.mid, AlertStatus.userPrompt, AlertSize.mid,
Priority.LOW, None, None, .1, .1, .1), Priority.LOW, None, None, .1, .1, .1),
# Non-entry only alerts # Non-entry only alerts
"wrongCarModeNoEntry": Alert( Alert(
"wrongCarModeNoEntry",
"openpilot Unavailable", "openpilot Unavailable",
"Main Switch Off", "Main Switch Off",
AlertStatus.normal, AlertSize.mid, AlertStatus.normal, AlertSize.mid,
Priority.LOW, None, "chimeDouble", .4, 0., 3.), Priority.LOW, None, "chimeDouble", .4, 0., 3.),
"dataNeededNoEntry": Alert( Alert(
"dataNeededNoEntry",
"openpilot Unavailable", "openpilot Unavailable",
"Data Needed for Calibration. Upload Drive, Try Again", "Data Needed for Calibration. Upload Drive, Try Again",
AlertStatus.normal, AlertSize.mid, AlertStatus.normal, AlertSize.mid,
Priority.LOW, None, "chimeDouble", .4, 0., 3.), Priority.LOW, None, "chimeDouble", .4, 0., 3.),
"outOfSpaceNoEntry": Alert( Alert(
"outOfSpaceNoEntry",
"openpilot Unavailable", "openpilot Unavailable",
"Out of Storage Space", "Out of Storage Space",
AlertStatus.normal, AlertSize.mid, AlertStatus.normal, AlertSize.mid,
Priority.LOW, None, "chimeDouble", .4, 0., 3.), Priority.LOW, None, "chimeDouble", .4, 0., 3.),
"pedalPressedNoEntry": Alert( Alert(
"pedalPressedNoEntry",
"openpilot Unavailable", "openpilot Unavailable",
"Pedal Pressed During Attempt", "Pedal Pressed During Attempt",
AlertStatus.normal, AlertSize.mid, AlertStatus.normal, AlertSize.mid,
Priority.LOW, "brakePressed", "chimeDouble", .4, 2., 3.), Priority.LOW, "brakePressed", "chimeDouble", .4, 2., 3.),
"speedTooLowNoEntry": Alert( Alert(
"speedTooLowNoEntry",
"openpilot Unavailable", "openpilot Unavailable",
"Speed Too Low", "Speed Too Low",
AlertStatus.normal, AlertSize.mid, AlertStatus.normal, AlertSize.mid,
Priority.LOW, None, "chimeDouble", .4, 2., 3.), Priority.LOW, None, "chimeDouble", .4, 2., 3.),
"brakeHoldNoEntry": Alert( Alert(
"brakeHoldNoEntry",
"openpilot Unavailable", "openpilot Unavailable",
"Brake Hold Active", "Brake Hold Active",
AlertStatus.normal, AlertSize.mid, AlertStatus.normal, AlertSize.mid,
Priority.LOW, None, "chimeDouble", .4, 2., 3.), Priority.LOW, None, "chimeDouble", .4, 2., 3.),
"parkBrakeNoEntry": Alert( Alert(
"parkBrakeNoEntry",
"openpilot Unavailable", "openpilot Unavailable",
"Park Brake Engaged", "Park Brake Engaged",
AlertStatus.normal, AlertSize.mid, AlertStatus.normal, AlertSize.mid,
Priority.LOW, None, "chimeDouble", .4, 2., 3.), Priority.LOW, None, "chimeDouble", .4, 2., 3.),
"lowSpeedLockoutNoEntry": Alert( Alert(
"lowSpeedLockoutNoEntry",
"openpilot Unavailable", "openpilot Unavailable",
"Cruise Fault: Restart the Car", "Cruise Fault: Restart the Car",
AlertStatus.normal, AlertSize.mid, AlertStatus.normal, AlertSize.mid,
Priority.LOW, None, "chimeDouble", .4, 2., 3.), Priority.LOW, None, "chimeDouble", .4, 2., 3.),
"lowBatteryNoEntry": Alert( Alert(
"lowBatteryNoEntry",
"openpilot Unavailable", "openpilot Unavailable",
"Low Battery", "Low Battery",
AlertStatus.normal, AlertSize.mid, AlertStatus.normal, AlertSize.mid,
Priority.LOW, None, "chimeDouble", .4, 2., 3.), Priority.LOW, None, "chimeDouble", .4, 2., 3.),
# Cancellation alerts causing soft disabling # Cancellation alerts causing soft disabling
"overheat": Alert( Alert(
"overheat",
"TAKE CONTROL IMMEDIATELY", "TAKE CONTROL IMMEDIATELY",
"System Overheated", "System Overheated",
AlertStatus.critical, AlertSize.full, AlertStatus.critical, AlertSize.full,
Priority.MID, "steerRequired", "chimeRepeated", 1., 3., 3.), Priority.MID, "steerRequired", "chimeRepeated", 1., 3., 3.),
"wrongGear": Alert( Alert(
"wrongGear",
"TAKE CONTROL IMMEDIATELY", "TAKE CONTROL IMMEDIATELY",
"Gear not D", "Gear not D",
AlertStatus.critical, AlertSize.full, AlertStatus.critical, AlertSize.full,
Priority.MID, "steerRequired", "chimeRepeated", 1., 3., 3.), Priority.MID, "steerRequired", "chimeRepeated", 1., 3., 3.),
"calibrationInvalid": Alert( Alert(
"calibrationInvalid",
"TAKE CONTROL IMMEDIATELY", "TAKE CONTROL IMMEDIATELY",
"Calibration Invalid: Reposition EON and Recalibrate", "Calibration Invalid: Reposition EON and Recalibrate",
AlertStatus.critical, AlertSize.full, AlertStatus.critical, AlertSize.full,
Priority.MID, "steerRequired", "chimeRepeated", 1., 3., 3.), Priority.MID, "steerRequired", "chimeRepeated", 1., 3., 3.),
"calibrationIncomplete": Alert( Alert(
"calibrationIncomplete",
"TAKE CONTROL IMMEDIATELY", "TAKE CONTROL IMMEDIATELY",
"Calibration in Progress", "Calibration in Progress",
AlertStatus.critical, AlertSize.full, AlertStatus.critical, AlertSize.full,
Priority.MID, "steerRequired", "chimeRepeated", 1., 3., 3.), Priority.MID, "steerRequired", "chimeRepeated", 1., 3., 3.),
"doorOpen": Alert( Alert(
"doorOpen",
"TAKE CONTROL IMMEDIATELY", "TAKE CONTROL IMMEDIATELY",
"Door Open", "Door Open",
AlertStatus.critical, AlertSize.full, AlertStatus.critical, AlertSize.full,
Priority.MID, "steerRequired", "chimeRepeated", 1., 3., 3.), Priority.MID, "steerRequired", "chimeRepeated", 1., 3., 3.),
"seatbeltNotLatched": Alert( Alert(
"seatbeltNotLatched",
"TAKE CONTROL IMMEDIATELY", "TAKE CONTROL IMMEDIATELY",
"Seatbelt Unlatched", "Seatbelt Unlatched",
AlertStatus.critical, AlertSize.full, AlertStatus.critical, AlertSize.full,
Priority.MID, "steerRequired", "chimeRepeated", 1., 3., 3.), Priority.MID, "steerRequired", "chimeRepeated", 1., 3., 3.),
"espDisabled": Alert( Alert(
"espDisabled",
"TAKE CONTROL IMMEDIATELY", "TAKE CONTROL IMMEDIATELY",
"ESP Off", "ESP Off",
AlertStatus.critical, AlertSize.full, AlertStatus.critical, AlertSize.full,
Priority.MID, "steerRequired", "chimeRepeated", 1., 3., 3.), Priority.MID, "steerRequired", "chimeRepeated", 1., 3., 3.),
"lowBattery": Alert( Alert(
"lowBattery",
"TAKE CONTROL IMMEDIATELY", "TAKE CONTROL IMMEDIATELY",
"Low Battery", "Low Battery",
AlertStatus.critical, AlertSize.full, AlertStatus.critical, AlertSize.full,
Priority.MID, "steerRequired", "chimeRepeated", 1., 3., 3.), Priority.MID, "steerRequired", "chimeRepeated", 1., 3., 3.),
# Cancellation alerts causing immediate disabling # Cancellation alerts causing immediate disabling
"radarCommIssue": Alert( Alert(
"radarCommIssue",
"TAKE CONTROL IMMEDIATELY", "TAKE CONTROL IMMEDIATELY",
"Radar Error: Restart the Car", "Radar Error: Restart the Car",
AlertStatus.critical, AlertSize.full, AlertStatus.critical, AlertSize.full,
Priority.HIGHEST, "steerRequired", "chimeRepeated", 1., 3., 4.), Priority.HIGHEST, "steerRequired", "chimeRepeated", 1., 3., 4.),
"radarFault": Alert( Alert(
"radarFault",
"TAKE CONTROL IMMEDIATELY", "TAKE CONTROL IMMEDIATELY",
"Radar Error: Restart the Car", "Radar Error: Restart the Car",
AlertStatus.critical, AlertSize.full, AlertStatus.critical, AlertSize.full,
Priority.HIGHEST, "steerRequired", "chimeRepeated", 1., 3., 4.), Priority.HIGHEST, "steerRequired", "chimeRepeated", 1., 3., 4.),
"modelCommIssue": Alert( Alert(
"modelCommIssue",
"TAKE CONTROL IMMEDIATELY", "TAKE CONTROL IMMEDIATELY",
"Model Error: Check Internet Connection", "Model Error: Check Internet Connection",
AlertStatus.critical, AlertSize.full, AlertStatus.critical, AlertSize.full,
Priority.HIGHEST, "steerRequired", "chimeRepeated", 1., 3., 4.), Priority.HIGHEST, "steerRequired", "chimeRepeated", 1., 3., 4.),
"controlsFailed": Alert( Alert(
"controlsFailed",
"TAKE CONTROL IMMEDIATELY", "TAKE CONTROL IMMEDIATELY",
"Controls Failed", "Controls Failed",
AlertStatus.critical, AlertSize.full, AlertStatus.critical, AlertSize.full,
Priority.HIGHEST, "steerRequired", "chimeRepeated", 1., 3., 4.), Priority.HIGHEST, "steerRequired", "chimeRepeated", 1., 3., 4.),
"controlsMismatch": Alert( Alert(
"controlsMismatch",
"TAKE CONTROL IMMEDIATELY", "TAKE CONTROL IMMEDIATELY",
"Controls Mismatch", "Controls Mismatch",
AlertStatus.critical, AlertSize.full, AlertStatus.critical, AlertSize.full,
Priority.HIGHEST, "steerRequired", "chimeRepeated", 1., 3., 4.), Priority.HIGHEST, "steerRequired", "chimeRepeated", 1., 3., 4.),
"commIssue": Alert( Alert(
"commIssue",
"TAKE CONTROL IMMEDIATELY", "TAKE CONTROL IMMEDIATELY",
"CAN Error: Check Connections", "CAN Error: Check Connections",
AlertStatus.critical, AlertSize.full, AlertStatus.critical, AlertSize.full,
Priority.HIGHEST, "steerRequired", "chimeRepeated", 1., 3., 4.), Priority.HIGHEST, "steerRequired", "chimeRepeated", 1., 3., 4.),
"steerUnavailable": Alert( Alert(
"steerUnavailable",
"TAKE CONTROL IMMEDIATELY", "TAKE CONTROL IMMEDIATELY",
"LKAS Fault: Restart the Car", "LKAS Fault: Restart the Car",
AlertStatus.critical, AlertSize.full, AlertStatus.critical, AlertSize.full,
Priority.HIGHEST, "steerRequired", "chimeRepeated", 1., 3., 4.), Priority.HIGHEST, "steerRequired", "chimeRepeated", 1., 3., 4.),
"brakeUnavailable": Alert( Alert(
"brakeUnavailable",
"TAKE CONTROL IMMEDIATELY", "TAKE CONTROL IMMEDIATELY",
"Cruise Fault: Restart the Car", "Cruise Fault: Restart the Car",
AlertStatus.critical, AlertSize.full, AlertStatus.critical, AlertSize.full,
Priority.HIGHEST, "steerRequired", "chimeRepeated", 1., 3., 4.), Priority.HIGHEST, "steerRequired", "chimeRepeated", 1., 3., 4.),
"gasUnavailable": Alert( Alert(
"gasUnavailable",
"TAKE CONTROL IMMEDIATELY", "TAKE CONTROL IMMEDIATELY",
"Gas Fault: Restart the Car", "Gas Fault: Restart the Car",
AlertStatus.critical, AlertSize.full, AlertStatus.critical, AlertSize.full,
Priority.HIGHEST, "steerRequired", "chimeRepeated", 1., 3., 4.), Priority.HIGHEST, "steerRequired", "chimeRepeated", 1., 3., 4.),
"reverseGear": Alert( Alert(
"reverseGear",
"TAKE CONTROL IMMEDIATELY", "TAKE CONTROL IMMEDIATELY",
"Reverse Gear", "Reverse Gear",
AlertStatus.critical, AlertSize.full, AlertStatus.critical, AlertSize.full,
Priority.HIGHEST, "steerRequired", "chimeRepeated", 1., 3., 4.), Priority.HIGHEST, "steerRequired", "chimeRepeated", 1., 3., 4.),
"cruiseDisabled": Alert( Alert(
"cruiseDisabled",
"TAKE CONTROL IMMEDIATELY", "TAKE CONTROL IMMEDIATELY",
"Cruise Is Off", "Cruise Is Off",
AlertStatus.critical, AlertSize.full, AlertStatus.critical, AlertSize.full,
Priority.HIGHEST, "steerRequired", "chimeRepeated", 1., 3., 4.), Priority.HIGHEST, "steerRequired", "chimeRepeated", 1., 3., 4.),
"plannerError": Alert( Alert(
"plannerError",
"TAKE CONTROL IMMEDIATELY", "TAKE CONTROL IMMEDIATELY",
"Planner Solution Error", "Planner Solution Error",
AlertStatus.critical, AlertSize.full, AlertStatus.critical, AlertSize.full,
Priority.HIGHEST, "steerRequired", "chimeRepeated", 1., 3., 4.), Priority.HIGHEST, "steerRequired", "chimeRepeated", 1., 3., 4.),
# not loud cancellations (user is in control) # not loud cancellations (user is in control)
"noTarget": Alert( Alert(
"noTarget",
"openpilot Canceled", "openpilot Canceled",
"No close lead car", "No close lead car",
AlertStatus.normal, AlertSize.mid, AlertStatus.normal, AlertSize.mid,
Priority.HIGH, None, "chimeDouble", .4, 2., 3.), Priority.HIGH, None, "chimeDouble", .4, 2., 3.),
"speedTooLow": Alert( Alert(
"speedTooLow",
"openpilot Canceled", "openpilot Canceled",
"Speed too low", "Speed too low",
AlertStatus.normal, AlertSize.mid, AlertStatus.normal, AlertSize.mid,
Priority.HIGH, None, "chimeDouble", .4, 2., 3.), Priority.HIGH, None, "chimeDouble", .4, 2., 3.),
# Cancellation alerts causing non-entry # Cancellation alerts causing non-entry
"overheatNoEntry": Alert( Alert(
"overheatNoEntry",
"openpilot Unavailable", "openpilot Unavailable",
"System overheated", "System overheated",
AlertStatus.normal, AlertSize.mid, AlertStatus.normal, AlertSize.mid,
Priority.LOW, None, "chimeDouble", .4, 2., 3.), Priority.LOW, None, "chimeDouble", .4, 2., 3.),
"wrongGearNoEntry": Alert( Alert(
"wrongGearNoEntry",
"openpilot Unavailable", "openpilot Unavailable",
"Gear not D", "Gear not D",
AlertStatus.normal, AlertSize.mid, AlertStatus.normal, AlertSize.mid,
Priority.LOW, None, "chimeDouble", .4, 2., 3.), Priority.LOW, None, "chimeDouble", .4, 2., 3.),
"calibrationInvalidNoEntry": Alert( Alert(
"calibrationInvalidNoEntry",
"openpilot Unavailable", "openpilot Unavailable",
"Calibration Invalid: Reposition EON and Recalibrate", "Calibration Invalid: Reposition EON and Recalibrate",
AlertStatus.normal, AlertSize.mid, AlertStatus.normal, AlertSize.mid,
Priority.LOW, None, "chimeDouble", .4, 2., 3.), Priority.LOW, None, "chimeDouble", .4, 2., 3.),
"calibrationIncompleteNoEntry": Alert( Alert(
"calibrationIncompleteNoEntry",
"openpilot Unavailable", "openpilot Unavailable",
"Calibration in Progress", "Calibration in Progress",
AlertStatus.normal, AlertSize.mid, AlertStatus.normal, AlertSize.mid,
Priority.LOW, None, "chimeDouble", .4, 2., 3.), Priority.LOW, None, "chimeDouble", .4, 2., 3.),
"doorOpenNoEntry": Alert( Alert(
"doorOpenNoEntry",
"openpilot Unavailable", "openpilot Unavailable",
"Door open", "Door open",
AlertStatus.normal, AlertSize.mid, AlertStatus.normal, AlertSize.mid,
Priority.LOW, None, "chimeDouble", .4, 2., 3.), Priority.LOW, None, "chimeDouble", .4, 2., 3.),
"seatbeltNotLatchedNoEntry": Alert( Alert(
"seatbeltNotLatchedNoEntry",
"openpilot Unavailable", "openpilot Unavailable",
"Seatbelt unlatched", "Seatbelt unlatched",
AlertStatus.normal, AlertSize.mid, AlertStatus.normal, AlertSize.mid,
Priority.LOW, None, "chimeDouble", .4, 2., 3.), Priority.LOW, None, "chimeDouble", .4, 2., 3.),
"espDisabledNoEntry": Alert( Alert(
"espDisabledNoEntry",
"openpilot Unavailable", "openpilot Unavailable",
"ESP Off", "ESP Off",
AlertStatus.normal, AlertSize.mid, AlertStatus.normal, AlertSize.mid,
Priority.LOW, None, "chimeDouble", .4, 2., 3.), Priority.LOW, None, "chimeDouble", .4, 2., 3.),
"geofenceNoEntry": Alert( Alert(
"geofenceNoEntry",
"openpilot Unavailable", "openpilot Unavailable",
"Not in Geofenced Area", "Not in Geofenced Area",
AlertStatus.normal, AlertSize.mid, AlertStatus.normal, AlertSize.mid,
Priority.MID, None, "chimeDouble", .4, 2., 3.), Priority.MID, None, "chimeDouble", .4, 2., 3.),
"radarCommIssueNoEntry": Alert( Alert(
"radarCommIssueNoEntry",
"openpilot Unavailable", "openpilot Unavailable",
"Radar Error: Restart the Car", "Radar Error: Restart the Car",
AlertStatus.normal, AlertSize.mid, AlertStatus.normal, AlertSize.mid,
Priority.LOW, None, "chimeDouble", .4, 2., 3.), Priority.LOW, None, "chimeDouble", .4, 2., 3.),
"radarFaultNoEntry": Alert( Alert(
"radarFaultNoEntry",
"openpilot Unavailable", "openpilot Unavailable",
"Radar Error: Restart the Car", "Radar Error: Restart the Car",
AlertStatus.normal, AlertSize.mid, AlertStatus.normal, AlertSize.mid,
Priority.LOW, None, "chimeDouble", .4, 2., 3.), Priority.LOW, None, "chimeDouble", .4, 2., 3.),
"modelCommIssueNoEntry": Alert( Alert(
"modelCommIssueNoEntry",
"openpilot Unavailable", "openpilot Unavailable",
"Model Error: Check Internet Connection", "Model Error: Check Internet Connection",
AlertStatus.normal, AlertSize.mid, AlertStatus.normal, AlertSize.mid,
Priority.LOW, None, "chimeDouble", .4, 2., 3.), Priority.LOW, None, "chimeDouble", .4, 2., 3.),
"controlsFailedNoEntry": Alert( Alert(
"controlsFailedNoEntry",
"openpilot Unavailable", "openpilot Unavailable",
"Controls Failed", "Controls Failed",
AlertStatus.normal, AlertSize.mid, AlertStatus.normal, AlertSize.mid,
Priority.LOW, None, "chimeDouble", .4, 2., 3.), Priority.LOW, None, "chimeDouble", .4, 2., 3.),
"commIssueNoEntry": Alert( Alert(
"commIssueNoEntry",
"openpilot Unavailable", "openpilot Unavailable",
"CAN Error: Check Connections", "CAN Error: Check Connections",
AlertStatus.normal, AlertSize.mid, AlertStatus.normal, AlertSize.mid,
Priority.LOW, None, "chimeDouble", .4, 2., 3.), Priority.LOW, None, "chimeDouble", .4, 2., 3.),
"steerUnavailableNoEntry": Alert( Alert(
"steerUnavailableNoEntry",
"openpilot Unavailable", "openpilot Unavailable",
"LKAS Fault: Restart the Car", "LKAS Fault: Restart the Car",
AlertStatus.normal, AlertSize.mid, AlertStatus.normal, AlertSize.mid,
Priority.LOW, None, "chimeDouble", .4, 2., 3.), Priority.LOW, None, "chimeDouble", .4, 2., 3.),
"brakeUnavailableNoEntry": Alert( Alert(
"brakeUnavailableNoEntry",
"openpilot Unavailable", "openpilot Unavailable",
"Cruise Fault: Restart the Car", "Cruise Fault: Restart the Car",
AlertStatus.normal, AlertSize.mid, AlertStatus.normal, AlertSize.mid,
Priority.LOW, None, "chimeDouble", .4, 2., 3.), Priority.LOW, None, "chimeDouble", .4, 2., 3.),
"gasUnavailableNoEntry": Alert( Alert(
"gasUnavailableNoEntry",
"openpilot Unavailable", "openpilot Unavailable",
"Gas Error: Restart the Car", "Gas Error: Restart the Car",
AlertStatus.normal, AlertSize.mid, AlertStatus.normal, AlertSize.mid,
Priority.LOW, None, "chimeDouble", .4, 2., 3.), Priority.LOW, None, "chimeDouble", .4, 2., 3.),
"reverseGearNoEntry": Alert( Alert(
"reverseGearNoEntry",
"openpilot Unavailable", "openpilot Unavailable",
"Reverse Gear", "Reverse Gear",
AlertStatus.normal, AlertSize.mid, AlertStatus.normal, AlertSize.mid,
Priority.LOW, None, "chimeDouble", .4, 2., 3.), Priority.LOW, None, "chimeDouble", .4, 2., 3.),
"cruiseDisabledNoEntry": Alert( Alert(
"cruiseDisabledNoEntry",
"openpilot Unavailable", "openpilot Unavailable",
"Cruise is Off", "Cruise is Off",
AlertStatus.normal, AlertSize.mid, AlertStatus.normal, AlertSize.mid,
Priority.LOW, None, "chimeDouble", .4, 2., 3.), Priority.LOW, None, "chimeDouble", .4, 2., 3.),
"noTargetNoEntry": Alert( Alert(
"noTargetNoEntry",
"openpilot Unavailable", "openpilot Unavailable",
"No Close Lead Car", "No Close Lead Car",
AlertStatus.normal, AlertSize.mid, AlertStatus.normal, AlertSize.mid,
Priority.LOW, None, "chimeDouble", .4, 2., 3.), Priority.LOW, None, "chimeDouble", .4, 2., 3.),
"plannerErrorNoEntry": Alert( Alert(
"plannerErrorNoEntry",
"openpilot Unavailable", "openpilot Unavailable",
"Planner Solution Error", "Planner Solution Error",
AlertStatus.normal, AlertSize.mid, AlertStatus.normal, AlertSize.mid,
Priority.LOW, None, "chimeDouble", .4, 2., 3.), Priority.LOW, None, "chimeDouble", .4, 2., 3.),
# permanent alerts # permanent alerts
"steerUnavailablePermanent": Alert( Alert(
"steerUnavailablePermanent",
"LKAS Fault: Restart the car to engage", "LKAS Fault: Restart the car to engage",
"", "",
AlertStatus.normal, AlertSize.small, AlertStatus.normal, AlertSize.small,
Priority.LOW_LOWEST, None, None, 0., 0., .2), Priority.LOW_LOWEST, None, None, 0., 0., .2),
"brakeUnavailablePermanent": Alert( Alert(
"brakeUnavailablePermanent",
"Cruise Fault: Restart the car to engage", "Cruise Fault: Restart the car to engage",
"", "",
AlertStatus.normal, AlertSize.small, AlertStatus.normal, AlertSize.small,
Priority.LOW_LOWEST, None, None, 0., 0., .2), Priority.LOW_LOWEST, None, None, 0., 0., .2),
"lowSpeedLockoutPermanent": Alert( Alert(
"lowSpeedLockoutPermanent",
"Cruise Fault: Restart the car to engage", "Cruise Fault: Restart the car to engage",
"", "",
AlertStatus.normal, AlertSize.small, AlertStatus.normal, AlertSize.small,
Priority.LOW_LOWEST, None, None, 0., 0., .2), Priority.LOW_LOWEST, None, None, 0., 0., .2),
"calibrationIncompletePermanent": Alert( Alert(
"calibrationIncompletePermanent",
"Calibration in Progress: ", "Calibration in Progress: ",
"Drive Above ", "Drive Above ",
AlertStatus.normal, AlertSize.mid, AlertStatus.normal, AlertSize.mid,
Priority.LOWEST, None, None, 0., 0., .2), Priority.LOWEST, None, None, 0., 0., .2),
]
} }
def __init__(self): def __init__(self):
@ -565,6 +646,7 @@ class AlertManager(object):
ca = self.activealerts[0] if self.alertPresent() else None ca = self.activealerts[0] if self.alertPresent() else None
# start with assuming no alerts # start with assuming no alerts
self.alert_type = ""
self.alert_text_1 = "" self.alert_text_1 = ""
self.alert_text_2 = "" self.alert_text_2 = ""
self.alert_status = AlertStatus.normal self.alert_status = AlertStatus.normal
@ -581,6 +663,7 @@ class AlertManager(object):
self.visual_alert = ca.visual_alert self.visual_alert = ca.visual_alert
if ca.start_time + ca.duration_text > cur_time: if ca.start_time + ca.duration_text > cur_time:
self.alert_type = ca.alert_type
self.alert_text_1 = ca.alert_text_1 self.alert_text_1 = ca.alert_text_1
self.alert_text_2 = ca.alert_text_2 self.alert_text_2 = ca.alert_text_2
self.alert_status = ca.alert_status self.alert_status = ca.alert_status

@ -4,6 +4,7 @@ CXX = clang++
PHONELIBS = ../../../../phonelibs PHONELIBS = ../../../../phonelibs
UNAME_S := $(shell uname -s)
UNAME_M := $(shell uname -m) UNAME_M := $(shell uname -m)
CFLAGS = -O3 -fPIC -I. CFLAGS = -O3 -fPIC -I.
@ -13,10 +14,12 @@ QPOASES_FLAGS = -I$(PHONELIBS)/qpoases -I$(PHONELIBS)/qpoases/INCLUDE -I$(PHONEL
ACADO_FLAGS = -I$(PHONELIBS)/acado/include -I$(PHONELIBS)/acado/include/acado ACADO_FLAGS = -I$(PHONELIBS)/acado/include -I$(PHONELIBS)/acado/include/acado
ifeq ($(UNAME_M),aarch64) ifeq ($(UNAME_S),Darwin)
ACADO_LIBS := -L $(PHONELIBS)/acado/aarch64/lib -l:libacado_toolkit.a -l:libacado_casadi.a -l:libacado_csparse.a ACADO_LIBS := -lacado_toolkit_s
else ifeq ($(UNAME_M),aarch64)
ACADO_LIBS := -L $(PHONELIBS)/acado/aarch64/lib -l:libacado_toolkit.a -l:libacado_casadi.a -l:libacado_csparse.a
else else
ACADO_LIBS := -L $(PHONELIBS)/acado/x64/lib -l:libacado_toolkit.a -l:libacado_casadi.a -l:libacado_csparse.a ACADO_LIBS := -L $(PHONELIBS)/acado/x64/lib -l:libacado_toolkit.a -l:libacado_casadi.a -l:libacado_csparse.a
endif endif
OBJS = \ OBJS = \
@ -67,7 +70,7 @@ lib_qp/%.o: $(PHONELIBS)/qpoases/SRC/%.cpp
-c -o '$@' '$<' -c -o '$@' '$<'
generator: generator.cpp generator: generator.cpp
$(CXX) -Wall -std=c++11 \ $(CXX) -v -Wall -std=c++11 \
generator.cpp \ generator.cpp \
-o generator \ -o generator \
$(ACADO_FLAGS) \ $(ACADO_FLAGS) \

@ -3,6 +3,7 @@ CXX = clang++
PHONELIBS = ../../../../phonelibs PHONELIBS = ../../../../phonelibs
UNAME_S := $(shell uname -s)
UNAME_M := $(shell uname -m) UNAME_M := $(shell uname -m)
CFLAGS = -O3 -fPIC -I. CFLAGS = -O3 -fPIC -I.
@ -12,10 +13,12 @@ QPOASES_FLAGS = -I$(PHONELIBS)/qpoases -I$(PHONELIBS)/qpoases/INCLUDE -I$(PHONEL
ACADO_FLAGS = -I$(PHONELIBS)/acado/include -I$(PHONELIBS)/acado/include/acado ACADO_FLAGS = -I$(PHONELIBS)/acado/include -I$(PHONELIBS)/acado/include/acado
ifeq ($(UNAME_M),aarch64) ifeq ($(UNAME_S),Darwin)
ACADO_LIBS := -L $(PHONELIBS)/acado/aarch64/lib -l:libacado_toolkit.a -l:libacado_casadi.a -l:libacado_csparse.a ACADO_LIBS := -lacado_toolkit_s
else ifeq ($(UNAME_M),aarch64)
ACADO_LIBS := -L $(PHONELIBS)/acado/aarch64/lib -l:libacado_toolkit.a -l:libacado_casadi.a -l:libacado_csparse.a
else else
ACADO_LIBS := -L $(PHONELIBS)/acado/x64/lib -l:libacado_toolkit.a -l:libacado_casadi.a -l:libacado_csparse.a ACADO_LIBS := -L $(PHONELIBS)/acado/x64/lib -l:libacado_toolkit.a -l:libacado_casadi.a -l:libacado_csparse.a
endif endif
OBJS = \ OBJS = \

@ -44,9 +44,6 @@ _A_TOTAL_MAX_BP = [0., 20., 40.]
_FCW_A_ACT_V = [-3., -2.] _FCW_A_ACT_V = [-3., -2.]
_FCW_A_ACT_BP = [0., 30.] _FCW_A_ACT_BP = [0., 30.]
# max acceleration allowed in acc, which happens in restart
A_ACC_MAX = max(_A_CRUISE_MAX_V_FOLLOWING)
def calc_cruise_accel_limits(v_ego, following): def calc_cruise_accel_limits(v_ego, following):
a_cruise_min = interp(v_ego, _A_CRUISE_MIN_BP, _A_CRUISE_MIN_V) a_cruise_min = interp(v_ego, _A_CRUISE_MIN_BP, _A_CRUISE_MIN_V)

@ -149,7 +149,9 @@ def gen_solution(msg):
'speedAccuracy': msg_data['sAcc']*1e-03, # speed accuracy in m/s 'speedAccuracy': msg_data['sAcc']*1e-03, # speed accuracy in m/s
'verticalAccuracy': msg_data['vAcc']*1e-03, # vertical accuracy in meters 'verticalAccuracy': msg_data['vAcc']*1e-03, # vertical accuracy in meters
'bearingAccuracy': msg_data['headAcc']*1e-05, # heading accuracy in degrees 'bearingAccuracy': msg_data['headAcc']*1e-05, # heading accuracy in degrees
'source': 'ublox'} 'source': 'ublox',
'flags': msg_data['flags'],
}
return log.Event.new_message(gpsLocationExternal=gps_fix) return log.Event.new_message(gpsLocationExternal=gps_fix)
def gen_nav_data(msg, nav_frame_buffer): def gen_nav_data(msg, nav_frame_buffer):

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:6cc1e472ddfebc6d075815f5942012affe312e4434e3fed9bd9b9382a7ad9a0f oid sha256:a983a2cd87781d7f535f822ae703b30d88cdd23eec97ff1ee80725c7ef80041d
size 1630952 size 1630952

@ -7,7 +7,10 @@ from common.api import api_get
from common.params import Params from common.params import Params
def get_imei(): def get_imei():
return subprocess.check_output(["getprop", "oem.device.imeicache"]).strip() ret = subprocess.check_output(["getprop", "oem.device.imeicache"]).strip()
if ret == "":
ret = "000000000000000"
return ret
def get_serial(): def get_serial():
return subprocess.check_output(["getprop", "ro.serialno"]).strip() return subprocess.check_output(["getprop", "ro.serialno"]).strip()

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:d8eee33e5aaf89cc8b843f3ba06bfd9a34c1be277ba8009193303a9d56068793 oid sha256:4cedc9397a255d0c5fd4a034fabd4748ab6e0b5f9fc910ccdc3f79b878860e29
size 1171544 size 1171544

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:f2fc1f1782a87fd4f16e31125bfa11770503fc4a32a410de5f8c4e0122a5ec44 oid sha256:ec93ea7d63f2f3222828b142e7752eb5a6e1b880a822ee3ba62c2ca43d1beac0
size 1159016 size 1159016

@ -70,6 +70,7 @@ uiLayoutState: [8060, true]
frontEncodeIdx: [8061, true] frontEncodeIdx: [8061, true]
orbFeaturesSummary: [8062, true] orbFeaturesSummary: [8062, true]
driverMonitoring: [8063, true] driverMonitoring: [8063, true]
liveParameters: [8064, true]
testModel: [8040, false] testModel: [8040, false]
testLiveLocation: [8045, false] testLiveLocation: [8045, false]

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:c442820c3625435792fddea4864f8eb6ef44f95b9b286bbc787bd15b87c5f29f oid sha256:e6ebe785ea78055fa3d47ca9c06a5148cab5d8280bfc1fe446043c6a7c123582
size 9122536 size 9041704

Loading…
Cancel
Save