low speed

This commit is contained in:
Kumar
2024-10-09 07:45:52 -07:00
committed by GitHub
parent 7efe3a8dd9
commit 6c51680da8
3 changed files with 16 additions and 16 deletions
+5 -5
View File
@@ -163,12 +163,12 @@ class CarInterface(CarInterfaceBase):
# hand tuned (August 12, 2024)
def custom_tss2_longitudinal_tuning():
ret.vEgoStopping = 0.25
ret.vEgoStarting = 0.12
ret.stoppingDecelRate = 0.003
ret.vEgoStarting = 0.15
ret.stoppingDecelRate = 0.002
def default_tss2_longitudinal_tuning():
ret.vEgoStopping = 0.25
ret.vEgoStarting = 0.20
ret.vEgoStarting = 0.15
ret.stoppingDecelRate = 0.006 # reach stopping target smoothly
def default_longitudinal_tuning():
@@ -182,8 +182,8 @@ class CarInterface(CarInterfaceBase):
#tune.kiV = [0.1, 0.12, 0.08, 0.06, 0.5, 1.0]
#tune.kpBP = [0., 5., 20.]
#tune.kpV = [2.3, 1.0, 0.7]
tune.kiBP = [0., 2., 8., 12., 20., 27., 36., 40.]
tune.kiV = [0.345, 0.276, 0.216, 0.21, 0.173, 0.10, 0.09, 0.08]
tune.kiBP = [0., 2., 5., 12., 20., 27., 36., 40.]
tune.kiV = [0.351, 0.318, 0.236, 0.21, 0.173, 0.10, 0.09, 0.08]
custom_tss2_longitudinal_tuning()
else:
tune.kpV = [0.0]
@@ -89,17 +89,17 @@ def get_T_FOLLOW(personality=custom.LongitudinalPersonalitySP.standard):
def get_dynamic_personality(v_ego, personality=custom.LongitudinalPersonalitySP.standard):
if personality==custom.LongitudinalPersonalitySP.relaxed:
x_vel = [0., 11.9, 12., 14., 16., 22., 22.01, 36.1]
y_dist = [1.6, 1.6, 1.61, 1.61, 1.6, 1.6, 1.80, 1.80]
x_vel = [0., 22., 22.01, 36.1]
y_dist = [1.70, 1.70, 1.80, 1.80]
elif personality==custom.LongitudinalPersonalitySP.standard:
x_vel = [0., 11.9, 12., 14., 16., 22., 22.01, 36.1]
y_dist = [1.5, 1.5, 1.51, 1.51, 1.5, 1.5, 1.60, 1.60]
x_vel = [0., 22., 22.01, 36.1]
y_dist = [1.50, 1.50, 1.65, 1.65]
elif personality==custom.LongitudinalPersonalitySP.moderate:
x_vel = [0., 11.9, 12., 14., 16., 22., 22.01, 36.1]
y_dist = [1.4, 1.4, 1.41, 1.41, 1.4, 1.4, 1.42, 1.42]
x_vel = [0., 22., 22.01, 36.1]
y_dist = [1.30, 1.30, 1.45, 1.45]
elif personality==custom.LongitudinalPersonalitySP.aggressive:
x_vel = [0., 11.9, 12., 14., 16., 22., 22.01, 36.1]
y_dist = [1.133, 1.133, 1.14, 1.14, 1.13, 1.12, 1.20, 1.20]
x_vel = [0., 22., 22.01, 36.1]
y_dist = [1.10, 1.10, 1.25, 1.25]
else:
raise NotImplementedError("Dynamic personality not supported")
return np.interp(v_ego, x_vel, y_dist)
@@ -29,9 +29,9 @@ from openpilot.common.numpy_fast import interp
AccelPersonality = custom.AccelerationPersonality
# accel personality by @arne182 modified by cgw and kumar
_DP_CRUISE_MIN_V = [-0.006, -0.18, -0.76]
_DP_CRUISE_MIN_V_ECO = [-0.005, -0.16, -0.66]
_DP_CRUISE_MIN_V_SPORT = [-0.007, -0.20, -0.86]
_DP_CRUISE_MIN_V = [-1.0, -1.0, -1.0]
_DP_CRUISE_MIN_V_ECO = [-1.0, -1.0, -1.0]
_DP_CRUISE_MIN_V_SPORT = [-1.0, -1.0, -1.0]
_DP_CRUISE_MIN_BP = [0., 10., 20.]
_DP_CRUISE_MAX_V = [2.0, 2.0, 2.0, 1.80, 1.03, .62, .47, .38, .13]