fine tune

This commit is contained in:
rav4kumar
2024-09-25 07:36:32 -07:00
parent 1f9ea6628a
commit 2f8a6796a2
3 changed files with 13 additions and 17 deletions
+3 -3
View File
@@ -171,9 +171,9 @@ class CarInterface(CarInterfaceBase):
ret.stoppingDecelRate = 0.002 # reach stopping target smoothly
def default_tss2_longitudinal_tuning():
ret.vEgoStopping = 0.25
ret.vEgoStarting = 0.25
ret.stoppingDecelRate = 0.3 # reach stopping target smoothly
ret.vEgoStopping = 0.015
ret.vEgoStarting = 0.01
ret.stoppingDecelRate = 0.5 # reach stopping target smoothly
def default_longitudinal_tuning():
tune.kiBP = [0., 5., 35.]
@@ -63,9 +63,9 @@ def get_jerk_factor(personality=custom.LongitudinalPersonalitySP.standard):
elif personality==custom.LongitudinalPersonalitySP.standard:
return 1.0
elif personality==custom.LongitudinalPersonalitySP.moderate:
return 0.5
return 1.0
elif personality==custom.LongitudinalPersonalitySP.aggressive:
return 0.2
return 0.5
elif personality==custom.LongitudinalPersonalitySP.overtake:
return 0.1
else:
@@ -29,19 +29,15 @@ from openpilot.common.numpy_fast import interp
AccelPersonality = custom.AccelerationPersonality
# accel personality by @arne182 modified by cgw and kumar
_DP_CRUISE_MIN_V = [-0.08, -0.08, -0.11, -0.11, -0.16, -0.16, -0.46, -1.0, -1.2]
_DP_CRUISE_MIN_V_ECO = [-0.07, -0.07, -0.10, -0.10, -0.15, -0.15, -0.45, -1.0, -1.2]
_DP_CRUISE_MIN_V_SPORT = [-0.09, -0.09, -0.12, -0.12, -0.17, -0.17, -0.47, -1.0, -1.2]
_DP_CRUISE_MIN_BP = [0., 0.05, 0.06, 8.0, 8.01, 12., 18., 25., 30.]
_DP_CRUISE_MIN_V = [-0.12, -0.12, -0.08, -0.08, -0.14, -0.14, -0.16, -0.16, -0.24, -0.24, -0.38, -0.38, -1.0, -1.0, -1.15]
_DP_CRUISE_MIN_V_ECO = [-0.11, -0.11, -0.07, -0.07, -0.13, -0.13, -0.15, -0.15, -0.23, -0.23, -0.36, -0.36, -1.0, -1.0, -1.10]
_DP_CRUISE_MIN_V_SPORT = [-0.13, -0.13, -0.09, -0.09, -0.15, -0.15, -0.17, -0.17, -0.25, -0.25, -0.42, -0.42, -1.0, -1.0, -1.20]
_DP_CRUISE_MIN_BP = [0., 0.08, 0.09, 2.77, 2.78, 8.33, 8.34, 13.88, 13.89, 19.44, 19.45, 25.00, 25.01, 30.55, 30.56]
#_DP_CRUISE_MIN_BP in kph[0., 0.3, 0.3, 10, 10, 30, 30, 50, 50, 70, 70, 90, 90, 110, >110]
#_DP_CRUISE_MIN_V = [-0.020, -0.020, -0.23, -0.23, -0.38, -0.38, -1.00]
#_DP_CRUISE_MIN_V_ECO = [-0.019, -0.019, -0.21, -0.21, -0.36, -0.36, -1.00]
#_DP_CRUISE_MIN_V_SPORT = [-0.022, -0.022, -0.25, -0.25, -0.40, -0.40, -1.00]
#_DP_CRUISE_MIN_BP = [0., 0.05, 3.12, 10., 10.01, 20., 30.]
_DP_CRUISE_MAX_V = [2.0, 2.0, 1.75, 0.96, .65, .54, .38, .17]
_DP_CRUISE_MAX_V_ECO = [2.0, 1.95, 1.66, 0.91, .58, .46, .32, .09]
_DP_CRUISE_MAX_V_SPORT = [2.0, 2.0, 1.95, 1.15, .84, .70, .50, .30]
_DP_CRUISE_MAX_V = [2.0, 2.0, 1.75, 0.96, .65, .54, .38, .17]
_DP_CRUISE_MAX_V_ECO = [2.0, 1.96, 1.66, 0.91, .58, .46, .32, .09]
_DP_CRUISE_MAX_V_SPORT = [2.0, 2.0, 1.95, 1.15, .84, .70, .50, .30]
_DP_CRUISE_MAX_BP = [0., 6.0, 8., 11., 20., 25., 30., 40.]