From a0cdacbb2ad6a26012ca374723539e838488dcc5 Mon Sep 17 00:00:00 2001 From: HaraldSchafer Date: Thu, 18 Feb 2021 17:16:20 -0800 Subject: [PATCH] Do not allow engagement outside of training distribution (#20112) * higher is out of the training distribution * Update RELEASES.md * Update RELEASES.md Co-authored-by: Adeeb Shihadeh Co-authored-by: Adeeb Shihadeh --- RELEASES.md | 1 + selfdrive/car/interfaces.py | 2 +- selfdrive/controls/lib/drive_helpers.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/RELEASES.md b/RELEASES.md index b57193105..22b5609c0 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -3,6 +3,7 @@ Version 0.8.2 (2021-XX-XX) * Use model points directly in MPC (no more polyfits), this makes lateral planning more accurate * Use model heading prediction for smoother lateral control * Smarter actuator delay compensation + * Adjust maximum engagement speed to better fit the model's training distribution * Audi A3 2015 support thanks to keeleysam! * Lexus ES Hybrid 2018 support thanks to TheInventorMan! * Toyota Camry Hybrid 2021 support thanks to alancyau! diff --git a/selfdrive/car/interfaces.py b/selfdrive/car/interfaces.py index e49817e15..4d2de08e8 100644 --- a/selfdrive/car/interfaces.py +++ b/selfdrive/car/interfaces.py @@ -13,7 +13,7 @@ from selfdrive.controls.lib.vehicle_model import VehicleModel GearShifter = car.CarState.GearShifter EventName = car.CarEvent.EventName -MAX_CTRL_SPEED = (V_CRUISE_MAX + 4) * CV.KPH_TO_MS # 144 + 4 = 92 mph +MAX_CTRL_SPEED = (V_CRUISE_MAX + 4) * CV.KPH_TO_MS # 135 + 4 = 86 mph # generic car and radar interfaces diff --git a/selfdrive/controls/lib/drive_helpers.py b/selfdrive/controls/lib/drive_helpers.py index a9d8a774c..ba433066d 100644 --- a/selfdrive/controls/lib/drive_helpers.py +++ b/selfdrive/controls/lib/drive_helpers.py @@ -3,7 +3,7 @@ from selfdrive.config import Conversions as CV from cereal import car # kph -V_CRUISE_MAX = 144 +V_CRUISE_MAX = 135 V_CRUISE_MIN = 8 V_CRUISE_DELTA = 8 V_CRUISE_ENABLE_MIN = 40