selfdrive.car.gm package

Subpackages

Submodules

selfdrive.car.gm.carcontroller module

class selfdrive.car.gm.carcontroller.CarController(dbc_name, CP, VM)[source]

Bases: CarControllerBase

update(CC, CS, now_nanos)[source]

selfdrive.car.gm.carstate module

class selfdrive.car.gm.carstate.CarState(CP)[source]

Bases: CarStateBase

static get_cam_can_parser(CP)[source]
static get_can_parser(CP)[source]
static get_loopback_can_parser(CP)[source]
update(pt_cp, cam_cp, loopback_cp)[source]

selfdrive.car.gm.fingerprints module

selfdrive.car.gm.gmcan module

selfdrive.car.gm.gmcan.create_acc_dashboard_command(packer, bus, enabled, target_speed_kph, hud_control, fcw)[source]
selfdrive.car.gm.gmcan.create_adas_accelerometer_speed_status(bus, speed_ms, idx)[source]
selfdrive.car.gm.gmcan.create_adas_headlights_status(packer, bus)[source]
selfdrive.car.gm.gmcan.create_adas_keepalive(bus)[source]
selfdrive.car.gm.gmcan.create_adas_steering_status(bus, idx)[source]
selfdrive.car.gm.gmcan.create_adas_time_status(bus, tt, idx)[source]
selfdrive.car.gm.gmcan.create_buttons(packer, bus, idx, button)[source]
selfdrive.car.gm.gmcan.create_friction_brake_command(packer, bus, apply_brake, idx, enabled, near_stop, at_full_stop, CP)[source]
selfdrive.car.gm.gmcan.create_gas_regen_command(packer, bus, throttle, idx, enabled, at_full_stop)[source]
selfdrive.car.gm.gmcan.create_lka_icon_command(bus, active, critical, steer)[source]
selfdrive.car.gm.gmcan.create_pscm_status(packer, bus, pscm_status)[source]
selfdrive.car.gm.gmcan.create_steering_control(packer, bus, apply_steer, idx, lkas_active)[source]

selfdrive.car.gm.interface module

class selfdrive.car.gm.interface.CarInterface(CP, CarController, CarState)[source]

Bases: CarInterfaceBase

static get_pid_accel_limits(CP, current_speed, cruise_speed)[source]
get_steer_feedforward_function()[source]
static get_steer_feedforward_volt(desired_angle, v_ego)[source]
torque_from_lateral_accel() _StructModule object at 0x7f3810d68a90>, float, float, bool, bool], float][source]
torque_from_lateral_accel_neural(latcontrol_inputs: ~openpilot.selfdrive.car.interfaces.LatControlInputs, torque_params: <capnp.lib.capnp._StructModule object at 0x7f3810d68a90>, lateral_accel_error: float, lateral_accel_deadzone: float, friction_compensation: bool, gravity_adjusted: bool) float[source]
torque_from_lateral_accel_siglin(latcontrol_inputs: ~openpilot.selfdrive.car.interfaces.LatControlInputs, torque_params: <capnp.lib.capnp._StructModule object at 0x7f3810d68a90>, lateral_accel_error: float, lateral_accel_deadzone: float, friction_compensation: bool, gravity_adjusted: bool) float[source]

selfdrive.car.gm.radar_interface module

class selfdrive.car.gm.radar_interface.RadarInterface(CP)[source]

Bases: RadarInterfaceBase

update(can_strings)[source]
selfdrive.car.gm.radar_interface.create_radar_can_parser(car_fingerprint)[source]

selfdrive.car.gm.values module

class selfdrive.car.gm.values.AccState[source]

Bases: object

ACTIVE = 1
FAULTED = 3
OFF = 0
STANDSTILL = 4
class selfdrive.car.gm.values.CAR(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Platforms

BUICK_LACROSSE = 'BUICK_LACROSSE'
BUICK_REGAL = 'BUICK_REGAL'
CADILLAC_ATS = 'CADILLAC_ATS'
CADILLAC_ESCALADE = 'CADILLAC_ESCALADE'
CADILLAC_ESCALADE_ESV = 'CADILLAC_ESCALADE_ESV'
CADILLAC_ESCALADE_ESV_2019 = 'CADILLAC_ESCALADE_ESV_2019'
CHEVROLET_BOLT_EUV = 'CHEVROLET_BOLT_EUV'
CHEVROLET_EQUINOX = 'CHEVROLET_EQUINOX'
CHEVROLET_MALIBU = 'CHEVROLET_MALIBU'
CHEVROLET_SILVERADO = 'CHEVROLET_SILVERADO'
CHEVROLET_TRAILBLAZER = 'CHEVROLET_TRAILBLAZER'
CHEVROLET_VOLT = 'CHEVROLET_VOLT'
GMC_ACADIA = 'GMC_ACADIA'
HOLDEN_ASTRA = 'HOLDEN_ASTRA'
config: PlatformConfig
class selfdrive.car.gm.values.CanBus[source]

Bases: object

CAMERA = 2
CHASSIS = 2
DROPPED = 192
LOOPBACK = 128
OBSTACLE = 1
POWERTRAIN = 0
class selfdrive.car.gm.values.CarControllerParams(CP)[source]

Bases: object

ACCEL_MAX = 2.0
ACCEL_MIN = -4.0
ADAS_KEEPALIVE_STEP = 100
CAMERA_KEEPALIVE_STEP = 100
INACTIVE_STEER_STEP = 10
NEAR_STOP_BRAKE_PHASE = 0.5
STEER_DELTA_DOWN = 15
STEER_DELTA_UP = 10
STEER_DRIVER_ALLOWANCE = 65
STEER_DRIVER_FACTOR = 100
STEER_DRIVER_MULTIPLIER = 4
STEER_MAX = 300
STEER_STEP = 3
class selfdrive.car.gm.values.CruiseButtons[source]

Bases: object

CANCEL = 6
DECEL_SET = 3
INIT = 0
MAIN = 5
RES_ACCEL = 2
UNPRESS = 1
class selfdrive.car.gm.values.GMASCMPlatformConfig(car_docs: list[openpilot.selfdrive.car.docs_definitions.CarDocs], specs: openpilot.selfdrive.car.CarSpecs, dbc_dict: dict[str, str] = <factory>, flags: int = 0, platform_str: str | None = None)[source]

Bases: GMPlatformConfig

init()[source]
class selfdrive.car.gm.values.GMCarDocs(name: str, package: str = 'Adaptive Cruise Control (ACC)', requirements: str | None = None, video_link: str | None = None, footnotes: list[enum.Enum] = <factory>, min_steer_speed: float | None = None, min_enable_speed: float | None = None, auto_resume: bool | None = None, car_parts: openpilot.selfdrive.car.docs_definitions.CarParts = <factory>)[source]

Bases: CarDocs

init_make(CP: <capnp.lib.capnp._StructModule object at 0x7f3810d53d10>)[source]

CarDocs subclasses can add make-specific logic for harness selection, footnotes, etc.

package: str = 'Adaptive Cruise Control (ACC)'
class selfdrive.car.gm.values.GMCarSpecs(*, mass: float, wheelbase: float, steerRatio: float, centerToFrontRatio: float = 0.5, minSteerSpeed: float = 0.0, minEnableSpeed: float = -1.0, tireStiffnessFactor: float = 0.444)[source]

Bases: CarSpecs

tireStiffnessFactor: float = 0.444
class selfdrive.car.gm.values.GMPlatformConfig(car_docs: list[openpilot.selfdrive.car.docs_definitions.CarDocs], specs: openpilot.selfdrive.car.CarSpecs, dbc_dict: dict[str, str] = <factory>, flags: int = 0, platform_str: str | None = None)[source]

Bases: PlatformConfig

dbc_dict: dict[str, str]

Module contents