minor changes
parent
b85ebb501d
commit
1432fb773b
|
|
@ -12,7 +12,7 @@ close all
|
||||||
%% Configuration
|
%% Configuration
|
||||||
options.useRealData = 0; % controls whether or not to use the real data (if available) as the ground truth traj
|
options.useRealData = 0; % controls whether or not to use the real data (if available) as the ground truth traj
|
||||||
options.includeBetweenFactors = 1; % if true, BetweenFactors will be generated between consecutive poses
|
options.includeBetweenFactors = 1; % if true, BetweenFactors will be generated between consecutive poses
|
||||||
options.includeIMUFactors = 0; % if true, IMU type 1 Factors will be generated for the trajectory
|
options.includeIMUFactors = 1; % if true, IMU type 1 Factors will be generated for the trajectory
|
||||||
options.includeCameraFactors = 0; % not fully implemented yet
|
options.includeCameraFactors = 0; % not fully implemented yet
|
||||||
options.trajectoryLength = 4; % length of the ground truth trajectory
|
options.trajectoryLength = 4; % length of the ground truth trajectory
|
||||||
options.subsampleStep = 20;
|
options.subsampleStep = 20;
|
||||||
|
|
@ -78,7 +78,7 @@ gtMeasurementNoise.imu.accelNoiseVector = [0 0 0];
|
||||||
gtMeasurementNoise.imu.gyroNoiseVector = [0 0 0];
|
gtMeasurementNoise.imu.gyroNoiseVector = [0 0 0];
|
||||||
gtMeasurementNoise.cameraPixelNoiseVector = [0 0];
|
gtMeasurementNoise.cameraPixelNoiseVector = [0 0];
|
||||||
|
|
||||||
[gtGraph, gtValues] = imuSimulator.covarianceAnalysisCreateFactorGraph( ...
|
gtGraph = imuSimulator.covarianceAnalysisCreateFactorGraph( ...
|
||||||
gtMeasurements, ... % ground truth measurements
|
gtMeasurements, ... % ground truth measurements
|
||||||
gtValues, ... % ground truth Values
|
gtValues, ... % ground truth Values
|
||||||
gtNoiseModels, ... % noise models to use in this graph
|
gtNoiseModels, ... % noise models to use in this graph
|
||||||
|
|
@ -87,8 +87,8 @@ gtMeasurementNoise.cameraPixelNoiseVector = [0 0];
|
||||||
metadata); % misc data necessary for factor creation
|
metadata); % misc data necessary for factor creation
|
||||||
|
|
||||||
%% Display, printing, and plotting of ground truth
|
%% Display, printing, and plotting of ground truth
|
||||||
%gtGraph.print(sprintf('\nGround Truth Factor graph:\n'));
|
gtGraph.print(sprintf('\nGround Truth Factor graph:\n'));
|
||||||
%gtValues.print(sprintf('\nGround Truth Values:\n '));
|
gtValues.print(sprintf('\nGround Truth Values:\n '));
|
||||||
|
|
||||||
warning('Additional prior on zerobias')
|
warning('Additional prior on zerobias')
|
||||||
warning('Additional PriorFactorLieVector on velocities')
|
warning('Additional PriorFactorLieVector on velocities')
|
||||||
|
|
@ -104,6 +104,7 @@ disp('Plotted ground truth')
|
||||||
%% Monte Carlo Runs
|
%% Monte Carlo Runs
|
||||||
for k=1:numMonteCarloRuns
|
for k=1:numMonteCarloRuns
|
||||||
fprintf('Monte Carlo Run %d.\n', k');
|
fprintf('Monte Carlo Run %d.\n', k');
|
||||||
|
|
||||||
% create a new graph
|
% create a new graph
|
||||||
graph = NonlinearFactorGraph;
|
graph = NonlinearFactorGraph;
|
||||||
|
|
||||||
|
|
@ -126,7 +127,16 @@ for k=1:numMonteCarloRuns
|
||||||
graph.add(BetweenFactorPose3(currentPoseKey-1, currentPoseKey, noisyDeltaPose, noisePose));
|
graph.add(BetweenFactorPose3(currentPoseKey-1, currentPoseKey, noisyDeltaPose, noisePose));
|
||||||
end
|
end
|
||||||
|
|
||||||
graph.print('graph')
|
% graph = imuSimulator.covarianceAnalysisCreateFactorGraph( ...
|
||||||
|
% gtMeasurements, ... % ground truth measurements
|
||||||
|
% gtValues, ... % ground truth Values
|
||||||
|
% gtNoiseModels, ... % noise models to use in this graph
|
||||||
|
% gtMeasurementNoise, ... % noise to apply to measurements
|
||||||
|
% options, ... % options for the graph (e.g. which factors to include)
|
||||||
|
% metadata); % misc data necessary for factor creation
|
||||||
|
|
||||||
|
|
||||||
|
%graph.print('graph')
|
||||||
|
|
||||||
% optimize
|
% optimize
|
||||||
optimizer = GaussNewtonOptimizer(graph, gtValues);
|
optimizer = GaussNewtonOptimizer(graph, gtValues);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue