More accurate jerk limits (#24755)

* More accurate jerk limits

* Min is not - max

For example max_curvature_rate can be negative.

* reduce diff
old-commit-hash: b941b39c56
taco
grekiki 3 years ago committed by GitHub
parent fc062222d4
commit cc0ba78b69
  1. 2
      selfdrive/controls/lib/drive_helpers.py

@ -122,7 +122,7 @@ def get_lag_adjusted_curvature(CP, v_ego, psis, curvatures, curvature_rates):
# This is the "desired rate of the setpoint" not an actual desired rate
desired_curvature_rate = curvature_rates[0]
max_curvature_rate = MAX_LATERAL_JERK / (v_ego**2)
max_curvature_rate = MAX_LATERAL_JERK / (v_ego**2) # inexact calculation, check https://github.com/commaai/openpilot/pull/24755
safe_desired_curvature_rate = clip(desired_curvature_rate,
-max_curvature_rate,
max_curvature_rate)

Loading…
Cancel
Save