fix saturation check

pull/27494/head
sshane 3 years ago
parent 11d28af443
commit 12f02b7b38
  1. 2
      selfdrive/controls/lib/latcontrol_pid.py

@ -53,7 +53,7 @@ class LatControlPID(LatControl):
if self.CP.steerControlType != SteerControlType.torque: if self.CP.steerControlType != SteerControlType.torque:
angle_control_saturated = abs(angle_steers_des - CS.steeringAngleDeg) > STEER_ANGLE_SATURATION_THRESHOLD angle_control_saturated = abs(angle_steers_des - CS.steeringAngleDeg) > STEER_ANGLE_SATURATION_THRESHOLD
pid_log.saturated = self._check_saturation(angle_control_saturated, CS, steer_limited) pid_log.saturated = self._check_saturation(angle_control_saturated, CS, False)
else: else:
pid_log.saturated = self._check_saturation(self.steer_max - abs(output_steer) < 1e-3, CS, steer_limited) pid_log.saturated = self._check_saturation(self.steer_max - abs(output_steer) < 1e-3, CS, steer_limited)

Loading…
Cancel
Save