diff --git a/matlab/examples/Pose2SLAMExample_graph.m b/matlab/examples/Pose2SLAMExample_graph.m index 5564ef30e..7a8644432 100644 --- a/matlab/examples/Pose2SLAMExample_graph.m +++ b/matlab/examples/Pose2SLAMExample_graph.m @@ -12,7 +12,7 @@ %% Initialize graph, initial estimate, and odometry noise model = gtsamSharedNoiseModel_Sigmas([0.05; 0.05; 5*pi/180]); -[graph,initial]=load2D('../Data/w100-odom.graph',model); +[graph,initial]=load2D('../../examples/Data/w100-odom.graph',model); initial.print(sprintf('Initial estimate:\n')); %% Add a Gaussian prior on pose x_1 diff --git a/matlab/examples/Pose3SLAMExample_graph.m b/matlab/examples/Pose3SLAMExample_graph.m index 115e4341c..acaf2c920 100644 --- a/matlab/examples/Pose3SLAMExample_graph.m +++ b/matlab/examples/Pose3SLAMExample_graph.m @@ -11,13 +11,13 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% N = 2500; -% filename = '../Data/sphere_smallnoise.graph'; -% filename = '../Data/sphere2500_groundtruth.txt'; -filename = '../Data/sphere2500.txt'; +% filename = '../../examples/Data/sphere_smallnoise.graph'; +% filename = '../../examples/Data/sphere2500_groundtruth.txt'; +filename = '../../examples/Data/sphere2500.txt'; %% Initialize graph, initial estimate, and odometry noise -[graph,initial]=load3D(filename,model,true,N); model = gtsamSharedNoiseModel_Sigmas([0.05; 0.05; 0.05; 5*pi/180; 5*pi/180; 5*pi/180]); +[graph,initial]=load3D(filename,model,true,N); %% Plot Initial Estimate figure(1);clf diff --git a/matlab/examples/VO_Example.m b/matlab/examples/VO_Example.m index fa1512e00..1b2db3bf3 100644 --- a/matlab/examples/VO_Example.m +++ b/matlab/examples/VO_Example.m @@ -12,7 +12,7 @@ %% Load calibration % format: fx fy skew cx cy baseline -calib = dlmread('../Data/VO_calibration.txt'); +calib = dlmread('../../examples/Data/VO_calibration.txt'); K = gtsamCal3_S2Stereo(calib(1), calib(2), calib(3), calib(4), calib(5), calib(6)); stereo_model = gtsamSharedNoiseModel_Sigmas([1.0; 1.0; 1.0]); @@ -24,7 +24,7 @@ initial = visualSLAMValues; %% load the initial poses from VO % row format: camera_id 4x4 pose (row, major) fprintf(1,'Reading data\n'); -cameras = dlmread('../Data/VO_camera_poses.txt'); +cameras = dlmread('../../examples/Data/VO_camera_poses.txt'); for i=1:size(cameras,1) pose = gtsamPose3(reshape(cameras(i,2:17),4,4)'); initial.insertPose(symbol('x',cameras(i,1)),pose); @@ -32,7 +32,7 @@ end %% load stereo measurements and initialize landmarks % camera_id landmark_id uL uR v X Y Z -measurements = dlmread('../Data/VO_stereo_factors.txt'); +measurements = dlmread('../../examples/Data/VO_stereo_factors.txt'); fprintf(1,'Creating Graph\n'); tic for i=1:size(measurements,1)