|
|
|
@ -86,7 +86,6 @@ class CarInterface(CarInterfaceBase): |
|
|
|
|
eps_modified = True |
|
|
|
|
|
|
|
|
|
if candidate == CAR.CIVIC: |
|
|
|
|
stop_and_go = True |
|
|
|
|
ret.mass = CivicParams.MASS |
|
|
|
|
ret.wheelbase = CivicParams.WHEELBASE |
|
|
|
|
ret.centerToFront = CivicParams.CENTER_TO_FRONT |
|
|
|
@ -106,7 +105,6 @@ class CarInterface(CarInterfaceBase): |
|
|
|
|
tire_stiffness_factor = 1. |
|
|
|
|
|
|
|
|
|
elif candidate in (CAR.CIVIC_BOSCH, CAR.CIVIC_BOSCH_DIESEL, CAR.CIVIC_2022): |
|
|
|
|
stop_and_go = True |
|
|
|
|
ret.mass = CivicParams.MASS |
|
|
|
|
ret.wheelbase = CivicParams.WHEELBASE |
|
|
|
|
ret.centerToFront = CivicParams.CENTER_TO_FRONT |
|
|
|
@ -116,7 +114,6 @@ class CarInterface(CarInterfaceBase): |
|
|
|
|
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.8], [0.24]] |
|
|
|
|
|
|
|
|
|
elif candidate in (CAR.ACCORD, CAR.ACCORDH): |
|
|
|
|
stop_and_go = True |
|
|
|
|
ret.mass = 3279. * CV.LB_TO_KG + STD_CARGO_KG |
|
|
|
|
ret.wheelbase = 2.83 |
|
|
|
|
ret.centerToFront = ret.wheelbase * 0.39 |
|
|
|
@ -130,7 +127,6 @@ class CarInterface(CarInterfaceBase): |
|
|
|
|
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.6], [0.18]] |
|
|
|
|
|
|
|
|
|
elif candidate == CAR.ACURA_ILX: |
|
|
|
|
stop_and_go = False |
|
|
|
|
ret.mass = 3095. * CV.LB_TO_KG + STD_CARGO_KG |
|
|
|
|
ret.wheelbase = 2.67 |
|
|
|
|
ret.centerToFront = ret.wheelbase * 0.37 |
|
|
|
@ -140,7 +136,6 @@ class CarInterface(CarInterfaceBase): |
|
|
|
|
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.8], [0.24]] |
|
|
|
|
|
|
|
|
|
elif candidate in (CAR.CRV, CAR.CRV_EU): |
|
|
|
|
stop_and_go = False |
|
|
|
|
ret.mass = 3572. * CV.LB_TO_KG + STD_CARGO_KG |
|
|
|
|
ret.wheelbase = 2.62 |
|
|
|
|
ret.centerToFront = ret.wheelbase * 0.41 |
|
|
|
@ -151,7 +146,6 @@ class CarInterface(CarInterfaceBase): |
|
|
|
|
ret.wheelSpeedFactor = 1.025 |
|
|
|
|
|
|
|
|
|
elif candidate == CAR.CRV_5G: |
|
|
|
|
stop_and_go = True |
|
|
|
|
ret.mass = 3410. * CV.LB_TO_KG + STD_CARGO_KG |
|
|
|
|
ret.wheelbase = 2.66 |
|
|
|
|
ret.centerToFront = ret.wheelbase * 0.41 |
|
|
|
@ -169,7 +163,6 @@ class CarInterface(CarInterfaceBase): |
|
|
|
|
ret.wheelSpeedFactor = 1.025 |
|
|
|
|
|
|
|
|
|
elif candidate == CAR.CRV_HYBRID: |
|
|
|
|
stop_and_go = True |
|
|
|
|
ret.mass = 1667. + STD_CARGO_KG # mean of 4 models in kg |
|
|
|
|
ret.wheelbase = 2.66 |
|
|
|
|
ret.centerToFront = ret.wheelbase * 0.41 |
|
|
|
@ -180,7 +173,6 @@ class CarInterface(CarInterfaceBase): |
|
|
|
|
ret.wheelSpeedFactor = 1.025 |
|
|
|
|
|
|
|
|
|
elif candidate == CAR.FIT: |
|
|
|
|
stop_and_go = False |
|
|
|
|
ret.mass = 2644. * CV.LB_TO_KG + STD_CARGO_KG |
|
|
|
|
ret.wheelbase = 2.53 |
|
|
|
|
ret.centerToFront = ret.wheelbase * 0.39 |
|
|
|
@ -190,7 +182,6 @@ class CarInterface(CarInterfaceBase): |
|
|
|
|
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.2], [0.05]] |
|
|
|
|
|
|
|
|
|
elif candidate == CAR.FREED: |
|
|
|
|
stop_and_go = False |
|
|
|
|
ret.mass = 3086. * CV.LB_TO_KG + STD_CARGO_KG |
|
|
|
|
ret.wheelbase = 2.74 |
|
|
|
|
# the remaining parameters were copied from FIT |
|
|
|
@ -201,7 +192,6 @@ class CarInterface(CarInterfaceBase): |
|
|
|
|
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.2], [0.05]] |
|
|
|
|
|
|
|
|
|
elif candidate == CAR.HRV: |
|
|
|
|
stop_and_go = False |
|
|
|
|
ret.mass = 3125 * CV.LB_TO_KG + STD_CARGO_KG |
|
|
|
|
ret.wheelbase = 2.61 |
|
|
|
|
ret.centerToFront = ret.wheelbase * 0.41 |
|
|
|
@ -212,7 +202,6 @@ class CarInterface(CarInterfaceBase): |
|
|
|
|
ret.wheelSpeedFactor = 1.025 |
|
|
|
|
|
|
|
|
|
elif candidate == CAR.ACURA_RDX: |
|
|
|
|
stop_and_go = False |
|
|
|
|
ret.mass = 3935. * CV.LB_TO_KG + STD_CARGO_KG |
|
|
|
|
ret.wheelbase = 2.68 |
|
|
|
|
ret.centerToFront = ret.wheelbase * 0.38 |
|
|
|
@ -222,7 +211,6 @@ class CarInterface(CarInterfaceBase): |
|
|
|
|
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.8], [0.24]] |
|
|
|
|
|
|
|
|
|
elif candidate == CAR.ACURA_RDX_3G: |
|
|
|
|
stop_and_go = True |
|
|
|
|
ret.mass = 4068. * CV.LB_TO_KG + STD_CARGO_KG |
|
|
|
|
ret.wheelbase = 2.75 |
|
|
|
|
ret.centerToFront = ret.wheelbase * 0.41 |
|
|
|
@ -232,7 +220,6 @@ class CarInterface(CarInterfaceBase): |
|
|
|
|
tire_stiffness_factor = 0.677 |
|
|
|
|
|
|
|
|
|
elif candidate == CAR.ODYSSEY: |
|
|
|
|
stop_and_go = False |
|
|
|
|
ret.mass = 4471. * CV.LB_TO_KG + STD_CARGO_KG |
|
|
|
|
ret.wheelbase = 3.00 |
|
|
|
|
ret.centerToFront = ret.wheelbase * 0.41 |
|
|
|
@ -242,7 +229,6 @@ class CarInterface(CarInterfaceBase): |
|
|
|
|
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.28], [0.08]] |
|
|
|
|
|
|
|
|
|
elif candidate == CAR.ODYSSEY_CHN: |
|
|
|
|
stop_and_go = False |
|
|
|
|
ret.mass = 1849.2 + STD_CARGO_KG # mean of 4 models in kg |
|
|
|
|
ret.wheelbase = 2.90 |
|
|
|
|
ret.centerToFront = ret.wheelbase * 0.41 # from CAR.ODYSSEY |
|
|
|
@ -252,7 +238,6 @@ class CarInterface(CarInterfaceBase): |
|
|
|
|
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.28], [0.08]] |
|
|
|
|
|
|
|
|
|
elif candidate in (CAR.PILOT, CAR.PASSPORT): |
|
|
|
|
stop_and_go = False |
|
|
|
|
ret.mass = 4204. * CV.LB_TO_KG + STD_CARGO_KG # average weight |
|
|
|
|
ret.wheelbase = 2.82 |
|
|
|
|
ret.centerToFront = ret.wheelbase * 0.428 |
|
|
|
@ -262,7 +247,6 @@ class CarInterface(CarInterfaceBase): |
|
|
|
|
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.38], [0.11]] |
|
|
|
|
|
|
|
|
|
elif candidate == CAR.RIDGELINE: |
|
|
|
|
stop_and_go = False |
|
|
|
|
ret.mass = 4515. * CV.LB_TO_KG + STD_CARGO_KG |
|
|
|
|
ret.wheelbase = 3.18 |
|
|
|
|
ret.centerToFront = ret.wheelbase * 0.41 |
|
|
|
@ -272,7 +256,6 @@ class CarInterface(CarInterfaceBase): |
|
|
|
|
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.38], [0.11]] |
|
|
|
|
|
|
|
|
|
elif candidate == CAR.INSIGHT: |
|
|
|
|
stop_and_go = True |
|
|
|
|
ret.mass = 2987. * CV.LB_TO_KG + STD_CARGO_KG |
|
|
|
|
ret.wheelbase = 2.7 |
|
|
|
|
ret.centerToFront = ret.wheelbase * 0.39 |
|
|
|
@ -282,7 +265,6 @@ class CarInterface(CarInterfaceBase): |
|
|
|
|
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.6], [0.18]] |
|
|
|
|
|
|
|
|
|
elif candidate == CAR.HONDA_E: |
|
|
|
|
stop_and_go = True |
|
|
|
|
ret.mass = 3338.8 * CV.LB_TO_KG + STD_CARGO_KG |
|
|
|
|
ret.wheelbase = 2.5 |
|
|
|
|
ret.centerToFront = ret.wheelbase * 0.5 |
|
|
|
@ -311,7 +293,8 @@ class CarInterface(CarInterfaceBase): |
|
|
|
|
# min speed to enable ACC. if car can do stop and go, then set enabling speed |
|
|
|
|
# to a negative value, so it won't matter. Otherwise, add 0.5 mph margin to not |
|
|
|
|
# conflict with PCM acc |
|
|
|
|
ret.minEnableSpeed = -1. if (stop_and_go or ret.enableGasInterceptor) else 25.5 * CV.MPH_TO_MS |
|
|
|
|
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 |
|
|
|
|
|
|
|
|
|
# TODO: get actual value, for now starting with reasonable value for |
|
|
|
|
# civic and scaling by mass and wheelbase |
|
|
|
|