This commit is contained in:
Kumar
2024-10-31 07:38:04 -07:00
committed by GitHub
parent b218cd07c4
commit e2b3eb2aba
3 changed files with 7 additions and 8 deletions
+2 -2
View File
@@ -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]
@@ -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)
@@ -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]