From c06e4909c865cf3912cdee4610ab91afcd3b111c Mon Sep 17 00:00:00 2001 From: Yichao <111082392+YichaoDeng@users.noreply.github.com> Date: Mon, 19 Jun 2023 17:02:16 +0800 Subject: [PATCH] fix: [ValueError] setting an array element with a sequence in [fast_slam2] (#851) --- SLAM/FastSLAM2/fast_slam2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SLAM/FastSLAM2/fast_slam2.py b/SLAM/FastSLAM2/fast_slam2.py index 7cd708df..4c6c1033 100644 --- a/SLAM/FastSLAM2/fast_slam2.py +++ b/SLAM/FastSLAM2/fast_slam2.py @@ -405,8 +405,8 @@ def main(): for iz in range(len(z[:, 0])): landmark_id = int(z[2, iz]) - plt.plot([xEst[0], RFID[landmark_id, 0]], [ - xEst[1], RFID[landmark_id, 1]], "-k") + plt.plot([xEst[0][0], RFID[landmark_id, 0]], [ + xEst[1][0], RFID[landmark_id, 1]], "-k") for i in range(N_PARTICLE): plt.plot(particles[i].x, particles[i].y, ".r")