Ford: curvature rate limit safety (#28059)

* bump panda

* add carcontroller

* add carcontroller

* cmt

* bumppanda

* ubmp
pull/28105/head
Shane Smiskol 2 years ago committed by GitHub
parent beb7f585ae
commit d888400402
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      panda
  2. 6
      selfdrive/car/ford/carcontroller.py

@ -1 +1 @@
Subproject commit b44df8151a15fa3afe8a8943e332eb63605a2245
Subproject commit 94cd9a0788070e4e802e8a6a1c1cc7dae95e8f70

@ -10,14 +10,14 @@ VisualAlert = car.CarControl.HUDControl.VisualAlert
def apply_ford_curvature_limits(apply_curvature, apply_curvature_last, current_curvature, v_ego_raw):
# Note that we do curvature error limiting after the rate limits since they are just for tuning reasons
apply_curvature = apply_std_steer_angle_limits(apply_curvature, apply_curvature_last, v_ego_raw, CarControllerParams)
# No blending at low speed due to lack of torque wind-up and inaccurate current curvature
if v_ego_raw > 9:
apply_curvature = clip(apply_curvature, current_curvature - CarControllerParams.CURVATURE_ERROR,
current_curvature + CarControllerParams.CURVATURE_ERROR)
# Curvature rate limit after driver torque limit
apply_curvature = apply_std_steer_angle_limits(apply_curvature, apply_curvature_last, v_ego_raw, CarControllerParams)
return clip(apply_curvature, -CarControllerParams.CURVATURE_MAX, CarControllerParams.CURVATURE_MAX)

Loading…
Cancel
Save