clip steer saturation counter to steerLimitTimer (#23638)

* clip steer saturation counter to steerLimitTimer

* update ref
old-commit-hash: ee71fd2fcc
commatwo_master
Willem Melching 3 years ago committed by GitHub
parent 39a5e19e30
commit 9f202e63f5
  1. 1
      selfdrive/car/interfaces.py
  2. 4
      selfdrive/controls/lib/latcontrol.py
  3. 2
      selfdrive/test/process_replay/ref_commit

@ -98,6 +98,7 @@ class CarInterfaceBase(ABC):
ret.longitudinalTuning.kiV = [1.]
ret.longitudinalActuatorDelayLowerBound = 0.15
ret.longitudinalActuatorDelayUpperBound = 0.15
ret.steerLimitTimer = 1.0
return ret
@abstractmethod

@ -24,5 +24,5 @@ class LatControl(ABC):
self.sat_count += self.sat_count_rate
else:
self.sat_count -= self.sat_count_rate
self.sat_count = clip(self.sat_count, 0.0, 1.0)
return self.sat_count > self.sat_limit
self.sat_count = clip(self.sat_count, 0.0, self.sat_limit)
return self.sat_count > (self.sat_limit - 1e-3)

@ -1 +1 @@
14133069e1f226b9c981d09653fb74f5020f725e
498e43b0cc062291ec159d7f09b69d9f7024aeca
Loading…
Cancel
Save