From 40216c3238c5f2163a5503a2719328e86b3f661c Mon Sep 17 00:00:00 2001 From: Rick Lan Date: Mon, 5 Feb 2024 14:22:49 +0800 Subject: [PATCH] set_x not available in this KF1D --- selfdrive/car/interfaces.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/selfdrive/car/interfaces.py b/selfdrive/car/interfaces.py index d8f863b2e..016b9aae1 100644 --- a/selfdrive/car/interfaces.py +++ b/selfdrive/car/interfaces.py @@ -380,7 +380,9 @@ def __init__(self, CP): def update_speed_kf(self, v_ego_raw): if abs(v_ego_raw - self.v_ego_kf.x[0][0]) > 2.0: # Prevent large accelerations when car starts at non zero speed - self.v_ego_kf.set_x([[v_ego_raw], [0.0]]) + # rick - set_x not available in this KF1D + # self.v_ego_kf.set_x([[v_ego_raw], [0.0]]) + self.v_ego_kf.x = [[v_ego_raw], [0.0]] v_ego_x = self.v_ego_kf.update(v_ego_raw) return float(v_ego_x[0]), float(v_ego_x[1])