paramsd: remove usages of llk nested structures (#33317)

* Remove usages of llk nested structures

* Rename to debugFitlerState

* Semicolon

* Initial parameters debugFilterState
old-commit-hash: 51fae363e4
This commit is contained in:
Kacper Rączy 2024-08-16 14:25:42 -07:00 committed by GitHub
parent 11986ddc7f
commit 8315623257
2 changed files with 11 additions and 6 deletions

View File

@ -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 {

View File

@ -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()