mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-07-20 08:02:07 +08:00
low speed breakpoints / closer stop to the lead in front
This commit is contained in:
@@ -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.35, 0.23, 0.20, 0.17, 0.12, 0.08, 0.06]
|
||||
tune.kiV = [0.342, 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()
|
||||
|
||||
@@ -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.0
|
||||
|
||||
def get_jerk_factor(personality=custom.LongitudinalPersonalitySP.standard):
|
||||
if personality==custom.LongitudinalPersonalitySP.relaxed:
|
||||
@@ -87,16 +87,16 @@ 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, 20., 27.7]
|
||||
y_dist = [1.75, 1.75, 2.00]
|
||||
y_dist = [1.75, 1.75, 1.83]
|
||||
elif personality==custom.LongitudinalPersonalitySP.standard:
|
||||
x_vel = [0, 20., 27.7]
|
||||
y_dist = [1.75, 1.75, 2.00]
|
||||
y_dist = [1.75, 1.75, 1.80]
|
||||
elif personality==custom.LongitudinalPersonalitySP.moderate:
|
||||
x_vel = [0, 20., 27.7]
|
||||
y_dist = [1.45, 1.45, 1.60]
|
||||
y_dist = [1.45, 1.45, 1.50]
|
||||
elif personality==custom.LongitudinalPersonalitySP.aggressive:
|
||||
x_vel = [0, 20., 27.7]
|
||||
y_dist = [1.28, 1.28, 1.35]
|
||||
y_dist = [1.20, 1.20, 1.30]
|
||||
else:
|
||||
raise NotImplementedError("Dynamic personality not supported")
|
||||
return np.interp(v_ego, x_vel, y_dist)
|
||||
|
||||
@@ -29,10 +29,10 @@ 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, -0.76]
|
||||
_DP_CRUISE_MIN_V_ECO = [-1.0, -1.0, -0.74]
|
||||
_DP_CRUISE_MIN_V_SPORT = [-1.0, -1.0, -0.78]
|
||||
_DP_CRUISE_MIN_BP = [0., 11.1, 20.]
|
||||
_DP_CRUISE_MIN_V = [-0.04, -0.04, -0.16, -0.16, -0.26, -0.26, -0.46, -0.46, -0.74]
|
||||
_DP_CRUISE_MIN_V_ECO = [-0.03, -0.03, -0.15, -0.15, -0.25, -0.25, -0.45, -0.45, -0.72]
|
||||
_DP_CRUISE_MIN_V_SPORT = [-0.05, -0.05, -0.17, -0.17, -0.27, -0,27, -0.47, -0.47, -0.76]
|
||||
_DP_CRUISE_MIN_BP = [0., 3.0, 3.01, 11.1, 11.11, 20., 20.01, 30., 30.01]
|
||||
|
||||
#_DP_CRUISE_MIN_V = [-0.045, -0.045, -0.201, -0.201, -0.430, -0.430, -0.66, -0.66, -0.82]
|
||||
#_DP_CRUISE_MIN_V_ECO = [-0.04, -0.04, -0.200, -0.200, -0.425, -0.425, -0.64, -0.64, -0.80]
|
||||
|
||||
Reference in New Issue
Block a user