From e2b3eb2aba830924e5e682189abd8d6e98c683a9 Mon Sep 17 00:00:00 2001 From: Kumar <36933347+rav4kumar@users.noreply.github.com> Date: Thu, 31 Oct 2024 07:38:04 -0700 Subject: [PATCH] ff --- selfdrive/car/toyota/interface.py | 4 ++-- selfdrive/controls/lib/longitudinal_mpc_lib/long_mpc.py | 3 +-- selfdrive/controls/lib/sunnypilot/accel_controller.py | 8 ++++---- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/selfdrive/car/toyota/interface.py b/selfdrive/car/toyota/interface.py index ddb19dcbd7..3f599d779b 100644 --- a/selfdrive/car/toyota/interface.py +++ b/selfdrive/car/toyota/interface.py @@ -178,8 +178,8 @@ class CarInterface(CarInterfaceBase): tune = ret.longitudinalTuning if candidate in TSS2_CAR or ret.enableGasInterceptorDEPRECATED: if sp_tss2_long_tune: - tune.kiBP = [0., 5., 12., 20., 27.] - tune.kiV = [0.35, 0.23, 0.20, 0.17, 0.10] + tune.kiBP = [0., 3., 4., 5., 12., 20., 27.] + tune.kiV = [0.35, 0.26, 0.245, 0.23, 0.20, 0.17, 0.10] custom_tss2_longitudinal_tuning() else: tune.kpV = [0.0] diff --git a/selfdrive/controls/lib/longitudinal_mpc_lib/long_mpc.py b/selfdrive/controls/lib/longitudinal_mpc_lib/long_mpc.py index 970d74da34..17e1b769c3 100755 --- a/selfdrive/controls/lib/longitudinal_mpc_lib/long_mpc.py +++ b/selfdrive/controls/lib/longitudinal_mpc_lib/long_mpc.py @@ -173,7 +173,6 @@ def get_dynamic_personality(v_ego, personality=custom.LongitudinalPersonalitySP. raise NotImplementedError("Dynamic personality not supported") return np.interp(v_ego, x_vel, y_dist) - def get_stopped_equivalence_factor(v_lead): return (v_lead**2) / (2 * COMFORT_BRAKE) @@ -572,4 +571,4 @@ class LongitudinalMpc: if __name__ == "__main__": ocp = gen_long_ocp() AcadosOcpSolver.generate(ocp, json_file=JSON_FILE) - # AcadosOcpSolver.build(ocp.code_export_directory, with_cython=True) + # AcadosOcpSolver.build(ocp.code_export_directory, with_cython=True) \ No newline at end of file diff --git a/selfdrive/controls/lib/sunnypilot/accel_controller.py b/selfdrive/controls/lib/sunnypilot/accel_controller.py index 31565565ef..fb4a9e6002 100644 --- a/selfdrive/controls/lib/sunnypilot/accel_controller.py +++ b/selfdrive/controls/lib/sunnypilot/accel_controller.py @@ -29,10 +29,10 @@ from openpilot.common.numpy_fast import interp AccelPersonality = custom.AccelerationPersonality # accel personality by @arne182 modified by cgw and kumar -_DP_CRUISE_MIN_V = [-0.03, -1.00, -1.0, -1.0] -_DP_CRUISE_MIN_V_ECO = [-0.02, -1.00, -1.0, -1.0] -_DP_CRUISE_MIN_V_SPORT = [-0.04, -1.00, -1.0, -1.0] -_DP_CRUISE_MIN_BP = [0., 15.99, 16., 20.] +_DP_CRUISE_MIN_V = [-0.03, -0.03, -0.3, -0.3, -1.0, -1.0] +_DP_CRUISE_MIN_V_ECO = [-0.02, -0.02, -0.2, -0.2, -1.0, -1.0] +_DP_CRUISE_MIN_V_SPORT = [-0.04, -0.04, -0.4, -0.4, -1.0, -1.0] +_DP_CRUISE_MIN_BP = [0., 5.55, 5.56, 12., 12.01, 20.] _DP_CRUISE_MAX_V = [2.0, 2.0, 2.0, 1.80, 1.03, .62, .47, .36, .11] _DP_CRUISE_MAX_V_ECO = [2.0, 2.0, 2.0, 1.65, 0.92, .532, .432, .32, .095]