Skip to content

Commit

Permalink
Ford: higher curvature rate limits at low speed (#1394)
Browse files Browse the repository at this point in the history
* use closer to EPS limits

* raise to upper bound of spread from injection plot

* more context

* slightly more accurate

* we've seen ~0.009 at 7 m/s, so allow that

* comment

* already high enough at high speed
  • Loading branch information
sshane authored Oct 26, 2024
1 parent 92da02f commit 4aae6d0
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions opendbc/car/ford/values.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ class CarControllerParams:
STEER_DRIVER_ALLOWANCE = 1.0 # Driver intervention threshold, Nm

# Curvature rate limits
# The curvature signal is limited to 0.003 to 0.009 m^-1/sec by the EPS depending on speed and direction
# Limit to ~2 m/s^3 up, ~3 m/s^3 down at 75 mph
# Worst case, the low speed limits will allow 4.3 m/s^3 up, 4.9 m/s^3 down at 75 mph
ANGLE_RATE_LIMIT_UP = AngleRateLimit(speed_bp=[5, 25], angle_v=[0.0002, 0.0001])
ANGLE_RATE_LIMIT_DOWN = AngleRateLimit(speed_bp=[5, 25], angle_v=[0.000225, 0.00015])
# Max curvature is limited by the EPS to an equivalent of ~2.0 m/s^2 at all speeds,
# however max curvature rate linearly decreases as speed increases:
# ~0.009 m^-1/sec at 7 m/s, ~0.002 m^-1/sec at 35 m/s
# Limit to ~2 m/s^3 up, ~3.3 m/s^3 down at 75 mph and match EPS limit at low speed
ANGLE_RATE_LIMIT_UP = AngleRateLimit(speed_bp=[5, 25], angle_v=[0.00045, 0.0001])
ANGLE_RATE_LIMIT_DOWN = AngleRateLimit(speed_bp=[5, 25], angle_v=[0.00045, 0.00015])
CURVATURE_ERROR = 0.002 # ~6 degrees at 10 m/s, ~10 degrees at 35 m/s

ACCEL_MAX = 2.0 # m/s^2 max acceleration
Expand Down

0 comments on commit 4aae6d0

Please sign in to comment.