mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-26 16:32:06 +08:00
More accurate jerk limits (#24755)
* More accurate jerk limits * Min is not - max For example max_curvature_rate can be negative. * reduce diff
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user