|
|
@ -490,11 +490,12 @@ class Controls: |
|
|
|
actuators.accel = self.LoC.update(self.active, CS, self.CP, long_plan, pid_accel_limits) |
|
|
|
actuators.accel = self.LoC.update(self.active, CS, self.CP, long_plan, pid_accel_limits) |
|
|
|
|
|
|
|
|
|
|
|
# Steering PID loop and lateral MPC |
|
|
|
# Steering PID loop and lateral MPC |
|
|
|
|
|
|
|
lat_active = self.active and not CS.steerWarning and not CS.steerError and CS.vEgo > self.CP.minSteerSpeed |
|
|
|
desired_curvature, desired_curvature_rate = get_lag_adjusted_curvature(self.CP, CS.vEgo, |
|
|
|
desired_curvature, desired_curvature_rate = get_lag_adjusted_curvature(self.CP, CS.vEgo, |
|
|
|
lat_plan.psis, |
|
|
|
lat_plan.psis, |
|
|
|
lat_plan.curvatures, |
|
|
|
lat_plan.curvatures, |
|
|
|
lat_plan.curvatureRates) |
|
|
|
lat_plan.curvatureRates) |
|
|
|
actuators.steer, actuators.steeringAngleDeg, lac_log = self.LaC.update(self.active, CS, self.CP, self.VM, params, |
|
|
|
actuators.steer, actuators.steeringAngleDeg, lac_log = self.LaC.update(lat_active, CS, self.CP, self.VM, params, |
|
|
|
desired_curvature, desired_curvature_rate) |
|
|
|
desired_curvature, desired_curvature_rate) |
|
|
|
else: |
|
|
|
else: |
|
|
|
lac_log = log.ControlsState.LateralDebugState.new_message() |
|
|
|
lac_log = log.ControlsState.LateralDebugState.new_message() |
|
|
|