Skip to content

Commit 6c2ea8c

Browse files
committed
fix LM angle calculation
1 parent 17e0f49 commit 6c2ea8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

SLAM/EKFSLAM/ekf_slam.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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)