diff --git a/selfdrive/car/toyota/interface.py b/selfdrive/car/toyota/interface.py index 37b4f2a0f4..3d0ca96ef1 100644 --- a/selfdrive/car/toyota/interface.py +++ b/selfdrive/car/toyota/interface.py @@ -162,8 +162,8 @@ class CarInterface(CarInterfaceBase): # hand tuned (July 1, 2024) def custom_tss2_longitudinal_tuning(): - ret.vEgoStopping = 0.001 - ret.vEgoStarting = 0.001 + ret.vEgoStopping = 0.25 + ret.vEgoStarting = 0.25 ret.stoppingDecelRate = 0.0074 def default_tss2_longitudinal_tuning(): @@ -182,7 +182,7 @@ class CarInterface(CarInterfaceBase): #tune.kiV = [0.34, 0.35, 0.2896, 0.2237, 0.174, 0.10, 0.08, 0.06] #smooth tune.kiBP = [0., 5., 12., 20., 27., 36., 50] - tune.kiV = [0.33, 0.205, 0.20, 0.17, 0.12, 0.08, 0.06] + tune.kiV = [0.35, 0.23, 0.20, 0.17, 0.12, 0.08, 0.06] #tune.kiBP = [0., 2., 5., 12., 16, 20., 27., 36., 50] #tune.kiV = [0.27, 0.24, 0.2205, 0.20, 0.18, 0.17, 0.12, 0.08, 0.06] custom_tss2_longitudinal_tuning() diff --git a/selfdrive/controls/lib/longitudinal_mpc_lib/long_mpc.py b/selfdrive/controls/lib/longitudinal_mpc_lib/long_mpc.py index c288ac6654..a08c66bb6a 100755 --- a/selfdrive/controls/lib/longitudinal_mpc_lib/long_mpc.py +++ b/selfdrive/controls/lib/longitudinal_mpc_lib/long_mpc.py @@ -56,7 +56,7 @@ T_IDXS = np.array(T_IDXS_LST) FCW_IDXS = T_IDXS < 5.0 T_DIFFS = np.diff(T_IDXS, prepend=[0.]) COMFORT_BRAKE = 2.5 -STOP_DISTANCE = 3.0 +STOP_DISTANCE = 6.0 def get_jerk_factor(personality=custom.LongitudinalPersonalitySP.standard): if personality==custom.LongitudinalPersonalitySP.relaxed: @@ -66,7 +66,7 @@ def get_jerk_factor(personality=custom.LongitudinalPersonalitySP.standard): elif personality==custom.LongitudinalPersonalitySP.moderate: return 0.8 elif personality==custom.LongitudinalPersonalitySP.aggressive: - return 0.6 + return 0.65 else: raise NotImplementedError("Longitudinal personality not supported") @@ -86,17 +86,17 @@ def get_T_FOLLOW(personality=custom.LongitudinalPersonalitySP.standard): def get_dynamic_personality(v_ego, personality=custom.LongitudinalPersonalitySP.standard): if personality==custom.LongitudinalPersonalitySP.relaxed: - x_vel = [0, 11, 14.5, 15, 20, 20.01, 25, 25.01, 36, 36.01] - y_dist = [1.5, 1.5, 1.5, 1.6, 1.76, 1.76, 1.78, 1.78, 1.8, 1.8] + x_vel = [0, 20., 27.7] + y_dist = [1.75, 1.75, 2.00] elif personality==custom.LongitudinalPersonalitySP.standard: - x_vel = [0, 5, 5.01, 8.33, 8.34, 11.1, 11.11, 19.99, 20, 36] - y_dist = [0.65, 0.65, 0.87, 0.87, 1.09, 1.09, 1.25, 1.25, 1.65, 1.65] + x_vel = [0, 20., 27.7] + y_dist = [1.75, 1.75, 2.00] elif personality==custom.LongitudinalPersonalitySP.moderate: - x_vel = [0, 5, 5.01, 8.33, 8.34, 11.1, 11.11, 20, 20.01, 36] - y_dist = [0.64, 0.64, 0.85, 0.85, 1.04, 1.04, 1.20, 1.20, 1.40, 1.40] + x_vel = [0, 20., 27.7] + y_dist = [1.45, 1.45, 1.60] elif personality==custom.LongitudinalPersonalitySP.aggressive: - x_vel = [0, 5, 5.01, 8.33, 8.34, 11.1, 11.11, 15, 17, 20, 20.01, 25, 25.01, 36, 36.01] - y_dist = [0.63, 0.53, 0.83, 0.83, 1.00, 1.00, 1.15, 1.15, 1.16, 1.24, 1.25, 1.25, 1.25, 1.25, 1.25] + x_vel = [0, 20., 27.7] + y_dist = [1.28, 1.28, 1.35] else: raise NotImplementedError("Dynamic personality not supported") return np.interp(v_ego, x_vel, y_dist) diff --git a/selfdrive/controls/lib/sunnypilot/accel_controller.py b/selfdrive/controls/lib/sunnypilot/accel_controller.py index c44439e9d9..df3eb3b45f 100644 --- a/selfdrive/controls/lib/sunnypilot/accel_controller.py +++ b/selfdrive/controls/lib/sunnypilot/accel_controller.py @@ -29,10 +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.045, -0.045, -0.201, -0.201, -0.430, -0.430, -0.66, -0.66, -0.82] -_DP_CRUISE_MIN_V_ECO = [-0.04, -0.04, -0.200, -0.200, -0.425, -0.425, -0.64, -0.64, -0.80] -_DP_CRUISE_MIN_V_SPORT = [-0.05, -0.05, -0.204, -0.204, -0.445, -0.445, -0.68, -0.68, -0.84] -_DP_CRUISE_MIN_BP = [0., 5.00, 5.01, 17., 17.01, 27.77, 27.78, 33., 33.01] +_DP_CRUISE_MIN_V = [-1.0, -1.0, -0.76] +_DP_CRUISE_MIN_V_ECO = [-1.0, -1.0, -0.74] +_DP_CRUISE_MIN_V_SPORT = [-1.0, -1.0, -0.78] +_DP_CRUISE_MIN_BP = [0., 11.1, 20.] + +#_DP_CRUISE_MIN_V = [-0.045, -0.045, -0.201, -0.201, -0.430, -0.430, -0.66, -0.66, -0.82] +#_DP_CRUISE_MIN_V_ECO = [-0.04, -0.04, -0.200, -0.200, -0.425, -0.425, -0.64, -0.64, -0.80] +#_DP_CRUISE_MIN_V_SPORT = [-0.05, -0.05, -0.204, -0.204, -0.445, -0.445, -0.68, -0.68, -0.84] +#_DP_CRUISE_MIN_BP = [0., 5.00, 5.01, 17., 17.01, 27.77, 27.78, 33., 33.01] _DP_CRUISE_MAX_V = [2.0, 2.0, 2.0, 1.68, 1.07, .72, .53, .42, .13] _DP_CRUISE_MAX_V_ECO = [2.0, 2.0, 2.0, 1.38, 0.91, .53, .42, .31, .085] _DP_CRUISE_MAX_V_SPORT = [2.0, 2.0, 2.0, 2.00, 1.34, .96, .78, .60, .4]