You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
991 B
30 lines
991 B
import math
|
|
from opendbc.car import get_safety_config, structs
|
|
from opendbc.car.body.carcontroller import CarController
|
|
from opendbc.car.body.carstate import CarState
|
|
from opendbc.car.body.values import SPEED_FROM_RPM
|
|
from opendbc.car.interfaces import CarInterfaceBase
|
|
|
|
|
|
class CarInterface(CarInterfaceBase):
|
|
CarState = CarState
|
|
CarController = CarController
|
|
|
|
@staticmethod
|
|
def _get_params(ret: structs.CarParams, candidate, fingerprint, car_fw, alpha_long, 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
|
|
|