mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-10-01 06:03:43 +08:00
prius glides tunes
This commit is contained in:
@@ -162,9 +162,9 @@ class CarInterface(CarInterfaceBase):
|
||||
|
||||
# hand tuned (July 1, 2024)
|
||||
def custom_tss2_longitudinal_tuning():
|
||||
ret.vEgoStopping = 0.01
|
||||
ret.vEgoStarting = 0.01
|
||||
ret.stoppingDecelRate = 0.35
|
||||
ret.vEgoStopping = 0.001
|
||||
ret.vEgoStarting = 0.001
|
||||
ret.stoppingDecelRate = 0.0074
|
||||
|
||||
def default_tss2_longitudinal_tuning():
|
||||
ret.vEgoStopping = 0.25
|
||||
@@ -178,8 +178,13 @@ 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., 36., 50]
|
||||
tune.kiV = [0.35, 0.23, 0.20, 0.17, 0.10, 0.07, 0.01]
|
||||
#tune.kiBP = [0., 0.1, 3., 12., 20., 26., 36., 50]
|
||||
#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.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()
|
||||
else:
|
||||
tune.kpV = [0.0]
|
||||
|
||||
@@ -89,17 +89,16 @@ def get_dynamic_personality(v_ego, personality=custom.LongitudinalPersonalitySP.
|
||||
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]
|
||||
elif personality==custom.LongitudinalPersonalitySP.standard:
|
||||
x_vel = [0, 11, 14.5, 15, 20, 20.01, 25, 25.01, 36, 36.01]
|
||||
y_dist = [1.40, 1.40, 1.40, 1.50, 1.60, 1.76, 1.76, 1.78, 1.8, 1.8]
|
||||
x_vel = [0, 15, 20, 20.01, 25, 25.01, 36, 36.01]
|
||||
y_dist = [1.52, 1.50, 1.60, 1.76, 1.76, 1.78, 1.8, 1.8]
|
||||
elif personality==custom.LongitudinalPersonalitySP.moderate:
|
||||
x_vel = [0, 11, 14.5, 15, 20, 20.01, 25, 25.01, 36, 36.01]
|
||||
y_dist = [1.3, 1.3, 1.3, 1.35, 1.35, 1.385, 1.385, 1.4, 1.4, 1.45]
|
||||
x_vel = [0, 20, 20.01, 25, 25.01, 36, 36.01]
|
||||
y_dist = [1.32, 1.30, 1.385, 1.385, 1.4, 1.4, 1.45]
|
||||
elif personality==custom.LongitudinalPersonalitySP.aggressive:
|
||||
x_vel = [0, 5, 5.01, 11, 14.5, 15, 20, 20.01, 25, 25.01, 36, 36.01]
|
||||
y_dist = [1.12, 1.12, 1.12, 1.12, 1.12, 1.105, 1.105, 1.15, 1.15, 1.18, 1.20, 1.23]
|
||||
x_vel = [0, 5, 5.01, 15, 17, 20, 20.01, 25, 25.01, 36, 36.01]
|
||||
y_dist = [0.81, 0.80, 1.16, 1.15, 1.16, 1.24, 1.25, 1.25, 1.25, 1.25, 1.25]
|
||||
else:
|
||||
raise NotImplementedError("Dynamic personality not supported")
|
||||
|
||||
return np.interp(v_ego, x_vel, y_dist)
|
||||
|
||||
# multiplier for A_CHANGE_COST = 200.
|
||||
|
||||
@@ -29,14 +29,14 @@ from openpilot.common.numpy_fast import interp
|
||||
AccelPersonality = custom.AccelerationPersonality
|
||||
|
||||
# accel personality by @arne182 modified by cgw
|
||||
_DP_CRUISE_MIN_V = [-1.03, -0.79, -0.77, -0.77, -0.75, -0.75, -0.88, -0.82]
|
||||
_DP_CRUISE_MIN_V_ECO = [-1.02, -0.78, -0.75, -0.75, -0.73, -0.73, -0.80, -0.80]
|
||||
_DP_CRUISE_MIN_V_SPORT = [-1.04, -0.81, -0.79, -0.79, -0.77, -0.77, -0.90, -0.84]
|
||||
_DP_CRUISE_MIN_BP = [0., 0.05, 0.1, 0.5, 8.33, 16., 30., 40.]
|
||||
_DP_CRUISE_MIN_V = [-0.07, -0.08, -0.20, -0.20, -0.27, -0.88, -0.82]
|
||||
_DP_CRUISE_MIN_V_ECO = [-0.07, -0.07, -0.18, -0.18, -0.26, -0.80, -0.80]
|
||||
_DP_CRUISE_MIN_V_SPORT = [-0.07, -0.09, -0.22, -0.22, -0.28, -0.90, -0.84]
|
||||
_DP_CRUISE_MIN_BP = [0., 5.55, 5.56, 17., 20.01, 30.01, 33.]
|
||||
|
||||
_DP_CRUISE_MAX_V = [2.5, 2.5, 2.5, 1.70, 1.05, .81, .625, .42, .348, .12]
|
||||
_DP_CRUISE_MAX_V_ECO = [2.0, 2.0, 2.0, 1.4, .80, .68, .53, .32, .20, .085]
|
||||
_DP_CRUISE_MAX_V_SPORT = [3.5, 3.5, 2.8, 2.4, 1.4, 1.0, .89, .75, .50, .2]
|
||||
_DP_CRUISE_MAX_V = [3.0, 3.0, 3.0, 2.1, 1.2, .86, .70, .51, .42, .13]
|
||||
_DP_CRUISE_MAX_V_ECO = [2.4, 2.4, 2.4, 1.8, .93, .72, .53, .42, .31, .085]
|
||||
_DP_CRUISE_MAX_V_SPORT = [3.5, 3.5, 3.4, 2.6, 1.8, 1.1, .96, .78, .60, .4]
|
||||
_DP_CRUISE_MAX_BP = [0., 1., 6., 8., 11., 15., 20., 25., 30., 55.]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user