|
|
@ -4,7 +4,7 @@ from panda import Panda |
|
|
|
from common.conversions import Conversions as CV |
|
|
|
from common.conversions import Conversions as CV |
|
|
|
from common.numpy_fast import interp |
|
|
|
from common.numpy_fast import interp |
|
|
|
from selfdrive.car.honda.values import CarControllerParams, CruiseButtons, HondaFlags, CAR, HONDA_BOSCH, HONDA_NIDEC_ALT_SCM_MESSAGES, HONDA_BOSCH_ALT_BRAKE_SIGNAL, HONDA_BOSCH_RADARLESS |
|
|
|
from selfdrive.car.honda.values import CarControllerParams, CruiseButtons, HondaFlags, CAR, HONDA_BOSCH, HONDA_NIDEC_ALT_SCM_MESSAGES, HONDA_BOSCH_ALT_BRAKE_SIGNAL, HONDA_BOSCH_RADARLESS |
|
|
|
from selfdrive.car import STD_CARGO_KG, CivicParams, create_button_event, scale_rot_inertia, scale_tire_stiffness, gen_empty_fingerprint, get_safety_config |
|
|
|
from selfdrive.car import STD_CARGO_KG, CivicParams, create_button_event, scale_tire_stiffness, get_safety_config |
|
|
|
from selfdrive.car.interfaces import CarInterfaceBase |
|
|
|
from selfdrive.car.interfaces import CarInterfaceBase |
|
|
|
from selfdrive.car.disable_ecu import disable_ecu |
|
|
|
from selfdrive.car.disable_ecu import disable_ecu |
|
|
|
|
|
|
|
|
|
|
@ -29,8 +29,7 @@ class CarInterface(CarInterfaceBase): |
|
|
|
return CarControllerParams.NIDEC_ACCEL_MIN, interp(current_speed, ACCEL_MAX_BP, ACCEL_MAX_VALS) |
|
|
|
return CarControllerParams.NIDEC_ACCEL_MIN, interp(current_speed, ACCEL_MAX_BP, ACCEL_MAX_VALS) |
|
|
|
|
|
|
|
|
|
|
|
@staticmethod |
|
|
|
@staticmethod |
|
|
|
def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=[], experimental_long=False): # pylint: disable=dangerous-default-value |
|
|
|
def _get_params(ret, candidate, fingerprint, car_fw, experimental_long): |
|
|
|
ret = CarInterfaceBase.get_std_params(candidate, fingerprint) |
|
|
|
|
|
|
|
ret.carName = "honda" |
|
|
|
ret.carName = "honda" |
|
|
|
|
|
|
|
|
|
|
|
if candidate in HONDA_BOSCH: |
|
|
|
if candidate in HONDA_BOSCH: |
|
|
@ -291,10 +290,6 @@ class CarInterface(CarInterfaceBase): |
|
|
|
stop_and_go = candidate in (HONDA_BOSCH | {CAR.CIVIC}) or ret.enableGasInterceptor |
|
|
|
stop_and_go = candidate in (HONDA_BOSCH | {CAR.CIVIC}) or ret.enableGasInterceptor |
|
|
|
ret.minEnableSpeed = -1. if stop_and_go else 25.5 * CV.MPH_TO_MS |
|
|
|
ret.minEnableSpeed = -1. if stop_and_go else 25.5 * CV.MPH_TO_MS |
|
|
|
|
|
|
|
|
|
|
|
# TODO: get actual value, for now starting with reasonable value for |
|
|
|
|
|
|
|
# civic and scaling by mass and wheelbase |
|
|
|
|
|
|
|
ret.rotationalInertia = scale_rot_inertia(ret.mass, ret.wheelbase) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# TODO: start from empirically derived lateral slip stiffness for the civic and scale by |
|
|
|
# TODO: start from empirically derived lateral slip stiffness for the civic and scale by |
|
|
|
# mass and CG position, so all cars will have approximately similar dyn behaviors |
|
|
|
# mass and CG position, so all cars will have approximately similar dyn behaviors |
|
|
|
ret.tireStiffnessFront, ret.tireStiffnessRear = scale_tire_stiffness(ret.mass, ret.wheelbase, ret.centerToFront, |
|
|
|
ret.tireStiffnessFront, ret.tireStiffnessRear = scale_tire_stiffness(ret.mass, ret.wheelbase, ret.centerToFront, |
|
|
|