mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-08-08 06:25:42 +08:00
tune
This commit is contained in:
@@ -163,7 +163,7 @@ class CarInterface(CarInterfaceBase):
|
||||
# hand tuned (August 12, 2024)
|
||||
def custom_tss2_longitudinal_tuning():
|
||||
ret.vEgoStopping = 0.25
|
||||
ret.vEgoStarting = 0.15
|
||||
ret.vEgoStarting = 0.01
|
||||
ret.stoppingDecelRate = 0.002
|
||||
|
||||
def default_tss2_longitudinal_tuning():
|
||||
@@ -178,8 +178,8 @@ class CarInterface(CarInterfaceBase):
|
||||
tune = ret.longitudinalTuning
|
||||
if candidate in TSS2_CAR or ret.enableGasInterceptorDEPRECATED:
|
||||
if sp_tss2_long_tune:
|
||||
tune.kiBP = [0., 1., 2., 12., 20., 27.]
|
||||
tune.kiV = [0.35, 0.3301, 0.308, 0.2188, 0.174, 0.10]
|
||||
tune.kiBP = [0., 1., 5., 12., 20., 27.]
|
||||
tune.kiV = [0.351, 0.331, 0.245, 0.215, 0.17, 0.10]
|
||||
custom_tss2_longitudinal_tuning()
|
||||
else:
|
||||
tune.kpV = [0.0]
|
||||
|
||||
@@ -61,11 +61,11 @@ def get_jerk_factor(personality=custom.LongitudinalPersonalitySP.standard):
|
||||
if personality==custom.LongitudinalPersonalitySP.relaxed:
|
||||
return 1.3
|
||||
elif personality==custom.LongitudinalPersonalitySP.standard:
|
||||
return 1.2
|
||||
elif personality==custom.LongitudinalPersonalitySP.moderate:
|
||||
return 1.0
|
||||
elif personality==custom.LongitudinalPersonalitySP.moderate:
|
||||
return 0.5
|
||||
elif personality==custom.LongitudinalPersonalitySP.aggressive:
|
||||
return 0.8
|
||||
return 0.2
|
||||
elif personality==custom.LongitudinalPersonalitySP.overtake:
|
||||
return 0.1
|
||||
else:
|
||||
@@ -86,7 +86,7 @@ def get_a_change_factor(v_ego, v_lead0, v_lead1, personality=custom.Longitudinal
|
||||
a_change_cost_high_speed_factor = 1.5 # Similar to standard (higher penalty for high speeds)
|
||||
elif personality==custom.LongitudinalPersonalitySP.aggressive:
|
||||
a_change_cost_multiplier_follow = 0.1 # Very low cost for changing acceleration, meaning quicker reactions (less cautious)
|
||||
a_change_cost_high_speed_factor = 5.0 # Much higher penalty for abrupt changes at high speeds (very cautious at high speeds)
|
||||
a_change_cost_high_speed_factor = 3.0 # Much higher penalty for abrupt changes at high speeds (very cautious at high speeds)
|
||||
elif personality==custom.LongitudinalPersonalitySP.overtake:
|
||||
a_change_cost_multiplier_follow = 0.1 # Very low cost for changing acceleration, meaning quicker reactions (less cautious)
|
||||
a_change_cost_high_speed_factor = 5.0 # Much higher penalty for abrupt changes at high speeds (very cautious at high speeds)
|
||||
|
||||
Reference in New Issue
Block a user