Skip to content

Commit

Permalink
Revert tuning "test"
Browse files Browse the repository at this point in the history
This reverts commit 61f8a1e.
  • Loading branch information
rafcabezas committed Dec 28, 2020
1 parent 6ddffe7 commit f6fbb77
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions selfdrive/car/tesla/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,18 +130,17 @@ 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
ret.wheelbase = wheelbase_models
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
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f6fbb77

Please sign in to comment.