Updated two code files.

release/4.3a0
yao 2016-06-15 15:00:24 -04:00
parent 0472b14ebf
commit f933008b48
2 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,6 @@
// add unary measurement factors, like GPS, on all three poses // add unary measurement factors, like GPS, on all three poses
noiseModel::Diagonal::shared_ptr unaryNoise = noiseModel::Diagonal::shared_ptr unaryNoise =
unaryNoise::Diagonal::Sigmas(Vector2(0.1, 0.1)); // 10cm std on x,y noiseModel::Diagonal::Sigmas(Vector2(0.1, 0.1)); // 10cm std on x,y
graph.add(boost::make_shared<UnaryFactor>(1, 0.0, 0.0, unaryNoise)); graph.add(boost::make_shared<UnaryFactor>(1, 0.0, 0.0, unaryNoise));
graph.add(boost::make_shared<UnaryFactor>(2, 2.0, 0.0, unaryNoise)); graph.add(boost::make_shared<UnaryFactor>(2, 2.0, 0.0, unaryNoise));
graph.add(boost::make_shared<UnaryFactor>(3, 4.0, 0.0, unaryNoise)); graph.add(boost::make_shared<UnaryFactor>(3, 4.0, 0.0, unaryNoise));

View File

@ -1,9 +1,9 @@
%% Add factors for all measurements %% Add factors for all measurements
noise = noiseModel.Isotropic.Sigma(2,measurementNoiseSigma); noise = noiseModel.Isotropic.Sigma(2, measurementNoiseSigma);
for i=1:length(Z), for i = 1:length(Z),
for k=1:length(Z{i}) for k = 1:length(Z{i})
j = J{i}{k}; j = J{i}{k};
G.add(GenericProjectionFactorCal3_S2( G.add(GenericProjectionFactorCal3_S2(
Z{i}{k}, noise, symbol('x',i), symbol('p',j), K)); Z{i}{k}, noise, symbol('x', i), symbol('p', j), K));
end end
end end