Skip to content

Commit 93e2116

Browse files
authored
Merge pull request AtsushiSakai#306 from ndinhtuan/master
fix compute jacobian of F in ekf_estimation
2 parents 9274aac + e319032 commit 93e2116

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Localization/extended_kalman_filter/extended_kalman_filter.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def jacob_h():
117117
def ekf_estimation(xEst, PEst, z, u):
118118
# Predict
119119
xPred = motion_model(xEst, u)
120-
jF = jacob_f(xPred, u)
120+
jF = jacob_f(xEst, u)
121121
PPred = jF @ PEst @ jF.T + Q
122122

123123
# Update
@@ -128,7 +128,6 @@ def ekf_estimation(xEst, PEst, z, u):
128128
K = PPred @ jH.T @ np.linalg.inv(S)
129129
xEst = xPred + K @ y
130130
PEst = (np.eye(len(xEst)) - K @ jH) @ PPred
131-
132131
return xEst, PEst
133132

134133

0 commit comments

Comments
 (0)