firyahhhhh!

This commit is contained in:
rav4kumar
2024-08-23 07:42:48 -07:00
parent bbbbe3b8ef
commit f093f460a3
2 changed files with 4 additions and 5 deletions
+1 -1
View File
@@ -179,7 +179,7 @@ class CarInterface(CarInterfaceBase):
if candidate in TSS2_CAR or ret.enableGasInterceptorDEPRECATED:
if sp_tss2_long_tune:
tune.kiBP = [0., 3., 8., 12., 20., 27., 36., 50]
tune.kiV = [0.322, 0.248, 0.223, 0.20, 0.17, 0.12, 0.08, 0.06]
tune.kiV = [0.322, 0.244, 0.224, 0.202, 0.17, 0.12, 0.08, 0.06]
custom_tss2_longitudinal_tuning()
else:
tune.kpV = [0.0]
@@ -92,19 +92,18 @@ def get_dynamic_personality(v_ego, personality=custom.LongitudinalPersonalitySP.
x_vel = [0, 5., 5.01, 20., 27.7]
y_dist = [1.0, 1.0, 1.75, 1.75, 1.83]
elif personality==custom.LongitudinalPersonalitySP.standard:
x_vel = [0, 5., 5.01, 20., 27.7]
y_dist = [1.45, 1.45, 1.75, 1.75, 1.70]
x_vel = [0, 20., 27.7]
y_dist = [1.75, 1.75, 1.70]
elif personality==custom.LongitudinalPersonalitySP.moderate:
x_vel = [0, 27.69, 27.7]
y_dist = [1.45, 1.45, 1.40]
elif personality==custom.LongitudinalPersonalitySP.aggressive:
x_vel = [0, 20.0, 20.01, 27.69, 27.7]
y_dist = [1.0, 1.0, 1.10, 1.10, 1.20]
y_dist = [1.07, 1.07, 1.12, 1.12, 1.20]
else:
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)