From 2f8a6796a230bd2afabdfd9e1342257cde988718 Mon Sep 17 00:00:00 2001 From: rav4kumar Date: Wed, 25 Sep 2024 07:36:32 -0700 Subject: [PATCH] fine tune --- selfdrive/car/toyota/interface.py | 6 +++--- .../lib/longitudinal_mpc_lib/long_mpc.py | 4 ++-- .../lib/sunnypilot/accel_controller.py | 20 ++++++++----------- 3 files changed, 13 insertions(+), 17 deletions(-) diff --git a/selfdrive/car/toyota/interface.py b/selfdrive/car/toyota/interface.py index f65a3d61fc..4a141346db 100644 --- a/selfdrive/car/toyota/interface.py +++ b/selfdrive/car/toyota/interface.py @@ -171,9 +171,9 @@ class CarInterface(CarInterfaceBase): ret.stoppingDecelRate = 0.002 # reach stopping target smoothly def default_tss2_longitudinal_tuning(): - ret.vEgoStopping = 0.25 - ret.vEgoStarting = 0.25 - ret.stoppingDecelRate = 0.3 # reach stopping target smoothly + ret.vEgoStopping = 0.015 + ret.vEgoStarting = 0.01 + ret.stoppingDecelRate = 0.5 # reach stopping target smoothly def default_longitudinal_tuning(): tune.kiBP = [0., 5., 35.] diff --git a/selfdrive/controls/lib/longitudinal_mpc_lib/long_mpc.py b/selfdrive/controls/lib/longitudinal_mpc_lib/long_mpc.py index 5aafcc4c2b..228c968a23 100755 --- a/selfdrive/controls/lib/longitudinal_mpc_lib/long_mpc.py +++ b/selfdrive/controls/lib/longitudinal_mpc_lib/long_mpc.py @@ -63,9 +63,9 @@ def get_jerk_factor(personality=custom.LongitudinalPersonalitySP.standard): elif personality==custom.LongitudinalPersonalitySP.standard: return 1.0 elif personality==custom.LongitudinalPersonalitySP.moderate: - return 0.5 + return 1.0 elif personality==custom.LongitudinalPersonalitySP.aggressive: - return 0.2 + return 0.5 elif personality==custom.LongitudinalPersonalitySP.overtake: return 0.1 else: diff --git a/selfdrive/controls/lib/sunnypilot/accel_controller.py b/selfdrive/controls/lib/sunnypilot/accel_controller.py index 2c57c4c344..e30b67bdc6 100644 --- a/selfdrive/controls/lib/sunnypilot/accel_controller.py +++ b/selfdrive/controls/lib/sunnypilot/accel_controller.py @@ -29,19 +29,15 @@ from openpilot.common.numpy_fast import interp AccelPersonality = custom.AccelerationPersonality # accel personality by @arne182 modified by cgw and kumar -_DP_CRUISE_MIN_V = [-0.08, -0.08, -0.11, -0.11, -0.16, -0.16, -0.46, -1.0, -1.2] -_DP_CRUISE_MIN_V_ECO = [-0.07, -0.07, -0.10, -0.10, -0.15, -0.15, -0.45, -1.0, -1.2] -_DP_CRUISE_MIN_V_SPORT = [-0.09, -0.09, -0.12, -0.12, -0.17, -0.17, -0.47, -1.0, -1.2] -_DP_CRUISE_MIN_BP = [0., 0.05, 0.06, 8.0, 8.01, 12., 18., 25., 30.] +_DP_CRUISE_MIN_V = [-0.12, -0.12, -0.08, -0.08, -0.14, -0.14, -0.16, -0.16, -0.24, -0.24, -0.38, -0.38, -1.0, -1.0, -1.15] +_DP_CRUISE_MIN_V_ECO = [-0.11, -0.11, -0.07, -0.07, -0.13, -0.13, -0.15, -0.15, -0.23, -0.23, -0.36, -0.36, -1.0, -1.0, -1.10] +_DP_CRUISE_MIN_V_SPORT = [-0.13, -0.13, -0.09, -0.09, -0.15, -0.15, -0.17, -0.17, -0.25, -0.25, -0.42, -0.42, -1.0, -1.0, -1.20] +_DP_CRUISE_MIN_BP = [0., 0.08, 0.09, 2.77, 2.78, 8.33, 8.34, 13.88, 13.89, 19.44, 19.45, 25.00, 25.01, 30.55, 30.56] +#_DP_CRUISE_MIN_BP in kph[0., 0.3, 0.3, 10, 10, 30, 30, 50, 50, 70, 70, 90, 90, 110, >110] -#_DP_CRUISE_MIN_V = [-0.020, -0.020, -0.23, -0.23, -0.38, -0.38, -1.00] -#_DP_CRUISE_MIN_V_ECO = [-0.019, -0.019, -0.21, -0.21, -0.36, -0.36, -1.00] -#_DP_CRUISE_MIN_V_SPORT = [-0.022, -0.022, -0.25, -0.25, -0.40, -0.40, -1.00] -#_DP_CRUISE_MIN_BP = [0., 0.05, 3.12, 10., 10.01, 20., 30.] - -_DP_CRUISE_MAX_V = [2.0, 2.0, 1.75, 0.96, .65, .54, .38, .17] -_DP_CRUISE_MAX_V_ECO = [2.0, 1.95, 1.66, 0.91, .58, .46, .32, .09] -_DP_CRUISE_MAX_V_SPORT = [2.0, 2.0, 1.95, 1.15, .84, .70, .50, .30] +_DP_CRUISE_MAX_V = [2.0, 2.0, 1.75, 0.96, .65, .54, .38, .17] +_DP_CRUISE_MAX_V_ECO = [2.0, 1.96, 1.66, 0.91, .58, .46, .32, .09] +_DP_CRUISE_MAX_V_SPORT = [2.0, 2.0, 1.95, 1.15, .84, .70, .50, .30] _DP_CRUISE_MAX_BP = [0., 6.0, 8., 11., 20., 25., 30., 40.]