From 984032e29e12245aaa4ec913d0f2a235bb40c36c Mon Sep 17 00:00:00 2001 From: Frank Dellaert Date: Thu, 14 Jun 2012 03:55:01 +0000 Subject: [PATCH] Put back Alex's change that I foolishly undid. --- matlab/VisualISAMPlot.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/matlab/VisualISAMPlot.m b/matlab/VisualISAMPlot.m index a2950b5dc..e140686d9 100644 --- a/matlab/VisualISAMPlot.m +++ b/matlab/VisualISAMPlot.m @@ -10,9 +10,10 @@ cla(h); hold on; %% Plot points -for k=1:length(data.J{M}) - j = data.J{M}{k}; - jj = symbol('l', j); +% Can't use data because current frame might not see all points +pointKeys = result.allPoints().keys(); +for j=0:N-1 % NOTE: uses indexing directly from a C++ vector, so zero-indexed + jj = pointKeys.at(j); point_j = result.point(jj); plot3(point_j.x, point_j.y, point_j.z,'marker','o'); P = isam.marginalCovariance(jj);