mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-10-01 03:43:46 +08:00
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
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user