Use steeringAngleDeg for angle control saturation warnings (#25404)

* use steeringAngleDeg for angle control cars

* update refs
old-commit-hash: 24645c92da
taco
Robbe Derks 3 years ago committed by GitHub
parent 6f3b060029
commit a353cc8627
  1. 9
      selfdrive/controls/controlsd.py
  2. 2
      selfdrive/test/process_replay/ref_commit

@ -626,8 +626,13 @@ class Controls:
if len(dpath_points):
# Check if we deviated from the path
# TODO use desired vs actual curvature
left_deviation = actuators.steer > 0 and dpath_points[0] < -0.20
right_deviation = actuators.steer < 0 and dpath_points[0] > 0.20
if self.CP.steerControlType == car.CarParams.SteerControlType.angle:
steering_value = actuators.steeringAngleDeg
else:
steering_value = actuators.steer
left_deviation = steering_value > 0 and dpath_points[0] < -0.20
right_deviation = steering_value < 0 and dpath_points[0] > 0.20
if left_deviation or right_deviation:
self.events.add(EventName.steerSaturated)

@ -1 +1 @@
461333164e531e3ffdac05b63b529aa5dce1186f
3c89454df9cf2f25a5759d523a8c595e69865505
Loading…
Cancel
Save