Skip to content

Commit f419f6a

Browse files
authored
Merge pull request AtsushiSakai#178 from Taka-Kazu/modify-ekfslam
fixed bug of ekf_slam.py
2 parents 17e0f49 + 78f3d52 commit f419f6a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

SLAM/EKFSLAM/ekf_slam.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
MAX_RANGE = 20.0 # maximum observation range
2121
M_DIST_TH = 2.0 # Threshold of Mahalanobis distance for data association.
2222
STATE_SIZE = 3 # State size [x,y,yaw]
23-
LM_SIZE = 2 # LM srate size [x,y]
23+
LM_SIZE = 2 # LM state size [x,y]
2424

2525
show_animation = True
2626

@@ -170,7 +170,7 @@ def calc_innovation(lm, xEst, PEst, z, LMid):
170170
delta = lm - xEst[0:2]
171171
q = (delta.T @ delta)[0, 0]
172172
#zangle = math.atan2(delta[1], delta[0]) - xEst[2]
173-
zangle = math.atan2(delta[1, 0], delta[0, 0]) - xEst[2]
173+
zangle = math.atan2(delta[1, 0], delta[0, 0]) - xEst[2, 0]
174174
zp = np.array([[math.sqrt(q), pi_2_pi(zangle)]])
175175
y = (z - zp).T
176176
y[1] = pi_2_pi(y[1])

0 commit comments

Comments
 (0)