Less sensitive torque saturated warning (#23003)

* Less sensetive torque saturated warning

* better comment
pull/23096/head
HaraldSchafer 4 years ago committed by GitHub
parent fa34bd912e
commit 8f3bc4872f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      selfdrive/controls/controlsd.py

@ -540,8 +540,9 @@ class Controls:
if len(lat_plan.dPathPoints): if len(lat_plan.dPathPoints):
# Check if we deviated from the path # Check if we deviated from the path
left_deviation = actuators.steer > 0 and lat_plan.dPathPoints[0] < -0.1 # TODO use desired vs actual curvature
right_deviation = actuators.steer < 0 and lat_plan.dPathPoints[0] > 0.1 left_deviation = actuators.steer > 0 and lat_plan.dPathPoints[0] < -0.20
right_deviation = actuators.steer < 0 and lat_plan.dPathPoints[0] > 0.20
if left_deviation or right_deviation: if left_deviation or right_deviation:
self.events.add(EventName.steerSaturated) self.events.add(EventName.steerSaturated)

Loading…
Cancel
Save