-
Notifications
You must be signed in to change notification settings - Fork 822
/
Copy pathplot_city10000.m
34 lines (27 loc) · 1 KB
/
plot_city10000.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
clear;
gt = dlmread('Data/ISAM2_GT_city10000.txt');
% Generate by running `make ISAM2_City10000.run`
eh_poses = dlmread('../build/examples/ISAM2_City10000.txt');
% Generate by running `make Hybrid_City10000.run`
h_poses = dlmread('../build/examples/Hybrid_City10000.txt');
% Plot the same number of GT poses as estimated ones
gt = gt(1:size(h_poses, 1), :);
eh_poses = eh_poses(1:size(h_poses, 1), :);
figure(1)
hold on;
axis equal;
axis([-65 65 -75 60])
% title('City10000 result with Hybrid Factor Graphs');
plot(gt(:,1), gt(:,2), '--', 'LineWidth', 4, 'color', [0.1 0.7 0.1 0.5]);
plot(h_poses(:,1), h_poses(:,2), '-', 'LineWidth', 2, 'color', [0.1 0.1 0.9 0.4]);
legend('Ground truth', 'Hybrid Factor Graphs');
hold off;
figure(2)
hold on;
axis equal;
axis([-65 65 -75 60])
% title('City10000 result with ISAM2');
plot(gt(:,1), gt(:,2), '--', 'LineWidth', 4, 'color', [0.1 0.7 0.1 0.5]);
plot(eh_poses(:,1), eh_poses(:,2), '-', 'LineWidth', 2, 'color', [0.9 0.1 0. 0.4]);
legend('Ground truth', 'ISAM2');
hold off;