diff --git a/README.md b/README.md index 360ad90804..e9f9f0e9f3 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,8 @@ Supported Cars | Honda | Pilot 2016-18 | Honda Sensing | openpilot | 25mph1 | 12mph | | Honda | Pilot 2019 | All | openpilot | 25mph1 | 12mph | | Honda | Ridgeline 2017-20 | Honda Sensing | openpilot | 25mph1 | 12mph | +| Hyundai | Sonata 2020 | All | Stock | 0mph | 0mph | +| Hyundai | Palisade 2020 | All | Stock | 0mph | 0mph | | Lexus | CT Hybrid 2017-18 | All | Stock3| 0mph | 0mph | | Lexus | ES 2019 | All | openpilot | 0mph | 0mph | | Lexus | ES Hybrid 2019 | All | openpilot | 0mph | 0mph | diff --git a/selfdrive/car/hyundai/carcontroller.py b/selfdrive/car/hyundai/carcontroller.py index 79d509a1da..59fef40d20 100644 --- a/selfdrive/car/hyundai/carcontroller.py +++ b/selfdrive/car/hyundai/carcontroller.py @@ -96,8 +96,7 @@ class CarController(): # 20 Hz LFA MFA message - if frame % 5 == 0 and self.car_fingerprint == CAR.SONATA: + if frame % 5 == 0 and self.car_fingerprint in [CAR.SONATA, CAR.PALISADE]: can_sends.append(create_lfa_mfa(self.packer, frame, enabled)) - return can_sends diff --git a/selfdrive/car/hyundai/hyundaican.py b/selfdrive/car/hyundai/hyundaican.py index ffbde551c7..32aefc8593 100644 --- a/selfdrive/car/hyundai/hyundaican.py +++ b/selfdrive/car/hyundai/hyundaican.py @@ -19,7 +19,7 @@ def create_lkas11(packer, frame, car_fingerprint, apply_steer, steer_req, values["CF_Lkas_MsgCount"] = frame % 0x10 values["CF_Lkas_Chksum"] = 0 - if car_fingerprint == CAR.SONATA: + if car_fingerprint in [CAR.SONATA, CAR.PALISADE]: values["CF_Lkas_Bca_R"] = int(left_lane) + (int(right_lane) << 1) values["CF_Lkas_LdwsOpt_USM"] = 2 diff --git a/selfdrive/car/hyundai/interface.py b/selfdrive/car/hyundai/interface.py index 8eaf2a9c12..5da4a73a75 100644 --- a/selfdrive/car/hyundai/interface.py +++ b/selfdrive/car/hyundai/interface.py @@ -46,6 +46,13 @@ class CarInterface(CarInterfaceBase): ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]] ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.25], [0.05]] ret.minSteerSpeed = 0. + elif candidate == CAR.PALISADE: + ret.lateralTuning.pid.kf = 0.00005 + ret.mass = 1999. + STD_CARGO_KG + ret.wheelbase = 2.90 + ret.steerRatio = 13.75 * 1.15 + ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]] + ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.25], [0.05]] elif candidate == CAR.KIA_SORENTO: ret.lateralTuning.pid.kf = 0.00005 ret.mass = 1985. + STD_CARGO_KG diff --git a/selfdrive/car/hyundai/values.py b/selfdrive/car/hyundai/values.py index 1358bed2a8..480ed6f269 100644 --- a/selfdrive/car/hyundai/values.py +++ b/selfdrive/car/hyundai/values.py @@ -30,6 +30,7 @@ class CAR: SANTA_FE = "HYUNDAI SANTA FE LIMITED 2019" SANTA_FE_1 = "HYUNDAI SANTA FE has no scc" SONATA = "HYUNDAI SONATA 2020" + PALISADE = "HYUNDAI PALISADE 2020" class Buttons: @@ -125,6 +126,9 @@ FINGERPRINTS = { { 68: 8, 127: 8, 304: 8, 320: 8, 339: 8, 352: 8, 356: 4, 544: 8, 576: 8, 593: 8, 688: 5, 881: 8, 882: 8, 897: 8, 902: 8, 903: 8, 909: 8, 912: 7, 916: 8, 1040: 8, 1056: 8, 1057: 8, 1078: 4, 1136: 6, 1151: 6, 1168: 7, 1173: 8, 1180: 8, 1186: 2, 1191: 2, 1265: 4, 1268: 8, 1280: 1, 1287: 4, 1290: 8, 1291: 8, 1292: 8, 1294: 8, 1312: 8, 1322: 8, 1342: 6, 1345: 8, 1348: 8, 1355: 8, 1363: 8, 1369: 8, 1371: 8, 1407: 8, 1419: 8, 1420: 8, 1425: 2, 1427: 6, 1429: 8, 1430: 8, 1448: 8, 1456: 4, 1470: 8, 1476: 8, 1535: 8 }], + CAR.PALISADE: [{ + 67: 8, 127: 8, 304: 8, 320: 8, 339: 8, 356: 4, 544: 8, 549: 8, 576: 8, 593: 8, 608: 8, 688: 6, 809: 8, 832: 8, 854: 7, 870: 7, 871: 8, 872: 8, 897: 8, 902: 8, 903: 8, 905: 8, 909: 8, 913: 8, 916: 8, 1040: 8, 1042: 8, 1056: 8, 1057: 8, 1064: 8, 1078: 4, 1107: 5, 1123: 8, 1136: 8, 1151: 6, 1155: 8, 1156: 8, 1157: 4, 1162: 8, 1164: 8, 1168: 7, 1170: 8, 1173: 8, 1180: 8, 1186: 2, 1191: 2, 1193: 8, 1210: 8, 1225: 8, 1227: 8, 1265: 4, 1280: 8, 1287: 4, 1290: 8, 1292: 8, 1294: 8, 1312: 8, 1322: 8, 1342: 6, 1345: 8, 1348: 8, 1363: 8, 1369: 8, 1371: 8, 1378: 8, 1384: 8, 1407: 8, 1419: 8, 1427: 6, 1456: 4, 1470: 8, 2000: 8, 2005: 8, 2008: 8 + }], } ECU_FINGERPRINT = { @@ -132,7 +136,7 @@ ECU_FINGERPRINT = { } CHECKSUM = { - "crc8": [CAR.SANTA_FE, CAR.SONATA], + "crc8": [CAR.SANTA_FE, CAR.SONATA, CAR.PALISADE], "6B": [CAR.KIA_SORENTO, CAR.HYUNDAI_GENESIS], } @@ -159,6 +163,7 @@ DBC = { CAR.KONA_EV: dbc_dict('hyundai_kia_generic', None), CAR.SANTA_FE: dbc_dict('hyundai_kia_generic', None), CAR.SONATA: dbc_dict('hyundai_kia_generic', None), + CAR.PALISADE: dbc_dict('hyundai_kia_generic', None), } STEER_THRESHOLD = 150