This commit is contained in:
rav4kumar
2025-11-04 19:33:15 -07:00
parent 9fcb4c9ca8
commit 204eaebf55
2 changed files with 14 additions and 13 deletions
@@ -14,22 +14,23 @@ AccelPersonality = custom.LongitudinalPlanSP.AccelerationPersonality
# Acceleration Profiles
MAX_ACCEL_PROFILES = {
AccelPersonality.eco: [2.0, 1.99, 1.92, .850, .500, .33, .23, .125],
AccelPersonality.normal: [2.0, 1.99, 1.70, .850, .500, .33, .23, .125],
AccelPersonality.sport: [2.0, 2.00, 1.97, 1.00, .635, .48, .31, .165],
AccelPersonality.eco: [2.0, 1.99, 1.92, .850, .500, .33, .23, .125],
AccelPersonality.normal: [2.0, 1.99, 1.70, .850, .500, .33, .23, .125],
AccelPersonality.sport: [2.0, 2.00, 1.97, 1.00, .635, .48, .31, .165],
}
MAX_ACCEL_BREAKPOINTS = [0., 4., 6., 9., 16., 25., 30., 55.]
MAX_ACCEL_BREAKPOINTS = [0., 4., 6., 9., 16., 25., 30., 55.]
# Braking Profiles
MIN_ACCEL_PROFILES = {
AccelPersonality.eco: [-0.05, -0.08, -0.20, -0.24, -1.20],
AccelPersonality.normal: [-0.06, -0.10, -0.22, -0.26, -1.20],
AccelPersonality.sport: [-0.08, -0.12, -0.24, -0.28, -1.20],
AccelPersonality.eco: [-0.05, -0.08, -0.16, -0.20, -0.24, -1.20],
AccelPersonality.normal: [-0.06, -0.10, -0.18, -0.22, -0.24, -1.20],
AccelPersonality.sport: [-0.08, -0.12, -0.20, -0.24, -0.26, -1.20],
}
MIN_ACCEL_BREAKPOINTS = [0., 4., 6., 8., 25.]
MIN_ACCEL_BREAKPOINTS = [0., 4., 6., 8., 12., 25.]
DECEL_SMOOTH_ALPHA = 0.05 # Very aggressive smoothing for decel (lower = smoother)
ACCEL_SMOOTH_ALPHA = 0.25 # Less aggressive for accel (higher = more responsive)
ACCEL_SMOOTH_ALPHA = 0.20 # Less aggressive for accel (higher = more responsive)
# Asymmetric rate limiting
MAX_DECEL_INCREASE_RATE = 0.06 # When braking harder (m/s² per second)
@@ -14,11 +14,11 @@ LongPersonality = log.LongitudinalPersonality
# Follow distance profiles mapped to LongPersonality
FOLLOW_PROFILES = {
LongPersonality.relaxed: [1.20, 1.35, 1.55, 1.70, 1.80, 1.90],
LongPersonality.standard: [1.10, 1.20, 1.38, 1.48, 1.58, 1.65],
LongPersonality.aggressive: [1.00, 1.00, 1.00, 1.15, 1.28, 1.35],
LongPersonality.relaxed: [1.45, 1.48, 1.52, 1.60, 1.68, 1.75],
LongPersonality.standard: [1.35, 1.38, 1.42, 1.50, 1.58, 1.65],
LongPersonality.aggressive: [1.20, 1.24, 1.28, 1.38, 1.46, 1.52],
}
FOLLOW_BREAKPOINTS = [0., 5., 8., 14., 25., 50.]
FOLLOW_BREAKPOINTS = [0., 8., 12., 18., 25., 50.]
SMOOTHING_BASE = 0.70 # Base smoothing factor (higher = smoother)
SMOOTHING_RANGE = 0.25 # Additional smoothing at high speeds