diff --git a/cereal b/cereal index 513dfc7ee0..e4130c9055 160000 --- a/cereal +++ b/cereal @@ -1 +1 @@ -Subproject commit 513dfc7ee001243cd68a57a9d92fe3170fc49c7d +Subproject commit e4130c90558dfb491e132992dce36e0e620e070a diff --git a/selfdrive/car/gm/interface.py b/selfdrive/car/gm/interface.py index be28890484..22ea83759a 100755 --- a/selfdrive/car/gm/interface.py +++ b/selfdrive/car/gm/interface.py @@ -71,10 +71,11 @@ class CarInterface(CarInterfaceBase): # These cars have been put into dashcam only due to both a lack of users and test coverage. # These cars likely still work fine. Once a user confirms each car works and a test route is # added to selfdrive/car/tests/routes.py, we can remove it from this list. - ret.dashcamOnly = candidate in {CAR.CADILLAC_ATS, CAR.HOLDEN_ASTRA, CAR.MALIBU, CAR.BUICK_REGAL} + ret.dashcamOnly = candidate in {CAR.CADILLAC_ATS, CAR.HOLDEN_ASTRA, CAR.MALIBU, CAR.BUICK_REGAL, CAR.EQUINOX, CAR.BOLT_EV} # Start with a baseline tuning for all GM vehicles. Override tuning as needed in each model section below. - ret.minSteerSpeed = 10 * CV.KPH_TO_MS + # Some GMs need some tolerance above 10 kph to avoid a fault + ret.minSteerSpeed = 10.1 * CV.KPH_TO_MS ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]] ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.2], [0.00]] ret.lateralTuning.pid.kf = 0.00004 # full torque for 20 deg at 80mph means 0.00007818594 @@ -138,25 +139,25 @@ class CarInterface(CarInterfaceBase): ret.mass = 1601. + STD_CARGO_KG ret.wheelbase = 2.78 ret.steerRatio = 15.3 - ret.centerToFront = ret.wheelbase * 0.49 + ret.centerToFront = ret.wheelbase * 0.5 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.centerToFront = ret.wheelbase * 0.5 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 - elif candidate == CAR.BOLT_EUV: + elif candidate in (CAR.BOLT_EV, CAR.BOLT_EUV): ret.minEnableSpeed = -1 ret.mass = 1669. + STD_CARGO_KG - ret.wheelbase = 2.675 + ret.wheelbase = 2.63779 ret.steerRatio = 16.8 - ret.centerToFront = ret.wheelbase * 0.4 + ret.centerToFront = 2.15 # measured tire_stiffness_factor = 1.0 ret.steerActuatorDelay = 0.2 CarInterfaceBase.configure_torque_tune(candidate, ret.lateralTuning) @@ -170,6 +171,14 @@ class CarInterface(CarInterfaceBase): tire_stiffness_factor = 1.0 CarInterfaceBase.configure_torque_tune(candidate, ret.lateralTuning) + elif candidate == CAR.EQUINOX: + ret.minEnableSpeed = -1 + ret.mass = 3500. * CV.LB_TO_KG + STD_CARGO_KG + ret.wheelbase = 2.72 + ret.steerRatio = 14.4 + ret.centerToFront = ret.wheelbase * 0.4 + CarInterfaceBase.configure_torque_tune(candidate, ret.lateralTuning) + # 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/values.py b/selfdrive/car/gm/values.py index a84cbdc91a..943e8a6585 100644 --- a/selfdrive/car/gm/values.py +++ b/selfdrive/car/gm/values.py @@ -58,8 +58,10 @@ class CAR: ACADIA = "GMC ACADIA DENALI 2018" BUICK_REGAL = "BUICK REGAL ESSENCE 2018" ESCALADE_ESV = "CADILLAC ESCALADE ESV 2016" + BOLT_EV = "CHEVROLET BOLT EV 2022" BOLT_EUV = "CHEVROLET BOLT EUV 2022" SILVERADO = "CHEVROLET SILVERADO 1500 2020" + EQUINOX = "CHEVROLET EQUINOX 2019" class Footnote(Enum): @@ -84,11 +86,13 @@ CAR_INFO: Dict[str, Union[GMCarInfo, List[GMCarInfo]]] = { CAR.ACADIA: GMCarInfo("GMC Acadia 2018", video_link="https://www.youtube.com/watch?v=0ZN6DdsBUZo"), CAR.BUICK_REGAL: GMCarInfo("Buick Regal Essence 2018"), CAR.ESCALADE_ESV: GMCarInfo("Cadillac Escalade ESV 2016", "Adaptive Cruise Control (ACC) & LKAS"), + CAR.BOLT_EV: GMCarInfo("Chevrolet Bolt EV 2022-23", "Adaptive Cruise Control (ACC)", footnotes=[], harness=Harness.gm), CAR.BOLT_EUV: GMCarInfo("Chevrolet Bolt EUV 2022-23", "Premier or Premier Redline Trim without Super Cruise Package", video_link="https://youtu.be/xvwzGMUA210", footnotes=[], harness=Harness.gm), CAR.SILVERADO: [ GMCarInfo("Chevrolet Silverado 1500 2020-21", "Safety Package II", footnotes=[], harness=Harness.gm), GMCarInfo("GMC Sierra 1500 2020-21", "Driver Alert Package II", footnotes=[], harness=Harness.gm), ], + CAR.EQUINOX: GMCarInfo("Chevrolet Equinox 2019-22", "Adaptive Cruise Control (ACC)", footnotes=[], harness=Harness.gm), } @@ -166,13 +170,17 @@ FINGERPRINTS = { { 190: 6, 193: 8, 197: 8, 201: 8, 208: 8, 209: 7, 211: 2, 241: 6, 249: 8, 257: 8, 288: 5, 289: 8, 298: 8, 304: 3, 309: 8, 311: 8, 313: 8, 320: 4, 322: 7, 328: 1, 352: 5, 381: 8, 384: 4, 386: 8, 388: 8, 413: 8, 451: 8, 452: 8, 453: 6, 455: 7, 460: 5, 463: 3, 479: 3, 481: 7, 485: 8, 489: 8, 497: 8, 500: 6, 501: 8, 528: 5, 532: 6, 534: 2, 560: 8, 562: 8, 563: 5, 565: 5, 608: 8, 609: 6, 610: 6, 611: 6, 612: 8, 613: 8, 707: 8, 715: 8, 717: 5, 761: 7, 789: 5, 800: 6, 801: 8, 810: 8, 840: 5, 842: 5, 844: 8, 848: 4, 869: 4, 880: 6, 977: 8, 1001: 8, 1011: 6, 1017: 8, 1020: 8, 1033: 7, 1034: 7, 1217: 8, 1221: 5, 1233: 8, 1249: 8, 1259: 8, 1261: 7, 1263: 4, 1265: 8, 1267: 1, 1271: 8, 1280: 4, 1296: 4, 1300: 8, 1930: 7 }], + CAR.EQUINOX: [ + { + 190: 6, 193: 8, 197: 8, 201: 8, 209: 7, 211: 2, 241: 6, 249: 8, 257: 8, 288: 5, 289: 8, 298: 8, 304: 1, 309: 8, 311: 8, 313: 8, 320: 3, 328: 1, 352: 5, 381: 8, 384: 4, 386: 8, 388: 8, 413: 8, 451: 8, 452: 8, 453: 6, 455: 7, 463: 3, 479: 3, 481: 7, 485: 8, 489: 8, 497: 8, 500: 6, 501: 8, 510: 8, 528: 5, 532: 6, 560: 8, 562: 8, 563: 5, 565: 5, 608: 8, 609: 6, 610: 6, 611: 6, 612: 8, 613: 8, 707: 8, 715: 8, 717: 5, 753: 5, 761: 7, 789: 5, 800: 6, 810: 8, 840: 5, 842: 5, 844: 8, 869: 4, 880: 6, 977: 8, 1001: 8, 1011: 6, 1017: 8, 1020: 8, 1033: 7, 1034: 7, 1217: 8, 1221: 5, 1233: 8, 1249: 8, 1259: 8, 1261: 7, 1263: 4, 1265: 8, 1267: 1, 1271: 8, 1280: 4, 1296: 4, 1300: 8, 1930: 7 + }], } DBC: Dict[str, Dict[str, str]] = defaultdict(lambda: dbc_dict('gm_global_a_powertrain_generated', 'gm_global_a_object', chassis_dbc='gm_global_a_chassis')) -EV_CAR = {CAR.VOLT, CAR.BOLT_EUV} +EV_CAR = {CAR.VOLT, CAR.BOLT_EV, CAR.BOLT_EUV} # We're integrated at the camera with VOACC on these cars (instead of ASCM w/ OBD-II harness) -CAMERA_ACC_CAR = {CAR.BOLT_EUV, CAR.SILVERADO} +CAMERA_ACC_CAR = {CAR.BOLT_EV, CAR.BOLT_EUV, CAR.SILVERADO, CAR.EQUINOX} STEER_THRESHOLD = 1.0 diff --git a/selfdrive/car/mazda/interface.py b/selfdrive/car/mazda/interface.py index 89ed5638cb..7c42431e33 100755 --- a/selfdrive/car/mazda/interface.py +++ b/selfdrive/car/mazda/interface.py @@ -10,10 +10,6 @@ EventName = car.CarEvent.EventName class CarInterface(CarInterfaceBase): - @staticmethod - def compute_gb(accel, speed): - return float(accel) / 4.0 - @staticmethod def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=None, experimental_long=False): ret = CarInterfaceBase.get_std_params(candidate, fingerprint) diff --git a/selfdrive/car/mock/interface.py b/selfdrive/car/mock/interface.py index 2c7f4611ee..77e3703c2d 100755 --- a/selfdrive/car/mock/interface.py +++ b/selfdrive/car/mock/interface.py @@ -28,10 +28,6 @@ class CarInterface(CarInterfaceBase): self.yaw_rate = 0. self.yaw_rate_meas = 0. - @staticmethod - def compute_gb(accel, speed): - return accel - @staticmethod def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=None, experimental_long=False): ret = CarInterfaceBase.get_std_params(candidate, fingerprint) diff --git a/selfdrive/car/tests/routes.py b/selfdrive/car/tests/routes.py index 1f5d3edaf0..e86525baac 100644 --- a/selfdrive/car/tests/routes.py +++ b/selfdrive/car/tests/routes.py @@ -21,6 +21,8 @@ non_tested_cars = [ GM.CADILLAC_ATS, GM.HOLDEN_ASTRA, GM.MALIBU, + GM.EQUINOX, + GM.BOLT_EV, HYUNDAI.ELANTRA_GT_I30, HYUNDAI.GENESIS_G90, HYUNDAI.KIA_OPTIMA_H, diff --git a/selfdrive/car/torque_data/override.yaml b/selfdrive/car/torque_data/override.yaml index 20fb5f7a64..b5d1a31193 100644 --- a/selfdrive/car/torque_data/override.yaml +++ b/selfdrive/car/torque_data/override.yaml @@ -25,8 +25,10 @@ KIA EV6 2022: [3.5, 3.0, 0.0] RAM 1500 5TH GEN: [2.0, 2.0, 0.0] RAM HD 5TH GEN: [1.4, 1.4, 0.0] SUBARU OUTBACK 6TH GEN: [2.3, 2.3, 0.11] +CHEVROLET BOLT EV 2022: [2.0, 2.0, 0.05] CHEVROLET BOLT EUV 2022: [2.0, 2.0, 0.05] CHEVROLET SILVERADO 1500 2020: [1.9, 1.9, 0.112] +CHEVROLET EQUINOX 2019: [2.0, 2.0, 0.05] VOLKSWAGEN PASSAT NMS: [2.5, 2.5, 0.1] HYUNDAI TUCSON HYBRID 4TH GEN: [2.5, 2.5, 0.0] diff --git a/selfdrive/test/process_replay/ref_commit b/selfdrive/test/process_replay/ref_commit index 7390610252..b1a2785ba3 100644 --- a/selfdrive/test/process_replay/ref_commit +++ b/selfdrive/test/process_replay/ref_commit @@ -1 +1 @@ -ef5395e5f36550d2b485216eee5406bf6062e9c9 \ No newline at end of file +a4aa1f37c6d966151d3b43a0b51fffbcfa0187b1 \ No newline at end of file diff --git a/selfdrive/test/process_replay/test_processes.py b/selfdrive/test/process_replay/test_processes.py index e8c2e1dc94..0f118971c6 100755 --- a/selfdrive/test/process_replay/test_processes.py +++ b/selfdrive/test/process_replay/test_processes.py @@ -38,21 +38,21 @@ original_segments = [ ] segments = [ - ("BODY", "regen660D86654BA|2022-07-06--14-27-15--0"), - ("HYUNDAI", "regen114E5FF24D8|2022-07-14--17-08-47--0"), - ("HYUNDAI", "d824e27e8c60172c|2022-08-19--17-58-07--2"), - ("TOYOTA", "regenBA97410FBEC|2022-07-06--14-26-49--0"), - ("TOYOTA2", "regenDEDB1D9C991|2022-07-06--14-54-08--0"), - ("TOYOTA3", "regenDDC1FE60734|2022-07-06--14-32-06--0"), - ("HONDA", "regenE62960EEC38|2022-07-14--19-33-24--0"), - ("HONDA2", "regenC3EBD92F029|2022-07-14--19-29-47--0"), - ("CHRYSLER", "regen38346FB33D0|2022-07-14--18-05-26--0"), - ("RAM", "2f4452b03ccb98f0|2022-07-07--08-01-56--3"), - ("SUBARU", "regen54A1E2BE5AA|2022-07-14--18-07-50--0"), - ("GM", "regen76027B408B7|2022-08-16--19-56-58--0"), - ("NISSAN", "regenCA0B0DC946E|2022-07-14--18-10-17--0"), - ("VOLKSWAGEN", "regen007098CA0EF|2022-07-06--15-01-26--0"), - ("MAZDA", "regen61BA413D53B|2022-07-06--14-39-42--0"), + ("BODY", "regen9D38397D30D|2022-09-09--13-12-48--0"), + ("HYUNDAI", "regenB3953B393C0|2022-09-09--14-49-37--0"), + ("HYUNDAI", "regen8DB830E5376|2022-09-13--17-24-37--0"), + ("TOYOTA", "regen8FCBB6F06F1|2022-09-09--13-14-07--0"), + ("TOYOTA2", "regen956BFA75300|2022-09-09--14-51-24--0"), + ("TOYOTA3", "regenE909BC2F430|2022-09-09--20-44-49--0"), + ("HONDA", "regenD1D10209015|2022-09-09--14-53-09--0"), + ("HONDA2", "regen3F7C2EFDC08|2022-09-09--19-41-19--0"), + ("CHRYSLER", "regen92783EAE66B|2022-09-09--13-15-44--0"), + ("RAM", "regenBE5DAAEF30F|2022-09-13--17-06-24--0"), + ("SUBARU", "regen8A363AF7E14|2022-09-13--17-20-39--0"), + ("GM", "regen31EA3F9A37C|2022-09-09--21-06-36--0"), + ("NISSAN", "regenAA21ADE5921|2022-09-09--19-44-37--0"), + ("VOLKSWAGEN", "regenA1BF4D17761|2022-09-09--19-46-24--0"), + ("MAZDA", "regen1994C97E977|2022-09-13--16-34-44--0"), ] # dashcamOnly makes don't need to be tested until a full port is done diff --git a/selfdrive/ui/qt/maps/map.cc b/selfdrive/ui/qt/maps/map.cc index 71706fd35e..b5519daccf 100644 --- a/selfdrive/ui/qt/maps/map.cc +++ b/selfdrive/ui/qt/maps/map.cc @@ -204,7 +204,8 @@ void MapWindow::updateState(const UIState &s) { if (zoom_counter == 0) { m_map->setZoom(util::map_val(velocity_filter.x(), 0, 30, MAX_ZOOM, MIN_ZOOM)); - } else { + zoom_counter = -1; + } else if (zoom_counter > 0) { zoom_counter--; } diff --git a/selfdrive/ui/qt/maps/map.h b/selfdrive/ui/qt/maps/map.h index ecba867edb..c3d5e92530 100644 --- a/selfdrive/ui/qt/maps/map.h +++ b/selfdrive/ui/qt/maps/map.h @@ -98,7 +98,7 @@ private: // Panning QPointF m_lastPos; int pan_counter = 0; - int zoom_counter = 0; + int zoom_counter = -1; // Position std::optional last_position; diff --git a/selfdrive/ui/qt/offroad/settings.cc b/selfdrive/ui/qt/offroad/settings.cc index 52df247a25..ae878c5419 100644 --- a/selfdrive/ui/qt/offroad/settings.cc +++ b/selfdrive/ui/qt/offroad/settings.cc @@ -134,8 +134,8 @@ void TogglesPanel::updateToggles() { e2e_toggle->setEnabled(false); params.remove("EndToEndLong"); - const QString no_long = "openpilot longitudinal control is not currently available for this car."; - const QString exp_long = "Enable experimental longitudinal control to enable this."; + const QString no_long = tr("openpilot longitudinal control is not currently available for this car."); + const QString exp_long = tr("Enable experimental longitudinal control to enable this."); e2e_toggle->setDescription("" + (CP.getExperimentalLongitudinalAvailable() ? exp_long : no_long) + "

" + e2e_description); } diff --git a/selfdrive/ui/qt/offroad/software_settings.cc b/selfdrive/ui/qt/offroad/software_settings.cc index c9deef2ec4..4f048241c3 100644 --- a/selfdrive/ui/qt/offroad/software_settings.cc +++ b/selfdrive/ui/qt/offroad/software_settings.cc @@ -45,7 +45,7 @@ SoftwarePanel::SoftwarePanel(QWidget* parent) : ListWidget(parent) { installBtn = new ButtonControl(tr("Install Update"), tr("INSTALL")); connect(installBtn, &ButtonControl::clicked, [=]() { installBtn->setEnabled(false); - params.putBool("DoShutdown", true); + params.putBool("DoReboot", true); }); addItem(installBtn); diff --git a/selfdrive/ui/translations/main_ja.ts b/selfdrive/ui/translations/main_ja.ts index 4262473fb2..b41e1bff77 100644 --- a/selfdrive/ui/translations/main_ja.ts +++ b/selfdrive/ui/translations/main_ja.ts @@ -985,42 +985,42 @@ location set Updates are only downloaded while the car is off. - + 車の電源がオフの間のみ、アップデートのダウンロードが行われます。 Current Version - + 現在のバージョン Download - + ダウンロード Install Update - + アップデート INSTALL - + インストール Target Branch - + 対象のブランチ SELECT - + 選択 Select a branch - + ブランチを選択 @@ -1187,7 +1187,17 @@ location set アクセルとブレーキの制御をopenpilotに任せます。openpilotが人間と同じように運転します。最初期の実験段階です。 - + + openpilot longitudinal control is not currently available for this car. + openpilotによるアクセル制御は、この車では現在利用できません。 + + + + Enable experimental longitudinal control to enable this. + ここ機能を使う為には、「実験段階のopenpilotによるアクセル制御」を先に有効化してください。 + + + Disengage On Accelerator Pedal アクセル踏むと openpilot をキャンセル diff --git a/selfdrive/ui/translations/main_ko.ts b/selfdrive/ui/translations/main_ko.ts index 2a827ca4a6..17914f21d8 100644 --- a/selfdrive/ui/translations/main_ko.ts +++ b/selfdrive/ui/translations/main_ko.ts @@ -1187,7 +1187,17 @@ location set 주행모델이 가속과 감속을 제어하도록 하면 openpilot은 운전자가 생각하는것처럼 운전합니다. (매우 실험적) - + + openpilot longitudinal control is not currently available for this car. + + + + + Enable experimental longitudinal control to enable this. + + + + Disengage On Accelerator Pedal 가속페달 조작시 해제 diff --git a/selfdrive/ui/translations/main_pt-BR.ts b/selfdrive/ui/translations/main_pt-BR.ts index 91ffabc625..fe028e18b5 100644 --- a/selfdrive/ui/translations/main_pt-BR.ts +++ b/selfdrive/ui/translations/main_pt-BR.ts @@ -1191,7 +1191,17 @@ trabalho definido - + + openpilot longitudinal control is not currently available for this car. + + + + + Enable experimental longitudinal control to enable this. + + + + Disengage On Accelerator Pedal Desacionar Com Pedal Do Acelerador diff --git a/selfdrive/ui/translations/main_zh-CHS.ts b/selfdrive/ui/translations/main_zh-CHS.ts index 8fce4e01a7..28008ef06f 100644 --- a/selfdrive/ui/translations/main_zh-CHS.ts +++ b/selfdrive/ui/translations/main_zh-CHS.ts @@ -1167,7 +1167,7 @@ location set 🌮 End-to-end longitudinal (extremely alpha) 🌮 - + 🌮 端对端纵向控制(实验性功能) 🌮 @@ -1182,10 +1182,20 @@ location set Let the driving model control the gas and brakes. openpilot will drive as it thinks a human would. Super experimental. + 让驾驶模型直接控制油门和刹车,openpilot将会模仿人类司机的驾驶方式。该功能仍非常实验性。 + + + + openpilot longitudinal control is not currently available for this car. + + + + + Enable experimental longitudinal control to enable this. - + Disengage On Accelerator Pedal 踩油门时取消控制 diff --git a/selfdrive/ui/translations/main_zh-CHT.ts b/selfdrive/ui/translations/main_zh-CHT.ts index 022d41be81..364508bd1c 100644 --- a/selfdrive/ui/translations/main_zh-CHT.ts +++ b/selfdrive/ui/translations/main_zh-CHT.ts @@ -985,42 +985,42 @@ location set Updates are only downloaded while the car is off. - + 系統更新只會在熄火時下載。 Current Version - + 當前版本 Download - + 下載 Install Update - + 安裝更新 INSTALL - + 安裝 Target Branch - + 目標分支 SELECT - + 選取 Select a branch - + 選取一個分支 @@ -1169,25 +1169,35 @@ location set 🌮 End-to-end longitudinal (extremely alpha) 🌮 - + 🌮 端對端縱向控制(實驗性功能) 🌮 Experimental openpilot longitudinal control - + 使用 openpilot 縱向控制(實驗) <b>WARNING: openpilot longitudinal control is experimental for this car and will disable AEB.</b> - + <b>注意:這台車的 openpilot 縱向控制仍然是實驗中的功能,開啟這功能將會關閉自動緊急煞車 (AEB)。</b> Let the driving model control the gas and brakes. openpilot will drive as it thinks a human would. Super experimental. - + 讓駕駛模型直接控製油門和剎車,openpilot將會模仿人類司機的駕駛方式。該功能仍非常實驗性。 + + + + openpilot longitudinal control is not currently available for this car. + openpilot 縱向控制目前不適用於這輛車。 + + + + Enable experimental longitudinal control to enable this. + 打開縱向控制(實驗)以啟用此功能。 - + Disengage On Accelerator Pedal 油門取消控車