mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-05 16:26:14 +08:00
Less sensitive torque saturated warning (#23003)
* Less sensetive torque saturated warning
* better comment
old-commit-hash: 8f3bc4872f
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user