From c0ff654602d7905757b99c1973bf6d27db2e5477 Mon Sep 17 00:00:00 2001 From: Vivek Aithal Date: Wed, 6 Oct 2021 16:22:18 -0700 Subject: [PATCH] Add paramsd Stdev to message (#22443) * add STD to message * use modified names for car_kf state stdev atttributes * update refs * add modofied cereal * update refs old-commit-hash: 244fbde56e90a937c887b3a24edce7da2ee5c699 --- cereal | 2 +- selfdrive/locationd/paramsd.py | 5 +++++ selfdrive/test/process_replay/ref_commit | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/cereal b/cereal index d5a85fe5d7..517fd56398 160000 --- a/cereal +++ b/cereal @@ -1 +1 @@ -Subproject commit d5a85fe5d7e97d0374bbb94b3d64aaf1ab9cee83 +Subproject commit 517fd56398c0d3ae4d0a142849b81e2f025d8572 diff --git a/selfdrive/locationd/paramsd.py b/selfdrive/locationd/paramsd.py index 3eaf8cec00..872ff6c57d 100755 --- a/selfdrive/locationd/paramsd.py +++ b/selfdrive/locationd/paramsd.py @@ -139,6 +139,7 @@ def main(sm=None, pm=None): if sm.updated['liveLocationKalman']: x = learner.kf.x + P = np.sqrt(learner.kf.P.diagonal()) if not all(map(math.isfinite, x)): cloudlog.error("NaN in liveParameters estimate. Resetting to default values") learner = ParamsLearner(CP, CP.steerRatio, 1.0, 0.0) @@ -162,6 +163,10 @@ def main(sm=None, pm=None): 0.2 <= msg.liveParameters.stiffnessFactor <= 5.0, min_sr <= msg.liveParameters.steerRatio <= max_sr, )) + msg.liveParameters.steerRatioStd = float(P[States.STEER_RATIO]) + msg.liveParameters.stiffnessFactorStd = float(P[States.STIFFNESS]) + msg.liveParameters.angleOffsetAverageStd = float(P[States.ANGLE_OFFSET]) + msg.liveParameters.angleOffsetFastStd = float(P[States.ANGLE_OFFSET_FAST]) if sm.frame % 1200 == 0: # once a minute params = { diff --git a/selfdrive/test/process_replay/ref_commit b/selfdrive/test/process_replay/ref_commit index 2e2bfb680f..e184c864f9 100644 --- a/selfdrive/test/process_replay/ref_commit +++ b/selfdrive/test/process_replay/ref_commit @@ -1 +1 @@ -a69e0b5fe4f506b8b9d372bfa68d8a47cf105a3f \ No newline at end of file +d643d6ff47522e00d06035ab0cb9e14d1c0c0ae0 \ No newline at end of file