Less sensitive torque saturated warning (#23003)

* Less sensetive torque saturated warning

* better comment
old-commit-hash: 8f3bc4872f
commatwo_master
HaraldSchafer 4 years ago committed by GitHub
parent 1222957224
commit 9c03362ba8
  1. 5
      selfdrive/controls/controlsd.py

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

Loading…
Cancel
Save