Skip to content

Commit

Permalink
VW PQ: update carAPI signal
Browse files Browse the repository at this point in the history
* decrease kpV back to 0.1
* sanity check RegelAbw, force to 0. affects integral for PIF?
* interpolate AendGrad based on speed like RegelAbw
  • Loading branch information
dkiiv committed Oct 19, 2024
1 parent 2cd5a72 commit bc94797
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion selfdrive/car/volkswagen/carcontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ def update(self, CC, CS, now_nanos):
ratelimit_lookup = interp(self.accel_diff_smoothed, self.rateLimitBP, self.ratelimitV)
self.long_deviation = (0.019 * deviation_lookup) + (1 - 0.019) * getattr(self, 'long_deviation', 0) # 100 SMA equivalence
self.long_ratelimit = (0.007 * ratelimit_lookup) + (1 - 0.007) * getattr(self, 'long_ratelimit', 0) # 250 SMA equivalence
self.long_deviation = self.long_deviation * interp(CS.out.vEgo, [0,4,7,8], [0,0,1,1]) # 1x - 0x interpolation for RegelAbw during FTS
self.long_deviation = self.long_deviation * interp(CS.out.vEgo, [0,4,7,8], [0,0,1,1]) # 1x - 0x interpolation for RegelAbw during FTS
self.long_ratelimit = self.long_ratelimit * interp(CS.out.vEgo, [0,1,27,28], [.1,.1,1,1]) # .1x - 1x interpolation for AendGrad during 0-100kph
clip(self.long_deviation, self.deviationV[0], self.deviationV[3])
clip(self.long_ratelimit, self.ratelimitV[3], self.ratelimitV[0])
self.accel_last = self.accel_last if accel == self.CCP.ACCEL_MIN else accel
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 @@ -73,7 +73,7 @@ def _get_params(ret, candidate: CAR, fingerprint, car_fw, experimental_long, doc
ret.steerActuatorDelay = 0.11
ret.longitudinalTuning.kf = 1.
ret.longitudinalTuning.kpBP = [0.]
ret.longitudinalTuning.kpV = [0.15]
ret.longitudinalTuning.kpV = [0.1]
ret.longitudinalTuning.kiBP = [0.]
ret.longitudinalTuning.kiV = [0.]
ret.longitudinalActuatorDelay = 0.6
Expand Down
2 changes: 1 addition & 1 deletion selfdrive/car/volkswagen/pqcan.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def create_acc_accel_control(packer, bus, acc_type, accel, acc_control, stopping
"ACS_Anhaltewunsch": acc_type == 1 and stopping,
"ACS_FreigSollB": acc_enabled,
"ACS_Sollbeschl": accel if acc_enabled else 3.01,
"ACS_zul_Regelabw": comfortBand if acc_enabled else 1.27,
"ACS_zul_Regelabw": 0 if acc_enabled else 1.27, # set to 0 for sanity check
"ACS_max_AendGrad": jerkLimit if acc_enabled else 5.08,
}

Expand Down

0 comments on commit bc94797

Please sign in to comment.