This commit is contained in:
rav4kumar
2024-09-13 07:49:28 -07:00
parent 17a20291e2
commit 404148cb3c
3 changed files with 13 additions and 13 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., 40.]
tune.kiV = [.35, .2286, .2086, .1716, .10, .06]
tune.kiBP = [0., 5., 12., 20., 27., 40.]
tune.kiV = [.35, .23, .20, .17, .10, .06]
#tune.kiBP = [0., 1., 8., 12., 20., 27., 40.]
#tune.kiV = [.35, .3168, .1965, .1965, .184, .101, .06]
custom_tss2_longitudinal_tuning()
@@ -61,11 +61,11 @@ def get_jerk_factor(personality=custom.LongitudinalPersonalitySP.standard):
if personality==custom.LongitudinalPersonalitySP.relaxed:
return 1.0
elif personality==custom.LongitudinalPersonalitySP.standard:
return 0.8
elif personality==custom.LongitudinalPersonalitySP.moderate:
return 0.5
elif personality==custom.LongitudinalPersonalitySP.aggressive:
elif personality==custom.LongitudinalPersonalitySP.moderate:
return 0.3
elif personality==custom.LongitudinalPersonalitySP.aggressive:
return 0.2
elif personality==custom.LongitudinalPersonalitySP.overtake:
return 0.1
else:
@@ -98,8 +98,8 @@ def get_dynamic_personality(v_ego, personality=custom.LongitudinalPersonalitySP.
x_vel = [0, 5., 5.01, 8.33, 8.34, 27.69, 27.7]
y_dist = [0.0, 1.4, 1.4, 1.4, 1.45, 1.45, 1.50]
elif personality==custom.LongitudinalPersonalitySP.aggressive:
x_vel = [0, 5., 5.01, 17.0, 17.01, 27.69, 27.7]
y_dist = [0.0, 1.2, 1.2, 1.2, 1.25, 1.25, 1.3]
x_vel = [0, 5., 5.01, 17.0, 17.01, 27.69, 27.7]
y_dist = [0.0, 1.2, 1.2, 1.2, 1.25, 1.25, 1.3]
else:
raise NotImplementedError("Dynamic personality not supported")
return np.interp(v_ego, x_vel, y_dist)
@@ -29,18 +29,18 @@ from openpilot.common.numpy_fast import interp
AccelPersonality = custom.AccelerationPersonality
# accel personality by @arne182 modified by cgw and kumar
_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_MIN_V = [-0.018, -0.28, -0.76, -0.76]
_DP_CRUISE_MIN_V_ECO = [-0.018, -0.26, -0.74, -0.74]
_DP_CRUISE_MIN_V_SPORT = [-0.018, -0.30, -0.78, -0.78]
_DP_CRUISE_MIN_BP = [0., 8.0, 16., 30.]
#_DP_CRUISE_MIN_V = [-0.09, -0.09, -0.09, -0.09, -0.20, -0.20, -0.35, -0.35, -0.54, -0.54, -0.79, -0.79, -1.0, -1.0]
#_DP_CRUISE_MIN_V_ECO = [-0.08, -0.08, -0.08, -0.08, -0.19, -0.19, -0.34, -0.34, -0.52, -0.52, -0.78, -0.78, -1.0, -1.0]
#_DP_CRUISE_MIN_V_SPORT = [-0.10, -0.10, -0.10, -0.10, -0.21, -0.21, -0.36, -0.36, -0.56, -0.56, -0.80, -0.80, -1.0, -1.0]
#_DP_CRUISE_MIN_BP = [0., 4.0, 4.01, 7.0, 7.01, 12., 12.01, 16., 16.01, 20., 20.01, 25., 25.01, 30.]
_DP_CRUISE_MAX_V = [2.0, 2.0, 1.75, 0.96, .64, .54, .38, .17]
_DP_CRUISE_MAX_V = [2.0, 2.0, 1.75, 0.95, .63, .51, .36, .17]
_DP_CRUISE_MAX_V_ECO = [2.0, 1.9, 1.60, 0.89, .55, .45, .32, .09]
_DP_CRUISE_MAX_V_SPORT = [2.0, 2.0, 1.95, 1.15, .84, .70, .50, .30]
_DP_CRUISE_MAX_V_SPORT = [2.0, 2.0, 1.95, 1.10, .84, .70, .50, .30]
_DP_CRUISE_MAX_BP = [0., 6.0, 8., 11., 20., 25., 30., 40.]