selfdrive.car.gm package

Submodules

selfdrive.car.gm.carcontroller module

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

Bases: object

update(CC, CS)[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.gmcan module

selfdrive.car.gm.gmcan.create_acc_dashboard_command(packer, bus, acc_engaged, target_speed_kph, lead_car_in_sight, 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, near_stop, at_full_stop)[source]
selfdrive.car.gm.gmcan.create_gas_regen_command(packer, bus, throttle, idx, acc_engaged, at_full_stop)[source]
selfdrive.car.gm.gmcan.create_lka_icon_command(bus, active, critical, steer)[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

apply(c)[source]
static get_params(candidate, fingerprint={0: {}, 1: {}, 2: {}, 3: {}, 4: {}, 5: {}, 6: {}, 7: {}}, car_fw=None, experimental_long=False)[source]
static get_pid_accel_limits(CP, current_speed, cruise_speed)[source]
static get_steer_feedforward_acadia(desired_angle, v_ego)[source]
get_steer_feedforward_function()[source]
static get_steer_feedforward_volt(desired_angle, v_ego)[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[source]

Bases: object

ACADIA = 'GMC ACADIA DENALI 2018'
BOLT_EUV = 'CHEVROLET BOLT EUV 2022'
BOLT_EV = 'CHEVROLET BOLT EV 2022'
BUICK_REGAL = 'BUICK REGAL ESSENCE 2018'
CADILLAC_ATS = 'CADILLAC ATS Premium Performance 2018'
EQUINOX = 'CHEVROLET EQUINOX 2019'
ESCALADE_ESV = 'CADILLAC ESCALADE ESV 2016'
HOLDEN_ASTRA = 'HOLDEN ASTRA RS-V BK 2017'
MALIBU = 'CHEVROLET MALIBU PREMIER 2017'
SILVERADO = 'CHEVROLET SILVERADO 1500 2020'
VOLT = 'CHEVROLET VOLT PREMIER 2017'
class selfdrive.car.gm.values.CanBus[source]

Bases: object

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

Bases: object

ACCEL_MAX = 2.0
ACCEL_MIN = -4.0
ADAS_KEEPALIVE_STEP = 100
BRAKE_LOOKUP_BP = [-4.0, -0.1]
BRAKE_LOOKUP_V = [400, 0.0]
CAMERA_KEEPALIVE_STEP = 100
EV_BRAKE_LOOKUP_BP = [-4.0, -1.0]
EV_GAS_LOOKUP_BP = [-1.0, 0.0, 2.0]
GAS_LOOKUP_BP = [-0.1, 0.0, 2.0]
GAS_LOOKUP_V = [1404, 2048, 3072]
MAX_ACC_REGEN = 1404
MAX_BRAKE = 400
MAX_GAS = 3072
NEAR_STOP_BRAKE_PHASE = 0.5
STEER_DELTA_DOWN = 17
STEER_DELTA_UP = 7
STEER_DRIVER_ALLOWANCE = 50
STEER_DRIVER_FACTOR = 100
STEER_DRIVER_MULTIPLIER = 4
STEER_MAX = 300
STEER_STEP = 2
ZERO_GAS = 2048
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.Footnote(value)[source]

Bases: Enum

An enumeration.

OBD_II = CarFootnote(text='Requires a <a href="https://github.com/commaai/openpilot/wiki/GM#hardware">community built ASCM harness</a>. <b><i>NOTE: disconnecting the ASCM disables Automatic Emergency Braking (AEB).</i></b>', column=<Column.MODEL: 'Model'>)
class selfdrive.car.gm.values.GMCarInfo(name: str, package: str = 'Adaptive Cruise Control (ACC)', video_link: Union[str, NoneType] = None, footnotes: List[enum.Enum] = <factory>, min_steer_speed: Union[float, NoneType] = None, min_enable_speed: Union[float, NoneType] = None, harness: enum.Enum = <Harness.obd_ii: 'OBD-II'>)[source]

Bases: CarInfo

footnotes: List[Enum]
harness: Enum = 'OBD-II'
package: str = 'Adaptive Cruise Control (ACC)'

Module contents