VW MQB: Improved longitudinal starting and stopping (#30874)

* VW MQB: Improved stopping and starting

* get longcontrol to take off sooner

* oops

* use the carParam instead of the constant

* update refs

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
pull/30547/head
Jason Young 1 year ago committed by GitHub
parent 7fdd5c4a7d
commit 88e445ef15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      selfdrive/car/volkswagen/carcontroller.py
  2. 6
      selfdrive/car/volkswagen/interface.py
  3. 2
      selfdrive/car/volkswagen/mqbcan.py
  4. 2
      selfdrive/test/process_replay/ref_commit

@ -71,7 +71,7 @@ class CarController:
acc_control = self.CCS.acc_control_value(CS.out.cruiseState.available, CS.out.accFaulted, CC.longActive) acc_control = self.CCS.acc_control_value(CS.out.cruiseState.available, CS.out.accFaulted, CC.longActive)
accel = clip(actuators.accel, self.CCP.ACCEL_MIN, self.CCP.ACCEL_MAX) if CC.longActive else 0 accel = clip(actuators.accel, self.CCP.ACCEL_MIN, self.CCP.ACCEL_MAX) if CC.longActive else 0
stopping = actuators.longControlState == LongCtrlState.stopping stopping = actuators.longControlState == LongCtrlState.stopping
starting = actuators.longControlState == LongCtrlState.starting starting = actuators.longControlState == LongCtrlState.pid and (CS.esp_hold_confirmation or CS.out.vEgo < self.CP.vEgoStopping)
can_sends.extend(self.CCS.create_acc_accel_control(self.packer_pt, CANBUS.pt, CS.acc_type, CC.longActive, accel, can_sends.extend(self.CCS.create_acc_accel_control(self.packer_pt, CANBUS.pt, CS.acc_type, CC.longActive, accel,
acc_control, stopping, starting, CS.esp_hold_confirmation)) acc_control, stopping, starting, CS.esp_hold_confirmation))

@ -90,11 +90,9 @@ class CarInterface(CarInterfaceBase):
ret.pcmCruise = not ret.openpilotLongitudinalControl ret.pcmCruise = not ret.openpilotLongitudinalControl
ret.stoppingControl = True ret.stoppingControl = True
ret.startingState = True
ret.startAccel = 1.0
ret.stopAccel = -0.55 ret.stopAccel = -0.55
ret.vEgoStarting = 1.0 ret.vEgoStarting = 0.1
ret.vEgoStopping = 1.0 ret.vEgoStopping = 0.5
ret.longitudinalTuning.kpV = [0.1] ret.longitudinalTuning.kpV = [0.1]
ret.longitudinalTuning.kiV = [0.0] ret.longitudinalTuning.kiV = [0.0]

@ -94,7 +94,7 @@ def create_acc_accel_control(packer, bus, acc_type, acc_enabled, accel, acc_cont
acc_hold_type = 0 acc_hold_type = 0
acc_07_values = { acc_07_values = {
"ACC_Anhalteweg": 0.75 if stopping else 20.46, # Distance to stop (stopping coordinator handles terminal roll-out) "ACC_Anhalteweg": 0.3 if stopping else 20.46, # Distance to stop (stopping coordinator handles terminal roll-out)
"ACC_Freilauf_Info": 2 if acc_enabled else 0, "ACC_Freilauf_Info": 2 if acc_enabled else 0,
"ACC_Folgebeschl": 3.02, # Not using secondary controller accel unless and until we understand its impact "ACC_Folgebeschl": 3.02, # Not using secondary controller accel unless and until we understand its impact
"ACC_Sollbeschleunigung_02": accel if acc_enabled else 3.01, "ACC_Sollbeschleunigung_02": accel if acc_enabled else 3.01,

@ -1 +1 @@
ea96f935a7a16c53623c3b03e70c0fbfa6b249e7 94d2c0b18c2829b487fd23f079b08e9e3c75f4b4
Loading…
Cancel
Save