From f6fbb77be9c7456fb9502b84d2488df2f7a0af57 Mon Sep 17 00:00:00 2001 From: Raf Date: Sun, 27 Dec 2020 17:00:52 -0500 Subject: [PATCH] Revert tuning "test" This reverts commit 61f8a1ebfa537c650192725304f654396bb3bbc9. --- selfdrive/car/tesla/interface.py | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/selfdrive/car/tesla/interface.py b/selfdrive/car/tesla/interface.py index 58b571b0603c5d0..03dbfaad0e6de37 100644 --- a/selfdrive/car/tesla/interface.py +++ b/selfdrive/car/tesla/interface.py @@ -130,8 +130,7 @@ def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=[]): tireStiffnessFront_models = 85100 #BB was 85400 tireStiffnessRear_models = 90000 # will create Kp and Ki for 0, 20, 40, 60 mph - ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0], [0]] - ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]] + ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0., 8.94, 17.88, 26.82 ], [0., 8.94, 17.88, 26.82]] if candidate == CAR.MODELS: stop_and_go = True ret.mass = mass_models @@ -139,9 +138,9 @@ def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=[]): ret.centerToFront = centerToFront_models ret.steerRatio = 11.5 # Kp and Ki for the lateral control for 0, 20, 40, 60 mph - ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.3], [0.1]] + ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[1.20, 0.80, 0.60, 0.30], [0.16, 0.12, 0.08, 0.04]] ret.lateralTuning.pid.kf = 0.00006 # Initial test value TODO: investigate FF steer control for Model S? - ret.steerActuatorDelay = 0.1 + ret.steerActuatorDelay = 0.2 #ret.steerReactance = 1.0 #ret.steerInductance = 1.0 @@ -176,12 +175,6 @@ def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=[]): ret.longitudinalTuning.kiV = [0.08,0.08,0.08, 0.08] - #test - ret.longitudinalTuning.kpBP = [0., 5., 22., 35.] # 0km/h, 18 km/h, 80, 128km/h - ret.longitudinalTuning.kiBP = [0., 5., 22., 35.] - ret.longitudinalTuning.kpV = [0.3, 0.3, 0.35, 0.37] - ret.longitudinalTuning.kiV = [0.07, 0.07, 0.093, 0.092] - else: raise ValueError("unsupported car %s" % candidate) @@ -230,9 +223,6 @@ def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=[]): ret.radarOffCan = not CarSettings().get_value("useTeslaRadar") ret.radarTimeStep = 0.05 #20Hz - ret.communityFeature = True - - return ret # returns a car.CarState