mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-08-08 17:15:41 +08:00
tune
This commit is contained in:
+1
-1
Submodule opendbc_repo updated: bbc6869d70...0dd49ef35d
@@ -14,27 +14,28 @@ AccelPersonality = custom.LongitudinalPlanSP.AccelerationPersonality
|
||||
|
||||
# Acceleration Profiles
|
||||
MAX_ACCEL_PROFILES = {
|
||||
AccelPersonality.eco: [1.30, 1.25, 1.15, 0.83, 0.65, 0.51, 0.30, 0.12, 0.08, 0.06],
|
||||
AccelPersonality.normal: [1.80, 1.76, 1.48, 0.88, 0.73, 0.58, 0.40, 0.15, 0.09, 0.07],
|
||||
AccelPersonality.sport: [2.00, 1.95, 1.80, 0.93, 0.81, 0.69, 0.50, 0.21, 0.10, 0.08],
|
||||
AccelPersonality.eco: [1.30, 1.25, 1.15, 0.69, 0.58, 0.52, 0.28, 0.107, 0.08, 0.06],
|
||||
AccelPersonality.normal: [1.85, 1.80, 1.55, 0.94, 0.72, 0.58, 0.34, 0.120, 0.09, 0.07],
|
||||
AccelPersonality.sport: [2.00, 1.95, 1.80, 1.06, 0.81, 0.69, 0.42, 0.160, 0.10, 0.08],
|
||||
}
|
||||
MAX_ACCEL_BREAKPOINTS = [0., 3., 5., 8., 12., 18., 24., 32., 42., 55.]
|
||||
|
||||
# Braking Profiles
|
||||
MIN_ACCEL_PROFILES = {
|
||||
AccelPersonality.eco: [-.68, -1.20],
|
||||
AccelPersonality.normal: [-.74, -1.30],
|
||||
AccelPersonality.sport: [-.80, -1.40],
|
||||
AccelPersonality.eco: [-.003, -0.4, -0.6, -0.5, -1.2, -1.2],
|
||||
AccelPersonality.normal: [-.004, -0.5, -0.7, -0.6, -1.2, -1.3],
|
||||
AccelPersonality.sport: [-0.50, -0.6, -0.8, -0.7, -1.3, -1.4],
|
||||
}
|
||||
MIN_ACCEL_BREAKPOINTS = [7.5, 18.]
|
||||
MIN_ACCEL_BREAKPOINTS = [3, 5., 7., 9., 14., 25]
|
||||
|
||||
|
||||
DECEL_SMOOTH_ALPHA = 0.55 # Very aggressive smoothing for decel (lower = smoother)
|
||||
ACCEL_SMOOTH_ALPHA = 0.65 # Less aggressive for accel (higher = more responsive)
|
||||
DECEL_SMOOTH_ALPHA = 0.20 # Very aggressive smoothing for decel (lower = smoother)
|
||||
ACCEL_SMOOTH_ALPHA = 0.75 # Less aggressive for accel (higher = more responsive)
|
||||
|
||||
# Asymmetric rate limiting
|
||||
MAX_DECEL_INCREASE_RATE = 1.5 # When braking harder (m/s² per second)
|
||||
MAX_DECEL_DECREASE_RATE = 0.5 # When releasing brake (m/s² per second)
|
||||
MAX_DECEL_INCREASE_RATE = 1.3 # When braking harder (m/s² per second)
|
||||
MAX_DECEL_DECREASE_RATE = 1.0 # When releasing brake (m/s² per second)
|
||||
|
||||
|
||||
class AccelPersonalityController:
|
||||
def __init__(self):
|
||||
|
||||
@@ -14,12 +14,12 @@ LongPersonality = log.LongitudinalPersonality
|
||||
|
||||
# Follow distance profiles mapped to LongPersonality
|
||||
FOLLOW_PROFILES = {
|
||||
LongPersonality.relaxed: [1.75, 1.75, 1.75, 1.75, 1.80, 1.80, 1.80],
|
||||
LongPersonality.standard: [1.45, 1.45, 1.45, 1.45, 1.50, 1.50, 1.50],
|
||||
LongPersonality.aggressive: [1.10, 1.10, 1.15, 1.15, 1.20, 1.20, 1.20],
|
||||
LongPersonality.relaxed: [1.70, 1.70, 1.75, 1.75, 1.80, 1.80, 1.80],
|
||||
LongPersonality.standard: [1.40, 1.40, 1.45, 1.45, 1.50, 1.50, 1.50],
|
||||
LongPersonality.aggressive: [1.05, 1.05, 1.15, 1.15, 1.20, 1.20, 1.20],
|
||||
}
|
||||
|
||||
FOLLOW_BREAKPOINTS = [0., 10., 20., 30., 40., 50., 60.]
|
||||
FOLLOW_BREAKPOINTS = [0., 3., 6., 30., 40., 50., 60.]
|
||||
|
||||
SMOOTHING_BASE = 0.55 # Base smoothing factor (higher = smoother)
|
||||
SMOOTHING_RANGE = 0.20 # Additional smoothing at high speeds
|
||||
|
||||
Reference in New Issue
Block a user