From ef1c7b6833fe86c5541eb79b8129d0663db00c7a Mon Sep 17 00:00:00 2001 From: Willem Melching Date: Fri, 12 Jun 2020 12:09:04 -0700 Subject: [PATCH] Reset stiffness at beginning of each drive --- selfdrive/locationd/paramsd.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/selfdrive/locationd/paramsd.py b/selfdrive/locationd/paramsd.py index 487dc640e0..ad820b4ea2 100755 --- a/selfdrive/locationd/paramsd.py +++ b/selfdrive/locationd/paramsd.py @@ -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