Files
IQ.Pilot/artifacts/package_runtime/iqdbc/car/body/interface.py
2026-09-03 18:23:24 -05:00

31 lines
993 B
Python

import math
from iqdbc.car import get_safety_config, structs
from iqdbc.car.body.carcontroller import CarController
from iqdbc.car.body.carstate import CarState
from iqdbc.car.body.values import SPEED_FROM_RPM
from iqdbc.car.interfaces import CarInterfaceBase
class CarInterface(CarInterfaceBase):
CarState = CarState
CarController = CarController
@staticmethod
def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, alpha_long, is_release, docs) -> structs.CarParams:
ret.notCar = True
ret.brand = "body"
ret.safetyConfigs = [get_safety_config(structs.CarParams.SafetyModel.body)]
ret.minSteerSpeed = -math.inf
ret.maxLateralAccel = math.inf # TODO: set to a reasonable value
ret.steerLimitTimer = 1.0
ret.steerActuatorDelay = 0.
ret.wheelSpeedFactor = SPEED_FROM_RPM
ret.radarUnavailable = True
ret.openpilotLongitudinalControl = True
ret.steerControlType = structs.CarParams.SteerControlType.angle
return ret