diff --git a/cereal/log.capnp b/cereal/log.capnp index dcf9463ac8..3e9fd3b311 100644 --- a/cereal/log.capnp +++ b/cereal/log.capnp @@ -2082,9 +2082,15 @@ struct LiveParametersData { stiffnessFactorStd @12 :Float32; steerRatioStd @13 :Float32; roll @14 :Float32; - filterState @15 :LiveLocationKalman.Measurement; + debugFilterState @16 :FilterState; yawRateDEPRECATED @7 :Float32; + filterStateDEPRECATED @15 :LiveLocationKalman.Measurement; + + struct FilterState { + value @0 : List(Float64); + std @1 : List(Float64); + } } struct LiveTorqueParametersData { diff --git a/selfdrive/locationd/paramsd.py b/selfdrive/locationd/paramsd.py index 459021b922..19ded3b4f7 100755 --- a/selfdrive/locationd/paramsd.py +++ b/selfdrive/locationd/paramsd.py @@ -177,7 +177,7 @@ def main(): pInitial = None if DEBUG: - pInitial = np.array(params['filterState']['std']) if 'filterState' in params else None + pInitial = np.array(params['debugFilterState']['std']) if 'debugFilterState' in params else None learner = ParamsLearner(CP, params['steerRatio'], params['stiffnessFactor'], math.radians(params['angleOffsetAverageDeg']), pInitial) angle_offset_average = params['angleOffsetAverageDeg'] @@ -242,10 +242,9 @@ def main(): liveParameters.angleOffsetAverageStd = float(P[States.ANGLE_OFFSET].item()) liveParameters.angleOffsetFastStd = float(P[States.ANGLE_OFFSET_FAST].item()) if DEBUG: - liveParameters.filterState = log.LiveLocationKalman.Measurement.new_message() - liveParameters.filterState.value = x.tolist() - liveParameters.filterState.std = P.tolist() - liveParameters.filterState.valid = True + liveParameters.debugFilterState = log.LiveParametersData.FilterState.new_message() + liveParameters.debugFilterState.value = x.tolist() + liveParameters.debugFilterState.std = P.tolist() msg.valid = sm.all_checks()