vroom vroom vroom vroom vroom

This commit is contained in:
rav4 kumar
2024-07-30 14:43:24 +00:00
committed by rav4kumar
parent 8d693e1d41
commit 6b71d82019
4 changed files with 16 additions and 16 deletions
+1 -1
View File
@@ -182,7 +182,7 @@ class CarInterface(CarInterfaceBase):
#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.kiV = [0.33, 0.22, 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()
+1 -1
View File
@@ -16,7 +16,7 @@ PEDAL_TRANSITION = 10. * CV.MPH_TO_MS
class CarControllerParams:
ACCEL_MAX = 1.5 # m/s2, lower than allowed 2.0 m/s2 for tuning reasons
ACCEL_MAX = 2.0 # m/s2, lower than allowed 2.0 m/s2 for tuning reasons
ACCEL_MIN = -3.5 # m/s2
STEER_STEP = 1
@@ -56,7 +56,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 = 4.5
def get_jerk_factor(personality=custom.LongitudinalPersonalitySP.standard):
if personality==custom.LongitudinalPersonalitySP.relaxed:
@@ -89,14 +89,14 @@ 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, 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]
x_vel = [0, 5, 5.01, 8.33, 8.34, 11.1, 11.11, 19.99, 20, 36]
y_dist = [0.65, 0.65, 0.87, 0.87, 1.09, 1.09, 1.25, 1.25, 1.65, 1.65]
elif personality==custom.LongitudinalPersonalitySP.moderate:
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]
x_vel = [0, 5, 5.01, 8.33, 8.34, 11.1, 11.11, 20, 20.01, 36]
y_dist = [0.64, 0.64, 0.85, 0.85, 1.04, 1.04, 1.20, 1.20, 1.40, 1.40]
elif personality==custom.LongitudinalPersonalitySP.aggressive:
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]
x_vel = [0, 5, 5.01, 8.33, 8.34, 11.1, 11.11, 15, 17, 20, 20.01, 25, 25.01, 36, 36.01]
y_dist = [0.63, 0.53, 0.83, 0.83, 1.00, 1.00, 1.15, 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)
@@ -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 = [-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_MIN_V = [-0.06, -0.06, -0.220, -0.220, -0.430, -0.430, -0.64, -0.64, -0.82]
_DP_CRUISE_MIN_V_ECO = [-0.05, -0.05, -0.215, -0.215, -0.425, -0.425, -0.62, -0.62, -0.80]
_DP_CRUISE_MIN_V_SPORT = [-0.07, -0.07, -0.225, -0.225, -0.445, -0.445, -0.66, -0.66, -0.84]
_DP_CRUISE_MIN_BP = [0., 5.55, 5.56, 18., 18.01, 27.77, 27.78, 33., 33.01]
_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_V = [3.5, 3.5, 3.4, 2.4, 1.4, .91, .70, .51, .42, .13]
_DP_CRUISE_MAX_V_ECO = [3.5, 3.5, 3.3, 2.2, 1.1, .75, .53, .42, .31, .085]
_DP_CRUISE_MAX_V_SPORT = [3.5, 3.5, 3.5, 2.8, 1.6, 1.1, .96, .78, .60, .4]
_DP_CRUISE_MAX_BP = [0., 1., 6., 8., 11., 15., 20., 25., 30., 55.]