|  |  |  | @ -58,13 +58,6 @@ class CarInterface(CarInterfaceBase): | 
			
		
	
		
			
				
					|  |  |  |  |       ret.steerRatio = 13.75 * 1.15 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]] | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.25], [0.05]] | 
			
		
	
		
			
				
					|  |  |  |  |     elif candidate == CAR.KIA_SORENTO: | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kf = 0.00005 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.mass = 1985. + STD_CARGO_KG | 
			
		
	
		
			
				
					|  |  |  |  |       ret.wheelbase = 2.78 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.steerRatio = 14.4 * 1.1   # 10% higher at the center seems reasonable | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]] | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.25], [0.05]] | 
			
		
	
		
			
				
					|  |  |  |  |     elif candidate in [CAR.ELANTRA, CAR.ELANTRA_GT_I30]: | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kf = 0.00006 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.mass = 1275. + STD_CARGO_KG | 
			
		
	
	
		
			
				
					|  |  |  | @ -85,49 +78,6 @@ class CarInterface(CarInterfaceBase): | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.indi.timeConstant = 1.4 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.indi.actuatorEffectiveness = 2.3 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.minSteerSpeed = 60 * CV.KPH_TO_MS | 
			
		
	
		
			
				
					|  |  |  |  |     elif candidate == CAR.GENESIS_G70:  | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kf = 0.00005  | 
			
		
	
		
			
				
					|  |  |  |  |       ret.mass = 1640. + STD_CARGO_KG  | 
			
		
	
		
			
				
					|  |  |  |  |       ret.wheelbase = 2.84  | 
			
		
	
		
			
				
					|  |  |  |  |       ret.steerRatio = 16.5  | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]] | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.16], [0.01]] | 
			
		
	
		
			
				
					|  |  |  |  |     elif candidate == CAR.GENESIS_G80: | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kf = 0.00005 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.mass = 2060. + STD_CARGO_KG | 
			
		
	
		
			
				
					|  |  |  |  |       ret.wheelbase = 3.01 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.steerRatio = 16.5 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]] | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.16], [0.01]] | 
			
		
	
		
			
				
					|  |  |  |  |     elif candidate == CAR.GENESIS_G90: | 
			
		
	
		
			
				
					|  |  |  |  |       ret.mass = 2200 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.wheelbase = 3.15 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.steerRatio = 12.069 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]] | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.16], [0.01]] | 
			
		
	
		
			
				
					|  |  |  |  |     elif candidate == CAR.KIA_NIRO_EV: | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kf = 0.00006 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.mass = 1737. + STD_CARGO_KG | 
			
		
	
		
			
				
					|  |  |  |  |       ret.wheelbase = 2.7 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.steerRatio = 13.73  # Spec | 
			
		
	
		
			
				
					|  |  |  |  |       tire_stiffness_factor = 0.385 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]] | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.25], [0.05]] | 
			
		
	
		
			
				
					|  |  |  |  |     elif candidate in [CAR.KIA_OPTIMA, CAR.KIA_OPTIMA_H]: | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kf = 0.00005 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.mass = 3558. * CV.LB_TO_KG | 
			
		
	
		
			
				
					|  |  |  |  |       ret.wheelbase = 2.80 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.steerRatio = 13.75 | 
			
		
	
		
			
				
					|  |  |  |  |       tire_stiffness_factor = 0.5 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]] | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.25], [0.05]] | 
			
		
	
		
			
				
					|  |  |  |  |     elif candidate == CAR.KIA_STINGER: | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kf = 0.00005 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.mass = 1825. + STD_CARGO_KG | 
			
		
	
		
			
				
					|  |  |  |  |       ret.wheelbase = 2.78 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.steerRatio = 14.4 * 1.15   # 15% higher at the center seems reasonable | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]] | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.25], [0.05]] | 
			
		
	
		
			
				
					|  |  |  |  |     elif candidate == CAR.KONA: | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kf = 0.00005 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.mass = 1275. + STD_CARGO_KG | 
			
		
	
	
		
			
				
					|  |  |  | @ -153,7 +103,32 @@ class CarInterface(CarInterfaceBase): | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]] | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.25], [0.05]] | 
			
		
	
		
			
				
					|  |  |  |  |       ret.minSteerSpeed = 32 * CV.MPH_TO_MS | 
			
		
	
		
			
				
					|  |  |  |  |     elif candidate == CAR.KIA_FORTE: | 
			
		
	
		
			
				
					|  |  |  |  |     elif candidate == CAR.VELOSTER: | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kf = 0.00005 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.mass = 3558. * CV.LB_TO_KG | 
			
		
	
		
			
				
					|  |  |  |  |       ret.wheelbase = 2.80 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.steerRatio = 13.75 * 1.15 | 
			
		
	
		
			
				
					|  |  |  |  |       tire_stiffness_factor = 0.5 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]] | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.25], [0.05]] | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     # Kia | 
			
		
	
		
			
				
					|  |  |  |  |     elif candidate == CAR.KIA_SORENTO: | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kf = 0.00005 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.mass = 1985. + STD_CARGO_KG | 
			
		
	
		
			
				
					|  |  |  |  |       ret.wheelbase = 2.78 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.steerRatio = 14.4 * 1.1   # 10% higher at the center seems reasonable | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]] | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.25], [0.05]] | 
			
		
	
		
			
				
					|  |  |  |  |     elif candidate == CAR.KIA_NIRO_EV: | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kf = 0.00006 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.mass = 1737. + STD_CARGO_KG | 
			
		
	
		
			
				
					|  |  |  |  |       ret.wheelbase = 2.7 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.steerRatio = 13.73  # Spec | 
			
		
	
		
			
				
					|  |  |  |  |       tire_stiffness_factor = 0.385 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]] | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.25], [0.05]] | 
			
		
	
		
			
				
					|  |  |  |  |     elif candidate in [CAR.KIA_OPTIMA, CAR.KIA_OPTIMA_H]: | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kf = 0.00005 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.mass = 3558. * CV.LB_TO_KG | 
			
		
	
		
			
				
					|  |  |  |  |       ret.wheelbase = 2.80 | 
			
		
	
	
		
			
				
					|  |  |  | @ -161,15 +136,46 @@ class CarInterface(CarInterfaceBase): | 
			
		
	
		
			
				
					|  |  |  |  |       tire_stiffness_factor = 0.5 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]] | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.25], [0.05]] | 
			
		
	
		
			
				
					|  |  |  |  |     elif candidate == CAR.VELOSTER: | 
			
		
	
		
			
				
					|  |  |  |  |     elif candidate == CAR.KIA_STINGER: | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kf = 0.00005 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.mass = 1825. + STD_CARGO_KG | 
			
		
	
		
			
				
					|  |  |  |  |       ret.wheelbase = 2.78 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.steerRatio = 14.4 * 1.15   # 15% higher at the center seems reasonable | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]] | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.25], [0.05]] | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     elif candidate == CAR.KIA_FORTE: | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kf = 0.00005 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.mass = 3558. * CV.LB_TO_KG | 
			
		
	
		
			
				
					|  |  |  |  |       ret.wheelbase = 2.80 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.steerRatio = 13.75 * 1.15 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.steerRatio = 13.75 | 
			
		
	
		
			
				
					|  |  |  |  |       tire_stiffness_factor = 0.5 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]] | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.25], [0.05]] | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     # Genesis | 
			
		
	
		
			
				
					|  |  |  |  |     elif candidate == CAR.GENESIS_G70: | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kf = 0.00005 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.mass = 1640. + STD_CARGO_KG | 
			
		
	
		
			
				
					|  |  |  |  |       ret.wheelbase = 2.84 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.steerRatio = 16.5 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]] | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.16], [0.01]] | 
			
		
	
		
			
				
					|  |  |  |  |     elif candidate == CAR.GENESIS_G80: | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kf = 0.00005 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.mass = 2060. + STD_CARGO_KG | 
			
		
	
		
			
				
					|  |  |  |  |       ret.wheelbase = 3.01 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.steerRatio = 16.5 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]] | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.16], [0.01]] | 
			
		
	
		
			
				
					|  |  |  |  |     elif candidate == CAR.GENESIS_G90: | 
			
		
	
		
			
				
					|  |  |  |  |       ret.mass = 2200 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.wheelbase = 3.15 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.steerRatio = 12.069 | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]] | 
			
		
	
		
			
				
					|  |  |  |  |       ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.16], [0.01]] | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     # these cars require a special panda safety mode due to missing counters and checksums in the messages | 
			
		
	
		
			
				
					|  |  |  |  |     if candidate in [CAR.HYUNDAI_GENESIS, CAR.IONIQ_EV_LTD, CAR.IONIQ, CAR.KONA_EV, CAR.KIA_SORENTO, CAR.SONATA_2019, | 
			
		
	
		
			
				
					|  |  |  |  |                      CAR.KIA_NIRO_EV, CAR.KIA_OPTIMA, CAR.VELOSTER, CAR.KIA_STINGER, CAR.GENESIS_G70]: | 
			
		
	
	
		
			
				
					|  |  |  | 
 |