This commit is contained in:
Kumar
2024-09-09 15:39:25 -07:00
committed by GitHub
parent 143ac94ba9
commit 0b4170dcc2
3 changed files with 15 additions and 18 deletions
+6 -4
View File
@@ -178,12 +178,14 @@ class CarInterface(CarInterfaceBase):
tune = ret.longitudinalTuning
if candidate in TSS2_CAR or ret.enableGasInterceptorDEPRECATED:
if sp_tss2_long_tune:
tune.kiBP = [0., 1., 8., 12., 20., 27., 40.]
tune.kiV = [.35, .3162, .1965, .1965, .184, .101, .06]
tune.kiBP = [0., 5., 12., 20., 27., 40.]
tune.kiV = [.35, .2286, .2086, .1716, .10, .06]
#tune.kiBP = [0., 1., 8., 12., 20., 27., 40.]
#tune.kiV = [.35, .3168, .1965, .1965, .184, .101, .06]
custom_tss2_longitudinal_tuning()
else:
tune.kiBP = [5., 35.]
tune.kiV = [1.5, 0.5]
tune.kpBP = [0., 5., 20.]
tune.kpV = [2.3, 1.0, 0.7]
if candidate in TSS2_CAR:
default_tss2_longitudinal_tuning()
else:
@@ -55,7 +55,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 = 6.0
STOP_DISTANCE = 5.0
def get_jerk_factor(personality=custom.LongitudinalPersonalitySP.standard):
if personality==custom.LongitudinalPersonalitySP.relaxed:
@@ -29,20 +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 = [-1.0, -1.0]
#_DP_CRUISE_MIN_V_ECO = [-1.0, -1.0]
#_DP_CRUISE_MIN_V_SPORT = [-1.0, -1.0]
#_DP_CRUISE_MIN_BP = [0., 40.]
_DP_CRUISE_MIN_V = [-0.45, -0.45, -0.25, -0.25, -0.38, -0.38, -1.00]
_DP_CRUISE_MIN_V_ECO = [-0.40, -0.40, -0.20, -0.20, -0.36, -0.36, -1.00]
_DP_CRUISE_MIN_V_SPORT = [-0.50, -0.50, -0.30, -0.30, -0.42, -0.42, -1.00]
_DP_CRUISE_MIN_BP = [0., 0.05, 3.12, 10., 10.01, 20., 30., 55.]
#_DP_CRUISE_MIN_V = [-0.95, -0.95, -0.45, -0.45, -0.50, -0.50, -1.00, -1.00, -1.00, -1.00, -1.00, -1.00, -1.0, -1.0]
#_DP_CRUISE_MIN_V_ECO = [-0.90, -0.90, -0.40, -0.40, -0.40, -0.40, -1.00, -1.00, -1.00, -1.00, -1.00, -1.00, -1.0, -1.0]
#_DP_CRUISE_MIN_V_SPORT = [-1.00, -1.00, -0.50, -0.50, -0.60, -0.60, -1.00, -1.00, -1.00, -1.00, -1.00, -1.00, -1.0, -1.0]
#_DP_CRUISE_MIN_BP = [0., 5.0, 5.01, 8.0, 8.01, 12.10, 12.11, 16., 16.01, 20., 20.01, 25., 25.01, 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_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_ECO = [2.0, 1.9, 1.60, 0.89, .55, .45, .32, .09]