Fix some unstable MATLAB examples
parent
28fc35af3c
commit
0901237ec0
|
@ -33,7 +33,7 @@ y_shift = Point3(0,1,0);
|
||||||
|
|
||||||
% insert shifted points
|
% insert shifted points
|
||||||
for i=1:nrPoints
|
for i=1:nrPoints
|
||||||
initial.insert(100+i,landmarks{i}.compose(y_shift));
|
initial.insert(100+i,landmarks{i} + y_shift);
|
||||||
end
|
end
|
||||||
|
|
||||||
figure(1);
|
figure(1);
|
||||||
|
|
|
@ -47,7 +47,7 @@ y_shift = Point3(0,1,0);
|
||||||
|
|
||||||
% insert shifted points
|
% insert shifted points
|
||||||
for i=1:nrPoints
|
for i=1:nrPoints
|
||||||
initial.insert(100+i,landmarks{i}.compose(y_shift));
|
initial.insert(100+i,landmarks{i} + y_shift);
|
||||||
end
|
end
|
||||||
|
|
||||||
figure(1);
|
figure(1);
|
||||||
|
@ -146,7 +146,8 @@ for i=1:20
|
||||||
plotPoint3(result.atPoint3(l),'g');
|
plotPoint3(result.atPoint3(l),'g');
|
||||||
end
|
end
|
||||||
|
|
||||||
ty = result.atPose3(1000).translation().y();
|
t = result.atPose3(1000).translation();
|
||||||
|
ty = t(2);
|
||||||
text(5,5,5,sprintf('Y-Transform: %0.2g',ty));
|
text(5,5,5,sprintf('Y-Transform: %0.2g',ty));
|
||||||
|
|
||||||
if(write_video)
|
if(write_video)
|
||||||
|
|
|
@ -50,8 +50,8 @@ result = optimizer.optimize();
|
||||||
% Check result
|
% Check result
|
||||||
CHECK('error',result.atPose2(100).equals(b1,1e-5))
|
CHECK('error',result.atPose2(100).equals(b1,1e-5))
|
||||||
CHECK('error',result.atPose2(10).equals(origin,1e-5))
|
CHECK('error',result.atPose2(10).equals(origin,1e-5))
|
||||||
CHECK('error',result.atPoint2(1).equals(Point2(0,1),1e-5))
|
CHECK('error',result.atPoint2(1) - Point2(0,1) < 1e-5)
|
||||||
CHECK('error',result.atPoint2(2).equals(Point2(0,1),1e-5))
|
CHECK('error',result.atPoint2(2) - Point2(0,1) < 1e-5)
|
||||||
CHECK('error',result.atPose2(20).equals(origin,1e-5))
|
CHECK('error',result.atPose2(20).equals(origin,1e-5))
|
||||||
CHECK('error',result.atPose2(200).equals(b2,1e-5))
|
CHECK('error',result.atPose2(200).equals(b2,1e-5))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue