From cf3c8cd3010e2b2f92fb1389046f58ec3a3e22ef Mon Sep 17 00:00:00 2001 From: Harald Schafer Date: Wed, 8 Dec 2021 17:13:43 -0800 Subject: [PATCH] fix max speed comments old-commit-hash: 44adea73ce2281cd0d0117c7ef6d1609031be2b9 --- selfdrive/car/interfaces.py | 4 +--- selfdrive/controls/lib/drive_helpers.py | 9 +++++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/selfdrive/car/interfaces.py b/selfdrive/car/interfaces.py index 487fcab8c7..bef3456a76 100644 --- a/selfdrive/car/interfaces.py +++ b/selfdrive/car/interfaces.py @@ -14,9 +14,7 @@ from selfdrive.controls.lib.vehicle_model import VehicleModel GearShifter = car.CarState.GearShifter EventName = car.CarEvent.EventName -# WARNING: this value was determined based on the model's training distribution, -# model predictions above this speed can be unpredictable -MAX_CTRL_SPEED = (V_CRUISE_MAX + 4) * CV.KPH_TO_MS # 135 + 4 = 86 mph +MAX_CTRL_SPEED = (V_CRUISE_MAX + 4) * CV.KPH_TO_MS ACCEL_MAX = 2.0 ACCEL_MIN = -3.5 diff --git a/selfdrive/controls/lib/drive_helpers.py b/selfdrive/controls/lib/drive_helpers.py index e578bd677f..f173f5fd98 100644 --- a/selfdrive/controls/lib/drive_helpers.py +++ b/selfdrive/controls/lib/drive_helpers.py @@ -5,10 +5,11 @@ from common.realtime import DT_MDL from selfdrive.config import Conversions as CV from selfdrive.modeld.constants import T_IDXS -# kph -V_CRUISE_MAX = 145 -V_CRUISE_MIN = 8 -V_CRUISE_ENABLE_MIN = 40 +# WARNING: this value was determined based on the model's training distribution, +# model predictions above this speed can be unpredictable +V_CRUISE_MAX = 145 # kph +V_CRUISE_MIN = 8 # kph +V_CRUISE_ENABLE_MIN = 40 # kph LAT_MPC_N = 16 LON_MPC_N = 32