From 46009fa6fd61fd454d3a4025f29c6fce688b09a0 Mon Sep 17 00:00:00 2001 From: Gibby <503761+Gibby@users.noreply.github.com> Date: Tue, 26 Oct 2021 18:59:24 -0400 Subject: [PATCH] GM: 2016 Escalade ESV (#22670) * Added 2016 Escalade ESV fingerprint and data. * Updated CARS.md for GM vehicles * Uploaded Escalade fingerprint * Removed part about auto high beams for GM. Seems to work for some. * Revert other modifications in CARS.md * Revert other modifications in CARS.md * Added test route for Escalade * Added tunning for Escalade to reduce jerky steering * Apply suggestions from code review * Update selfdrive/car/gm/interface.py * cleanup test route Co-authored-by: Gibby Co-authored-by: Adeeb Shihadeh --- docs/CARS.md | 1 + selfdrive/car/gm/interface.py | 11 +++++++++++ selfdrive/car/gm/radar_interface.py | 2 +- selfdrive/car/gm/values.py | 6 ++++++ selfdrive/test/test_routes.py | 6 +++--- 5 files changed, 22 insertions(+), 4 deletions(-) diff --git a/docs/CARS.md b/docs/CARS.md index 9766a7264..5dca361b6 100644 --- a/docs/CARS.md +++ b/docs/CARS.md @@ -85,6 +85,7 @@ Community Maintained Cars and Features | Audi | S3 2015 | ACC + Lane Assist | Stock | 0mph | 0mph | | Buick | Regal 20181 | Adaptive Cruise | openpilot | 0mph | 7mph | | Cadillac | ATS 20181 | Adaptive Cruise | openpilot | 0mph | 7mph | +| Cadillac | Escalade ESV 20161 | ACC + LKAS | openpilot | 0mph | 7mph | | Chevrolet | Malibu 20171 | Adaptive Cruise | openpilot | 0mph | 7mph | | Chevrolet | Volt 2017-181 | Adaptive Cruise | openpilot | 0mph | 7mph | | Chrysler | Pacifica 2017-18 | Adaptive Cruise | Stock | 0mph | 9mph | diff --git a/selfdrive/car/gm/interface.py b/selfdrive/car/gm/interface.py index 53692c25f..4719a5db5 100755 --- a/selfdrive/car/gm/interface.py +++ b/selfdrive/car/gm/interface.py @@ -111,6 +111,17 @@ class CarInterface(CarInterfaceBase): ret.steerRatioRear = 0. ret.centerToFront = ret.wheelbase * 0.49 + elif candidate == CAR.ESCALADE_ESV: + ret.minEnableSpeed = -1. # engage speed is decided by pcm + ret.mass = 2739. + STD_CARGO_KG + ret.wheelbase = 3.302 + ret.steerRatio = 17.3 + ret.centerToFront = ret.wheelbase * 0.49 + ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[10., 41.0], [10., 41.0]] + ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.13, 0.24], [0.01, 0.02]] + ret.lateralTuning.pid.kf = 0.000045 + tire_stiffness_factor = 1.0 + # TODO: get actual value, for now starting with reasonable value for # civic and scaling by mass and wheelbase ret.rotationalInertia = scale_rot_inertia(ret.mass, ret.wheelbase) diff --git a/selfdrive/car/gm/radar_interface.py b/selfdrive/car/gm/radar_interface.py index 7e475c568..4cb1e0781 100755 --- a/selfdrive/car/gm/radar_interface.py +++ b/selfdrive/car/gm/radar_interface.py @@ -16,7 +16,7 @@ NUM_SLOTS = 20 LAST_RADAR_MSG = RADAR_HEADER_MSG + NUM_SLOTS def create_radar_can_parser(car_fingerprint): - if car_fingerprint not in (CAR.VOLT, CAR.MALIBU, CAR.HOLDEN_ASTRA, CAR.ACADIA, CAR.CADILLAC_ATS): + if car_fingerprint not in (CAR.VOLT, CAR.MALIBU, CAR.HOLDEN_ASTRA, CAR.ACADIA, CAR.CADILLAC_ATS, CAR.ESCALADE_ESV): return None # C1A-ARS3-A by Continental diff --git a/selfdrive/car/gm/values.py b/selfdrive/car/gm/values.py index cb4a68a69..85be9334c 100644 --- a/selfdrive/car/gm/values.py +++ b/selfdrive/car/gm/values.py @@ -47,6 +47,7 @@ class CAR: MALIBU = "CHEVROLET MALIBU PREMIER 2017" ACADIA = "GMC ACADIA DENALI 2018" BUICK_REGAL = "BUICK REGAL ESSENCE 2018" + ESCALADE_ESV = "CADILLAC ESCALADE ESV 2016" class CruiseButtons: INIT = 0 @@ -106,6 +107,10 @@ FINGERPRINTS = { { 190: 6, 193: 8, 197: 8, 199: 4, 201: 8, 208: 8, 209: 7, 211: 2, 241: 6, 249: 8, 288: 5, 289: 8, 298: 8, 304: 1, 309: 8, 313: 8, 320: 3, 322: 7, 328: 1, 338: 6, 340: 6, 352: 5, 381: 8, 384: 4, 386: 8, 388: 8, 393: 8, 398: 8, 413: 8, 417: 7, 419: 1, 422: 4, 426: 7, 431: 8, 442: 8, 451: 8, 452: 8, 453: 6, 454: 8, 455: 7, 462: 4, 463: 3, 479: 3, 481: 7, 485: 8, 489: 8, 497: 8, 499: 3, 500: 6, 501: 8, 508: 8, 510: 8, 532: 6, 554: 3, 560: 8, 562: 8, 563: 5, 564: 5, 567: 5, 573: 1, 577: 8, 608: 8, 609: 6, 610: 6, 611: 6, 612: 8, 613: 8, 647: 6, 707: 8, 715: 8, 717: 5, 753: 5, 761: 7, 840: 5, 842: 5, 844: 8, 866: 4, 869: 4, 880: 6, 961: 8, 969: 8, 977: 8, 979: 8, 985: 5, 1001: 8, 1005: 6, 1009: 8, 1017: 8, 1020: 8, 1033: 7, 1034: 7, 1105: 6, 1217: 8, 1221: 5, 1225: 8, 1233: 8, 1249: 8, 1257: 6, 1265: 8, 1267: 1, 1280: 4, 1296: 4, 1300: 8, 1322: 6, 1328: 4, 1417: 8, 1601: 8, 1906: 7, 1907: 7, 1912: 7, 1914: 7, 1919: 7, 1920: 7, 1930: 7, 2016: 8, 2024: 8 }], + CAR.ESCALADE_ESV: [ + { + 309: 1, 848: 8, 849: 8, 850: 8, 851: 8, 852: 8, 853: 8, 854: 3, 1056: 6, 1057: 8, 1058: 8, 1059: 8, 1060: 8, 1061: 8, 1062: 8, 1063: 8, 1064: 8, 1065: 8, 1066: 8, 1067: 8, 1068: 8, 1120: 8, 1121: 8, 1122: 8, 1123: 8, 1124: 8, 1125: 8, 1126: 8, 1127: 8, 1128: 8, 1129: 8, 1130: 8, 1131: 8, 1132: 8, 1133: 8, 1134: 8, 1135: 8, 1136: 8, 1137: 8, 1138: 8, 1139: 8, 1140: 8, 1141: 8, 1142: 8, 1143: 8, 1146: 8, 1147: 8, 1148: 8, 1149: 8, 1150: 8, 1151: 8, 1216: 8, 1217: 8, 1218: 8, 1219: 8, 1220: 8, 1221: 8, 1222: 8, 1223: 8, 1224: 8, 1225: 8, 1226: 8, 1232: 8, 1233: 8, 1234: 8, 1235: 8, 1236: 8, 1237: 8, 1238: 8, 1239: 8, 1240: 8, 1241: 8, 1242: 8, 1787: 8, 1788: 8 + }], } DBC = { @@ -115,4 +120,5 @@ DBC = { CAR.ACADIA: dbc_dict('gm_global_a_powertrain', 'gm_global_a_object', chassis_dbc='gm_global_a_chassis'), CAR.CADILLAC_ATS: dbc_dict('gm_global_a_powertrain', 'gm_global_a_object', chassis_dbc='gm_global_a_chassis'), CAR.BUICK_REGAL: dbc_dict('gm_global_a_powertrain', 'gm_global_a_object', chassis_dbc='gm_global_a_chassis'), + CAR.ESCALADE_ESV: dbc_dict('gm_global_a_powertrain', 'gm_global_a_object', chassis_dbc='gm_global_a_chassis'), } diff --git a/selfdrive/test/test_routes.py b/selfdrive/test/test_routes.py index b1f3face6..7c5947207 100755 --- a/selfdrive/test/test_routes.py +++ b/selfdrive/test/test_routes.py @@ -35,11 +35,11 @@ routes = [ TestRoute("3d84727705fecd04|2021-05-25--08-38-56", CHRYSLER.PACIFICA_2020), TestRoute("f1b4c567731f4a1b|2018-04-30--10-15-35", FORD.FUSION), - - TestRoute("c950e28c26b5b168|2018-05-30--22-03-41", GM.VOLT), - # TODO: use another route that has radar data at start + TestRoute("7cc2a8365b4dd8a9|2018-12-02--12-10-44", GM.ACADIA), TestRoute("aa20e335f61ba898|2019-02-05--16-59-04", GM.BUICK_REGAL), + TestRoute("46460f0da08e621e|2021-10-26--07-21-46", GM.ESCALADE_ESV), + TestRoute("c950e28c26b5b168|2018-05-30--22-03-41", GM.VOLT), TestRoute("0e7a2ba168465df5|2020-10-18--14-14-22", HONDA.ACURA_RDX_3G), TestRoute("a74b011b32b51b56|2020-07-26--17-09-36", HONDA.CIVIC),