Skip to content

Commit

Permalink
Merge pull request #9 from arne182/release2
Browse files Browse the repository at this point in the history
Merge release2
  • Loading branch information
sshane authored Mar 14, 2019
2 parents 4940762 + ee7127e commit 2132fcd
Show file tree
Hide file tree
Showing 15 changed files with 177 additions and 108 deletions.
10 changes: 8 additions & 2 deletions selfdrive/car/gm/carstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from selfdrive.car.gm.values import DBC, CAR, parse_gear_shifter, \
CruiseButtons, is_eps_status_ok, \
STEER_THRESHOLD, SUPERCRUISE_CARS
from selfdrive.kegman_conf import kegman_conf

def get_powertrain_can_parser(CP, canbus):
# this function generates lists for signal, messages and initial values
Expand Down Expand Up @@ -58,10 +59,11 @@ def get_powertrain_can_parser(CP, canbus):

class CarState(object):
def __init__(self, CP, canbus):
self.kegman = kegman_conf()
self.CP = CP
# initialize can parser
self.alcaLabels = ["MadMax","Normal","Wifey"]
self.alcaMode = 2
self.alcaMode = int(self.kegman.conf['lastALCAMode']) # default to last ALCAmode on startup
self.car_fingerprint = CP.carFingerprint
self.cruise_buttons = CruiseButtons.UNPRESS
self.prev_distance_button = 0
Expand All @@ -70,7 +72,7 @@ def __init__(self, CP, canbus):
self.prev_left_blinker_on = False
self.right_blinker_on = False
self.prev_right_blinker_on = False
self.follow_level = 2
self.follow_level = int(self.kegman.conf['lastTrMode'])
self.prev_lka_button = 0
self.lka_button = 0
self.lkMode = True
Expand Down Expand Up @@ -149,8 +151,12 @@ def update_ui_buttons(self,id,btn_status):
if (id == 1) and (btn_status == 0) and self.cstm_btns.btns[id].btn_name=="alca":
if self.cstm_btns.btns[id].btn_label2 == self.alcaLabels[self.alcaMode]:
self.alcaMode = (self.alcaMode + 1 ) % 3
self.kegman.conf['lastALCAMode'] = str(self.alcaMode) # write last distance bar setting to file
self.kegman.write_config(self.kegman.conf)
else:
self.alcaMode = 0
self.kegman.conf['lastALCAMode'] = str(self.alcaMode) # write last distance bar setting to file
self.kegman.write_config(self.kegman.conf)
self.cstm_btns.btns[id].btn_label2 = self.alcaLabels[self.alcaMode]
self.cstm_btns.hasChanges = True
else:
Expand Down
7 changes: 6 additions & 1 deletion selfdrive/car/gm/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
from selfdrive.controls.lib.vehicle_model import VehicleModel
from selfdrive.car.gm.values import DBC, CAR, STOCK_CONTROL_MSGS, AUDIO_HUD, SUPERCRUISE_CARS
from selfdrive.car.gm.carstate import CarState, CruiseButtons, get_powertrain_can_parser
from selfdrive.kegman_conf import kegman_conf

kegman = kegman_conf()

try:
from selfdrive.car.gm.carcontroller import CarController
Expand Down Expand Up @@ -229,7 +232,7 @@ def update(self, c):
ret.brakePressed = self.CS.brake_pressed

# steering wheel
ret.steeringAngle = self.CS.angle_steers
ret.steeringAngle = self.CS.angle_steers + float(kegman.conf['angle_steers_offset']) # deg offset

# torque and user override. Driver awareness
# timer resets when the user uses the steering wheel.
Expand Down Expand Up @@ -303,6 +306,8 @@ def update(self, c):
self.CS.follow_level -= 1
if self.CS.follow_level < 1:
self.CS.follow_level = 3
self.kegman.conf['lastTrMode'] = str(self.CS.follow_level) # write last distance bar setting to file
self.kegman.write_config(self.kegman.conf)
ret.gasbuttonstatus = self.CS.cstm_btns.get_button_status("gas")
events = []
if not self.CS.can_valid:
Expand Down
2 changes: 1 addition & 1 deletion selfdrive/car/gm/values.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def parse_gear_shifter(can_gear):
},
# Volt Premier w/ ACC 2018
{
170: 8, 171: 8, 189: 7, 190: 6, 193: 8, 197: 8, 199: 4, 201: 8, 209: 7, 211: 2, 241: 6, 288: 5, 298: 8, 304: 1, 308: 4, 309: 8, 311: 8, 313: 8, 320: 3, 328: 1, 352: 5, 381: 6, 384: 4, 386: 8, 388: 8, 389: 2, 390: 7, 417: 7, 419: 1, 426: 7, 451: 8, 452: 8, 453: 6, 454: 8, 456: 8, 479: 3, 481: 7, 485: 8, 489: 8, 493: 8, 495: 4, 497: 8, 499: 3, 500: 6, 501: 8, 508: 8, 528: 4, 532: 6, 546: 7, 550: 8, 554: 3, 558: 8, 560: 8, 562: 8, 563: 5, 564: 5, 565: 5, 566: 5, 567: 3, 568: 1, 573: 1, 577: 8, 608: 8, 609: 6, 610: 6, 611: 6, 612: 8, 613: 8, 647: 3, 707: 8, 711: 6, 715: 8, 717: 5, 761: 7, 810: 8, 840: 5, 842: 5, 844: 8, 866: 4, 869: 4, 880: 6, 961: 8, 967: 4, 969: 8, 977: 8, 979: 7, 988: 6, 989: 8, 995: 7, 1001: 8, 1005: 6, 1009: 8, 1017: 8, 1019: 2, 1020: 8, 1033: 7, 1034: 7, 1105: 6, 1187: 4, 1217: 8, 1221: 5, 1223: 3, 1225: 7, 1227: 4, 1233: 8, 1249: 8, 1257: 6, 1265: 8, 1267: 1, 1273: 3, 1275: 3, 1280: 4, 1296: 4, 1300: 8, 1322: 6, 1323: 4, 1328: 4, 1417: 8, 1601: 8, 1905: 7, 1906: 7, 1907: 7, 1910: 7, 1912: 7, 1922: 7, 1927: 7, 1930: 7, 2016: 8, 2020: 8, 2024: 8, 2028: 8
170: 8, 171: 8, 189: 7, 190: 6, 193: 8, 197: 8, 199: 4, 201: 8, 209: 7, 211: 2, 241: 6, 288: 5, 298: 8, 304: 1, 308: 4, 309: 8, 311: 8, 313: 8, 320: 3, 328: 1, 352: 5, 381: 6, 384: 4, 386: 8, 388: 8, 389: 2, 390: 7, 417: 7, 419: 1, 426: 7, 451: 8, 452: 8, 453: 6, 454: 8, 456: 8, 479: 3, 481: 7, 485: 8, 489: 8, 493: 8, 495: 4, 497: 8, 499: 3, 500: 6, 501: 8, 508: 8, 528: 4, 532: 6, 546: 7, 550: 8, 554: 3, 558: 8, 560: 8, 562: 8, 563: 5, 564: 5, 565: 5, 566: 5, 567: 3, 568: 1, 573: 1, 577: 8, 578: 8, 608: 8, 609: 6, 610: 6, 611: 6, 612: 8, 613: 8, 647: 3, 707: 8, 711: 6, 715: 8, 717: 5, 761: 7, 810: 8, 840: 5, 842: 5, 844: 8, 866: 4, 869: 4, 880: 6, 961: 8, 967: 4, 969: 8, 977: 8, 979: 7, 988: 6, 989: 8, 995: 7, 1001: 8, 1005: 6, 1009: 8, 1017: 8, 1019: 2, 1020: 8, 1033: 7, 1034: 7, 1105: 6, 1187: 4, 1217: 8, 1221: 5, 1223: 3, 1225: 7, 1227: 4, 1233: 8, 1249: 8, 1257: 6, 1265: 8, 1267: 1, 1273: 3, 1275: 3, 1280: 4, 1296: 4, 1300: 8, 1322: 6, 1323: 4, 1328: 4, 1417: 8, 1601: 8, 1905: 7, 1906: 7, 1907: 7, 1910: 7, 1912: 7, 1922: 7, 1927: 7, 1930: 7, 2016: 8, 2020: 8, 2024: 8, 2028: 8
}],
CAR.BUICK_REGAL : [
# Regal TourX Essence w/ ACC 2018
Expand Down
16 changes: 14 additions & 2 deletions selfdrive/car/honda/carstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from selfdrive.can.parser import CANParser, CANDefine
from selfdrive.config import Conversions as CV
from selfdrive.car.honda.values import CAR, DBC, STEER_THRESHOLD, SPEED_FACTOR, HONDA_BOSCH
from selfdrive.kegman_conf import kegman_conf
from selfdrive.car.modules.UIBT_module import UIButtons,UIButton
from selfdrive.car.modules.UIEV_module import UIEvents
import numpy as np
Expand Down Expand Up @@ -147,14 +148,15 @@ def get_cam_can_parser(CP):

class CarState(object):
def __init__(self, CP):
self.kegman = kegman_conf()
self.Angle = [0, 5, 10, 15,20,25,30,35,60,100,180,270,500]
self.Angle_Speed = [255,160,100,80,70,60,55,50,40,30,20,10,5]
self.blind_spot_on = bool(0)
#labels for ALCA modes
self.alcaLabels = ["MadMax","Normal","Wifey"]
self.trLabels = ["0.9","dyn","2.7"]
self.alcaMode = 0
self.trMode = 1
self.alcaMode = int(self.kegman.conf['lastALCAMode']) # default to last ALCA Mode on startup
self.trMode = int(self.kegman.conf['lastTrMode']) # default to last distance interval on startup
#if (CP.carFingerprint == CAR.MODELS):
# ALCA PARAMS
# max REAL delta angle for correction vs actuator
Expand Down Expand Up @@ -251,16 +253,24 @@ def update_ui_buttons(self,id,btn_status):
if (id == 0) and (btn_status == 0) and self.cstm_btns.btns[id].btn_name=="alca":
if self.cstm_btns.btns[id].btn_label2 == self.alcaLabels[self.alcaMode]:
self.alcaMode = (self.alcaMode + 1 ) % 3
self.kegman.conf['lastALCAMode'] = str(self.alcaMode) # write last distance bar setting to file
self.kegman.write_config(self.kegman.conf)
else:
self.alcaMode = 0
self.kegman.conf['lastALCAMode'] = str(self.alcaMode) # write last distance bar setting to file
self.kegman.write_config(self.kegman.conf)
self.cstm_btns.btns[id].btn_label2 = self.alcaLabels[self.alcaMode]
self.cstm_btns.hasChanges = True

elif (id == 4) and (btn_status == 0) and self.cstm_btns.btns[id].btn_name=="tr":
if self.cstm_btns.btns[id].btn_label2 == self.trLabels[self.trMode]:
self.trMode = (self.trMode + 1 ) % 3
self.kegman.conf['lastTrMode'] = str(self.trMode) # write last distance bar setting to file
self.kegman.write_config(self.kegman.conf)
else:
self.trMode = 0
self.kegman.conf['lastTrMode'] = str(self.trMode) # write last distance bar setting to file
self.kegman.write_config(self.kegman.conf)
self.cstm_btns.btns[id].btn_label2 = self.trLabels[self.trMode]
self.cstm_btns.hasChanges = True

Expand Down Expand Up @@ -403,6 +413,8 @@ def update(self, cp, cp_cam):
if self.cruise_setting == 3:
if cp.vl["SCM_BUTTONS"]["CRUISE_SETTING"] == 0:
self.trMode = (self.trMode + 1 ) % 3
self.kegman.conf['lastTrMode'] = str(self.trMode) # write last distance bar setting to file
self.kegman.write_config(self.kegman.conf)
self.cstm_btns.btns[4].btn_label2 = self.trLabels[self.trMode]
self.prev_cruise_setting = self.cruise_setting
self.cruise_setting = cp.vl["SCM_BUTTONS"]['CRUISE_SETTING']
Expand Down
5 changes: 4 additions & 1 deletion selfdrive/car/honda/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
from selfdrive.car.honda.carstate import CarState, get_can_parser, get_cam_can_parser
from selfdrive.car.honda.values import CruiseButtons, CAR, HONDA_BOSCH, AUDIO_HUD, VISUAL_HUD
from selfdrive.controls.lib.planner import _A_CRUISE_MAX_V_FOLLOWING
from selfdrive.kegman_conf import kegman_conf

kegman = kegman_conf()

try:
from selfdrive.car.honda.carcontroller import CarController
Expand Down Expand Up @@ -424,7 +427,7 @@ def update(self, c):
c.actuators.brake > brakelights_threshold)

# steering wheel
ret.steeringAngle = self.CS.angle_steers
ret.steeringAngle = self.CS.angle_steers + float(kegman.conf['angle_steers_offset']) # deg offset
ret.steeringRate = self.CS.angle_steers_rate

# gear shifter lever
Expand Down
8 changes: 7 additions & 1 deletion selfdrive/car/toyota/carstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from selfdrive.config import Conversions as CV
from selfdrive.car.toyota.values import CAR, DBC, STEER_THRESHOLD
from common.kalman.simple_kalman import KF1D
from selfdrive.kegman_conf import kegman_conf
from selfdrive.car.modules.UIBT_module import UIButtons,UIButton
from selfdrive.car.modules.UIEV_module import UIEvents
import os
Expand Down Expand Up @@ -133,6 +134,7 @@ def get_cam_can_parser(CP):

class CarState(object):
def __init__(self, CP):
self.kegman = kegman_conf()
self.trfix = False
self.Angles = np.zeros(250)
self.Angles_later = np.zeros(250)
Expand All @@ -141,7 +143,7 @@ def __init__(self, CP):
self.Angle_Speed = [255,160,100,80,70,60,55,50,40,33,27,17,12]
#labels for ALCA modes
self.alcaLabels = ["MadMax","Normal","Wifey"]
self.alcaMode = 1
self.alcaMode = int(self.kegman.conf['lastALCAMode']) # default to last ALCAmode on startup
#if (CP.carFingerprint == CAR.MODELS):
# ALCA PARAMS
# max REAL delta angle for correction vs actuator
Expand Down Expand Up @@ -244,8 +246,12 @@ def update_ui_buttons(self,id,btn_status):
if (id == 1) and (btn_status == 0) and self.cstm_btns.btns[id].btn_name=="alca":
if self.cstm_btns.btns[id].btn_label2 == self.alcaLabels[self.alcaMode]:
self.alcaMode = (self.alcaMode + 1 ) % 3
self.kegman.conf['lastALCAMode'] = str(self.alcaMode) # write last ALCAMode setting to file
self.kegman.write_config(self.kegman.conf)
else:
self.alcaMode = 0
self.kegman.conf['lastALCAMode'] = str(self.alcaMode) # write last ALCAMode setting to file
self.kegman.write_config(self.kegman.conf)
self.cstm_btns.btns[id].btn_label2 = self.alcaLabels[self.alcaMode]
self.cstm_btns.hasChanges = True
else:
Expand Down
5 changes: 4 additions & 1 deletion selfdrive/car/toyota/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
from selfdrive.car.toyota.carstate import CarState, get_can_parser, get_cam_can_parser
from selfdrive.car.toyota.values import ECU, check_ecu_msgs, CAR
from selfdrive.swaglog import cloudlog
from selfdrive.kegman_conf import kegman_conf

kegman = kegman_conf()

try:
from selfdrive.car.toyota.carcontroller import CarController
Expand Down Expand Up @@ -328,7 +331,7 @@ def update(self, c):
ret.brakeLights = self.CS.brake_lights

# steering wheel
ret.steeringAngle = self.CS.angle_steers
ret.steeringAngle = self.CS.angle_steers + float(kegman.conf['angle_steers_offset']) # deg offset
ret.steeringRate = self.CS.angle_steers_rate

ret.steeringTorque = self.CS.steer_torque_driver
Expand Down
6 changes: 5 additions & 1 deletion selfdrive/car/toyota/values.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def check_ecu_msgs(fingerprint, ecu):
36: 8, 37: 8, 170: 8, 180: 8, 186: 4, 426: 6, 452: 8, 464: 8, 466: 8, 467: 8, 512: 6, 513: 6, 547: 8, 548: 8, 552: 4, 562: 4, 608: 8, 610: 5, 643: 7, 705: 8, 725: 2, 740: 5, 800: 8, 835: 8, 836: 8, 849: 4, 869: 7, 870: 7, 871: 2, 896: 8, 897: 8, 900: 6, 902: 6, 905: 8, 911: 8, 916: 3, 918: 7, 921: 8, 933: 8, 944: 8, 945: 8, 951: 8, 955: 4, 956: 8, 979: 2, 998: 5, 999: 7, 1000: 8, 1001: 8, 1005: 2, 1008: 2, 1014: 8, 1017: 8, 1041: 8, 1042: 8, 1043: 8, 1044: 8, 1056: 8, 1059: 1, 1114: 8, 1161: 8, 1162: 8, 1163: 8, 1176: 8, 1177: 8, 1178: 8, 1179: 8, 1180: 8, 1181: 8, 1190: 8, 1191: 8, 1192: 8, 1196: 8, 1227: 8, 1228: 8, 1235: 8, 1237: 8, 1263: 8, 1264: 8, 1279: 8, 1408: 8, 1409: 8, 1410: 8, 1552: 8, 1553: 8, 1554: 8, 1555: 8, 1556: 8, 1557: 8, 1561: 8, 1562: 8, 1568: 8, 1569: 8, 1570: 8, 1571: 8, 1572: 8, 1584: 8, 1589: 8, 1592: 8, 1593: 8, 1595: 8, 1596: 8, 1597: 8, 1600: 8, 1656: 8, 1664: 8, 1728: 8, 1745: 8, 1779: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8, 2015: 8, 2024: 8
}],
CAR.RAV4H: [{
36: 8, 37: 8, 170: 8, 180: 8, 186: 4, 296: 8, 426: 6, 452: 8, 464: 8, 466: 8, 467: 8, 547: 8, 548: 8, 550: 8, 552: 4, 560: 7, 562: 4, 581: 5, 608: 8, 610: 5, 643: 7, 705: 8, 713: 8, 725: 2, 740: 5, 800: 8, 835: 8, 836: 8, 849: 4, 869: 7, 870: 7, 871: 2, 896: 8, 897: 8, 900: 6, 902: 6, 905: 8, 911: 8, 916: 3, 918: 7, 921: 8, 933: 8, 944: 8, 945: 8, 950: 8, 951: 8, 953: 3, 955: 8, 956: 8, 979: 2, 998: 5, 999: 7, 1000: 8, 1001: 8, 1005: 2, 1008: 2, 1014: 8, 1017: 8, 1041: 8, 1042: 8, 1043: 8, 1044: 8, 1056: 8, 1059: 1, 1114: 8, 1161: 8, 1162: 8, 1163: 8, 1176: 8, 1177: 8, 1178: 8, 1179: 8, 1180: 8, 1181: 8, 1184: 8, 1185: 8, 1186: 8, 1190: 8, 1191: 8, 1192: 8, 1196: 8, 1197: 8, 1198: 8, 1199: 8, 1212: 8, 1227: 8, 1228: 8, 1232: 8, 1235: 8, 1237: 8, 1263: 8, 1264: 8, 1279: 8, 1408: 8, 1409: 8, 1410: 8, 1552: 8, 1553: 8, 1554: 8, 1555: 8, 1556: 8, 1557: 8, 1561: 8, 1562: 8, 1568: 8, 1569: 8, 1570: 8, 1571: 8, 1572: 8, 1584: 8, 1589: 8, 1592: 8, 1593: 8, 1595: 8, 1596: 8, 1597: 8, 1600: 8, 1656: 8, 1664: 8, 1728: 8, 1745: 8, 1779: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8
36: 8, 37: 8, 170: 8, 180: 8, 186: 4, 218: 8, 296: 8, 426: 6, 452: 8, 464: 8, 466: 8, 467: 8, 547: 8, 548: 8, 550: 8, 552: 4, 560: 7, 562: 4, 581: 5, 608: 8, 610: 5, 643: 7, 705: 8, 713: 8, 725: 2, 740: 5, 742: 8, 800: 8, 835: 8, 836: 8, 849: 4, 869: 7, 870: 7, 871: 2, 896: 8, 897: 8, 900: 6, 902: 6, 905: 8, 911: 8, 916: 3, 918: 7, 921: 8, 933: 8, 944: 8, 945: 8, 950: 8, 951: 8, 953: 3, 955: 8, 956: 8, 979: 2, 998: 5, 999: 7, 1000: 8, 1001: 8, 1005: 2, 1008: 2, 1014: 8, 1017: 8, 1041: 8, 1042: 8, 1043: 8, 1044: 8, 1056: 8, 1059: 1, 1114: 8, 1161: 8, 1162: 8, 1163: 8, 1176: 8, 1177: 8, 1178: 8, 1179: 8, 1180: 8, 1181: 8, 1184: 8, 1185: 8, 1186: 8, 1190: 8, 1191: 8, 1192: 8, 1196: 8, 1197: 8, 1198: 8, 1199: 8, 1212: 8, 1227: 8, 1228: 8, 1232: 8, 1235: 8, 1237: 8, 1263: 8, 1264: 8, 1279: 8, 1408: 8, 1409: 8, 1410: 8, 1552: 8, 1553: 8, 1554: 8, 1555: 8, 1556: 8, 1557: 8, 1561: 8, 1562: 8, 1568: 8, 1569: 8, 1570: 8, 1571: 8, 1572: 8, 1584: 8, 1589: 8, 1592: 8, 1593: 8, 1595: 8, 1596: 8, 1597: 8, 1600: 8, 1656: 8, 1664: 8, 1728: 8, 1745: 8, 1779: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8, 2018: 8, 2026: 8
},
# Chinese RAV4
{
Expand Down Expand Up @@ -137,6 +137,10 @@ def check_ecu_msgs(fingerprint, ecu):
#LE
{
36: 8, 37: 8, 166: 8, 170: 8, 180: 8, 295: 8, 296: 8, 426: 6, 452: 8, 466: 8, 467: 8, 550: 8, 552: 4, 560: 7, 562: 6, 581: 5, 608: 8, 610: 8, 643: 7, 713: 8, 728: 8, 740: 5, 761: 8, 764: 8, 800: 8, 810: 2, 812: 8, 824: 8, 829: 2, 830: 7, 835: 8, 836: 8, 869: 7, 870: 7, 871: 2, 898: 8, 900: 6, 902: 6, 905: 8, 921: 8, 933: 8, 934: 8, 935: 8, 944: 8, 945: 8, 950: 8, 951: 8, 953: 8, 955: 8, 956: 8, 971: 7, 975: 5, 993: 8, 998: 5, 999: 7, 1000: 8, 1001: 8, 1002: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1044: 8, 1056: 8, 1057: 8, 1059: 1, 1071: 8, 1076: 8, 1077: 8, 1084: 8, 1085: 8, 1086: 8, 1114: 8, 1132: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1235: 8, 1279: 8, 1541: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1568: 8, 1570: 8, 1571: 8, 1572:8, 1595: 8, 1745: 8, 1779: 8, 1786: 8, 1787: 8, 1788: 8, 1789: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8
},
#LE with Blind Spot Monitor
{
36: 8, 37: 8, 166: 8, 170: 8, 180: 8, 295: 8, 296: 8, 426: 6, 452: 8, 466: 8, 467: 8, 550: 8, 552: 4, 560: 7, 562: 6, 581: 5, 608: 8, 610: 8, 643: 7, 713: 8, 728: 8, 740: 5, 761: 8, 764: 8, 800: 8, 810: 2, 812: 8, 818: 8, 824: 8, 829: 2, 830: 7, 835: 8, 836: 8, 869: 7, 870: 7, 871: 2, 889: 8, 898: 8, 900: 6, 902: 6, 905: 8, 921: 8, 933: 8, 934: 8, 935: 8, 944: 8, 945: 8, 950: 8, 951: 8, 953: 8, 955: 8, 956: 8, 971: 7, 975: 5, 983: 8, 984: 8, 993: 8, 998: 5, 999: 7, 1000: 8, 1001: 8, 1002: 8, 1011: 8, 1014: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1044: 8, 1056: 8, 1057: 8, 1059: 1, 1071: 8, 1076: 8, 1077: 8, 1084: 8, 1085: 8, 1086: 8, 1114: 8, 1132: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1235: 8, 1237: 8, 1264: 8, 1279: 8, 1541: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1568: 8, 1570: 8, 1571: 8, 1572: 8, 1595: 8, 1745: 8, 1779: 8, 1786: 8, 1787: 8, 1788: 8, 1789: 8, 1808: 8, 1810: 8, 1816: 8, 1818: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8
}],
CAR.HIGHLANDER: [{
36: 8, 37: 8, 114: 5, 119: 6, 120: 4, 170: 8, 180: 8, 186: 4, 238: 4, 355: 5, 426: 6, 452: 8, 464: 8, 466: 8, 467: 8, 544: 4, 545: 5, 550: 8, 552: 4, 608: 8, 610: 5, 643: 7, 705: 8, 725: 2, 740: 5, 800: 8, 835: 8, 836: 8, 849: 4, 869: 7, 870: 7, 871: 2, 896: 8, 900: 6, 902: 6, 905: 8, 911: 8, 916: 3, 921: 8, 922: 8, 933: 8, 944: 8, 945: 8, 951: 8, 955: 8, 956: 8, 979: 2, 998: 5, 999: 7, 1000: 8, 1001: 8, 1008: 2, 1014: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1043: 8, 1044: 8, 1056: 8, 1059: 1, 1114: 8, 1161: 8, 1162: 8, 1163: 8, 1176: 8, 1177: 8, 1178: 8, 1179: 8, 1180: 8, 1181: 8, 1182: 8, 1183: 8, 1189: 8, 1190: 8, 1191: 8, 1192: 8, 1196: 8, 1197: 8, 1198: 8, 1199: 8, 1206: 8, 1207: 8, 1212: 8, 1227: 8, 1235: 8, 1237: 8, 1279: 8, 1408: 8, 1409: 8, 1410: 8, 1552: 8, 1553: 8, 1554: 8, 1556: 8, 1557: 8, 1561: 8, 1562: 8, 1568: 8, 1569: 8, 1570: 8, 1571: 8, 1572: 8, 1584: 8, 1589: 8, 1592: 8, 1593: 8, 1595: 8, 1599: 8, 1656: 8, 1666: 8, 1667: 8, 1728: 8, 1745: 8, 1779: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8
Expand Down
5 changes: 4 additions & 1 deletion selfdrive/controls/lib/driver_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
from common.realtime import sec_since_boot
from selfdrive.controls.lib.drive_helpers import create_event, EventTypes as ET
from common.filter_simple import FirstOrderFilter
from selfdrive.kegman_conf import kegman_conf

kegman = kegman_conf()

_DT = 0.01 # update runs at 100Hz
_DTM = 0.1 # DM runs at 10Hz
_AWARENESS_TIME = 1800 # 3 minutes limit without user touching steering wheels make the car enter a terminal status
_AWARENESS_TIME = int(kegman.conf['wheelTouchSeconds']) # 3 minutes limit without user touching steering wheels make the car enter a terminal status
_AWARENESS_PRE_TIME = 200. # a first alert is issued 20s before expiration
_AWARENESS_PROMPT_TIME = 50. # a second alert is issued 5s before start decelerating the car
_DISTRACTED_TIME = 70.
Expand Down
4 changes: 3 additions & 1 deletion selfdrive/controls/lib/longcontrol.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from cereal import log
from common.numpy_fast import clip, interp
from selfdrive.controls.lib.pid import PIController
from selfdrive.kegman_conf import kegman_conf

kegman = kegman_conf()
LongCtrlState = log.Live100Data.LongControlState

STOPPING_EGO_SPEED = 0.5
Expand All @@ -12,7 +14,7 @@

STOPPING_BRAKE_RATE = 0.2 # brake_travel/s while trying to stop
STARTING_BRAKE_RATE = 0.8 # brake_travel/s while releasing on restart
BRAKE_STOPPING_TARGET = 0.25 # apply at least this amount of brake to maintain the vehicle stationary
BRAKE_STOPPING_TARGET = float(kegman.conf['brakeStoppingTarget']) # apply at least this amount of brake to maintain the vehicle stationary

_MAX_SPEED_ERROR_BP = [0., 30.] # speed breakpoints
_MAX_SPEED_ERROR_V = [1.5, .8] # max positive v_pid error VS actual speed; this avoids controls windup due to slow pedal resp
Expand Down
Loading

0 comments on commit 2132fcd

Please sign in to comment.