Fixed up display options in gtsamExamples
parent
89d5f2c4ec
commit
2678be0646
|
|
@ -49,6 +49,7 @@ result.print(sprintf('\nFinal result:\n '));
|
||||||
cla;
|
cla;
|
||||||
plot(result.xs(),result.ys(),'k*-'); hold on
|
plot(result.xs(),result.ys(),'k*-'); hold on
|
||||||
marginals = graph.marginals(result);
|
marginals = graph.marginals(result);
|
||||||
|
P={};
|
||||||
for i=1:result.size()
|
for i=1:result.size()
|
||||||
pose_i = result.pose(i);
|
pose_i = result.pose(i);
|
||||||
P{i}=marginals.marginalCovariance(i);
|
P{i}=marginals.marginalCovariance(i);
|
||||||
|
|
@ -56,3 +57,4 @@ for i=1:result.size()
|
||||||
end
|
end
|
||||||
axis([-0.6 4.8 -1 1])
|
axis([-0.6 4.8 -1 1])
|
||||||
axis equal
|
axis equal
|
||||||
|
view(2)
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@ result.print(sprintf('\nFinal result:\n '));
|
||||||
cla;
|
cla;
|
||||||
plot(result.xs(),result.ys(),'k*-'); hold on
|
plot(result.xs(),result.ys(),'k*-'); hold on
|
||||||
marginals = graph.marginals(result);
|
marginals = graph.marginals(result);
|
||||||
|
P={};
|
||||||
for i=1:result.size()
|
for i=1:result.size()
|
||||||
pose_i = result.pose(i);
|
pose_i = result.pose(i);
|
||||||
P{i}=marginals.marginalCovariance(i);
|
P{i}=marginals.marginalCovariance(i);
|
||||||
|
|
@ -54,3 +55,4 @@ for i=1:result.size()
|
||||||
end
|
end
|
||||||
axis([-0.6 4.8 -1 1])
|
axis([-0.6 4.8 -1 1])
|
||||||
axis equal
|
axis equal
|
||||||
|
view(2)
|
||||||
|
|
@ -84,5 +84,7 @@ end
|
||||||
plot([pose{1}.x;point{1}.x],[pose{1}.y;point{1}.y],'c-');
|
plot([pose{1}.x;point{1}.x],[pose{1}.y;point{1}.y],'c-');
|
||||||
plot([pose{2}.x;point{1}.x],[pose{2}.y;point{1}.y],'c-');
|
plot([pose{2}.x;point{1}.x],[pose{2}.y;point{1}.y],'c-');
|
||||||
plot([pose{3}.x;point{2}.x],[pose{3}.y;point{2}.y],'c-');
|
plot([pose{3}.x;point{2}.x],[pose{3}.y;point{2}.y],'c-');
|
||||||
|
axis([-0.6 4.8 -1 1])
|
||||||
axis equal
|
axis equal
|
||||||
|
view(2)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -60,9 +60,12 @@ cla;
|
||||||
plot(result.xs(),result.ys(),'k*-'); hold on
|
plot(result.xs(),result.ys(),'k*-'); hold on
|
||||||
plot([result.pose(5).x;result.pose(2).x],[result.pose(5).y;result.pose(2).y],'r-');
|
plot([result.pose(5).x;result.pose(2).x],[result.pose(5).y;result.pose(2).y],'r-');
|
||||||
marginals = graph.marginals(result);
|
marginals = graph.marginals(result);
|
||||||
|
P={};
|
||||||
for i=1:result.size()
|
for i=1:result.size()
|
||||||
pose_i = result.pose(i);
|
pose_i = result.pose(i);
|
||||||
P{i}=marginals.marginalCovariance(i);
|
P{i}=marginals.marginalCovariance(i);
|
||||||
plotPose2(pose_i,'g',P{i})
|
plotPose2(pose_i,'g',P{i})
|
||||||
end
|
end
|
||||||
|
axis([-0.6 4.8 -1 1])
|
||||||
axis equal
|
axis equal
|
||||||
|
view(2)
|
||||||
|
|
|
||||||
|
|
@ -45,5 +45,9 @@ plot3(initial.xs(),initial.ys(),initial.zs(),'g-*');
|
||||||
result = fg.optimize(initial);
|
result = fg.optimize(initial);
|
||||||
|
|
||||||
%% Show Result
|
%% Show Result
|
||||||
hold on; plot3DTrajectory(result,'b-*', true, 0.3); axis equal;
|
hold on; plot3DTrajectory(result,'b-*', true, 0.3);
|
||||||
|
axis([-2 2 -2 2 -1 1]);
|
||||||
|
axis equal
|
||||||
|
view(-37,40)
|
||||||
|
colormap hot
|
||||||
result.print(sprintf('\nFinal result:\n'));
|
result.print(sprintf('\nFinal result:\n'));
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,6 @@ for i=1:result.nrPoses
|
||||||
pose_i = result.pose(symbol('x',i));
|
pose_i = result.pose(symbol('x',i));
|
||||||
plotPose3(pose_i,P,10);
|
plotPose3(pose_i,P,10);
|
||||||
end
|
end
|
||||||
axis([-35 35 -35 35 -15 15]);
|
axis([-40 40 -40 40 -10 20]);axis equal
|
||||||
axis equal
|
view(3)
|
||||||
view(-37,40)
|
colormap('hot')
|
||||||
colormap hot
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue