Reset stiffness at beginning of each drive

albatross
Willem Melching 2020-06-12 12:09:04 -07:00
parent 7e80ae3f09
commit ef1c7b6833
1 changed files with 4 additions and 0 deletions

View File

@ -100,6 +100,10 @@ def main(sm=None, pm=None):
}
cloudlog.info("Parameter learner resetting to default values")
# When driving in wet conditions the stiffness can go down, and then be too low on the next drive
# Without a way to detect this we have to reset the stiffness every drive
params['stiffnessFactor'] = 1.0
learner = ParamsLearner(CP, params['steerRatio'], params['stiffnessFactor'], math.radians(params['angleOffsetAverage']))
min_sr, max_sr = 0.5 * CP.steerRatio, 2.0 * CP.steerRatio