|
|
|
@ -12,7 +12,7 @@ from openpilot.common.swaglog import cloudlog |
|
|
|
|
from opendbc.car.car_helpers import interfaces |
|
|
|
|
from opendbc.car.vehicle_model import VehicleModel |
|
|
|
|
from openpilot.selfdrive.controls.lib.drive_helpers import clip_curvature |
|
|
|
|
from openpilot.selfdrive.controls.lib.latcontrol import LatControl, MIN_LATERAL_CONTROL_SPEED |
|
|
|
|
from openpilot.selfdrive.controls.lib.latcontrol import LatControl |
|
|
|
|
from openpilot.selfdrive.controls.lib.latcontrol_pid import LatControlPID |
|
|
|
|
from openpilot.selfdrive.controls.lib.latcontrol_angle import LatControlAngle, STEER_ANGLE_SATURATION_THRESHOLD |
|
|
|
|
from openpilot.selfdrive.controls.lib.latcontrol_torque import LatControlTorque |
|
|
|
@ -87,8 +87,7 @@ class Controls: |
|
|
|
|
CC.enabled = self.sm['selfdriveState'].enabled |
|
|
|
|
|
|
|
|
|
# Check which actuators can be enabled |
|
|
|
|
standstill = abs(CS.vEgo) <= max(self.CP.minSteerSpeed, MIN_LATERAL_CONTROL_SPEED) or CS.standstill |
|
|
|
|
CC.latActive = self.sm['selfdriveState'].active and not CS.steerFaultTemporary and not CS.steerFaultPermanent and not standstill |
|
|
|
|
CC.latActive = self.sm['selfdriveState'].active and not CS.steerFaultTemporary and not CS.steerFaultPermanent |
|
|
|
|
CC.longActive = CC.enabled and not any(e.overrideLongitudinal for e in self.sm['onroadEvents']) and self.CP.openpilotLongitudinalControl |
|
|
|
|
|
|
|
|
|
actuators = CC.actuators |
|
|
|
|