mirror of
https://github.com/AtsushiSakai/PythonRobotics.git
synced 2026-01-12 22:08:33 -05:00
Fix parameter of jacobian in EKF-SLAM
This commit is contained in:
@@ -305,8 +305,8 @@
|
||||
" :returns: predicted state vector, predicted covariance, jacobian of control vector, transition fx\n",
|
||||
" \"\"\"\n",
|
||||
" S = STATE_SIZE\n",
|
||||
" xEst[0:S] = motion_model(xEst[0:S], u)\n",
|
||||
" G, Fx = jacob_motion(xEst[0:S], u)\n",
|
||||
" xEst[0:S] = motion_model(xEst[0:S], u)\n",
|
||||
" # Fx is an an identity matrix of size (STATE_SIZE)\n",
|
||||
" # sigma = G*sigma*G.T + Noise\n",
|
||||
" PEst[0:S, 0:S] = G.T @ PEst[0:S, 0:S] @ G + Fx.T @ Cx @ Fx\n",
|
||||
|
||||
@@ -29,8 +29,8 @@ show_animation = True
|
||||
def ekf_slam(xEst, PEst, u, z):
|
||||
# Predict
|
||||
S = STATE_SIZE
|
||||
xEst[0:S] = motion_model(xEst[0:S], u)
|
||||
G, Fx = jacob_motion(xEst[0:S], u)
|
||||
xEst[0:S] = motion_model(xEst[0:S], u)
|
||||
PEst[0:S, 0:S] = G.T @ PEst[0:S, 0:S] @ G + Fx.T @ Cx @ Fx
|
||||
initP = np.eye(2)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user