gtsam/matlab/+gtsam/plotFlyingResults.m

42 lines
684 B
Matlab
Raw Normal View History

2015-01-20 05:18:18 +08:00
function plotFlyingResults(pts3d, covariance, values, marginals)
% plot the visible points on the cylinders and trajectories
% author: Zhaoyang Lv
import gtsam.*
haveMarginals = exist('marginals', 'var');
keys = KeyVector(values.keys);
holdstate = ishold;
hold on
keys = KeyVector(values.keys);
%% plot trajectories
for i = 0:keys.size - 1
if exist('h_result', 'var')
delete(h_result);
end
key = keys.at(i);
pose = keys.at(key);
P = marginals.marginalCovariance(key);
h_result = gtsam.plotPose3(pose, P, 1);
2015-01-20 05:18:18 +08:00
end
%% plot point covariance
2015-01-20 05:18:18 +08:00
if exist('h_result', 'var')
delete(h_result);
end
if ~holdstate
hold off
end
end