Skip to content

Commit

Permalink
VW PQ: reintroduce kiv, nuke regelabw for now
Browse files Browse the repository at this point in the history
  • Loading branch information
dkiiv committed Nov 21, 2024
1 parent bbf7d08 commit 57d9bd6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion selfdrive/car/volkswagen/carcontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def update(self, CC, CS, now_nanos):
# SMA to EMA conversion: alpha = 2 / (n + 1) n = SMA-sample
self.accel_diff = (0.0019 * (accel - self.accel_last)) + (1 - 0.0019) * self.accel_diff # 1000 SMA equivalence
self.long_jerklimit = (0.01 * (clip(abs(accel), 0.7, 2))) + (1 - 0.01) * self.long_jerklimit # set jerk limit based on accel
self.long_deviation = clip(CS.out.vEgo/40, 0, 0.13) * interp(abs(accel - self.accel_diff), [0, .2, 1.], [1.0, 1.0, 0.0])
self.long_deviation = clip(CS.out.vEgo/40, 0, 0.13) * interp(abs(accel - self.accel_diff), [0, .2, 1.], [0.0, 0.0, 0.0])

if self.CCS == pqcan and CC.longActive and actuators.accel <= 0 and CS.out.vEgoRaw <= 5:
if not self.EPB_enable: # first frame of EPB entry
Expand Down
2 changes: 1 addition & 1 deletion selfdrive/car/volkswagen/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def _get_params(ret, candidate: CAR, fingerprint, car_fw, experimental_long, doc
ret.longitudinalTuning.kpBP = [0.]
ret.longitudinalTuning.kpV = [0.2]
ret.longitudinalTuning.kiBP = [0.]
ret.longitudinalTuning.kiV = [0.]
ret.longitudinalTuning.kiV = [0.1]
ret.longitudinalActuatorDelay = 0.6
CarInterfaceBase.configure_torque_tune(candidate, ret.lateralTuning)
else:
Expand Down

0 comments on commit 57d9bd6

Please sign in to comment.