|
|
|
@ -10,7 +10,7 @@ from common.conversions import Conversions as CV |
|
|
|
|
from common.kalman.simple_kalman import KF1D |
|
|
|
|
from common.numpy_fast import interp |
|
|
|
|
from common.realtime import DT_CTRL |
|
|
|
|
from selfdrive.car import apply_hysteresis, gen_empty_fingerprint, scale_rot_inertia |
|
|
|
|
from selfdrive.car import apply_hysteresis, gen_empty_fingerprint, scale_rot_inertia, scale_tire_stiffness |
|
|
|
|
from selfdrive.controls.lib.drive_helpers import V_CRUISE_MAX, apply_center_deadzone |
|
|
|
|
from selfdrive.controls.lib.events import Events |
|
|
|
|
from selfdrive.controls.lib.vehicle_model import VehicleModel |
|
|
|
@ -103,6 +103,12 @@ class CarInterfaceBase(ABC): |
|
|
|
|
# civic and scaling by mass and wheelbase |
|
|
|
|
ret.rotationalInertia = scale_rot_inertia(ret.mass, ret.wheelbase) |
|
|
|
|
|
|
|
|
|
# TODO: some car interfaces set stiffness factor |
|
|
|
|
if ret.tireStiffnessFront == 0 or ret.tireStiffnessRear == 0: |
|
|
|
|
# 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 |
|
|
|
|
ret.tireStiffnessFront, ret.tireStiffnessRear = scale_tire_stiffness(ret.mass, ret.wheelbase, ret.centerToFront) |
|
|
|
|
|
|
|
|
|
return ret |
|
|
|
|
|
|
|
|
|
@staticmethod |
|
|
|
|