2024-09-11 15:05:20 +02:00
|
|
|
<\clc
|
2024-08-13 11:45:36 +02:00
|
|
|
clear all
|
|
|
|
close all
|
|
|
|
|
|
|
|
disp('Creating figure')
|
2024-08-31 13:31:35 +02:00
|
|
|
figure('units','normalized','outerposition',[0 0 1 1])
|
2024-08-13 11:45:36 +02:00
|
|
|
disp('Photos will start in 3s')
|
|
|
|
pause(3)
|
|
|
|
|
|
|
|
PLOT_TESTS = [
|
2024-09-11 15:05:20 +02:00
|
|
|
"results-diffdrive/straightline/chill/10-09-2024-22-30-28";
|
|
|
|
"results-diffdrive/straightline/chill_errortheta_pisixths/10-09-2024-22-31-10";
|
|
|
|
"results-diffdrive/straightline/chill_errory/10-09-2024-22-32-34";
|
|
|
|
"results-diffdrive/circle/start_center/10-09-2024-22-33-21";
|
|
|
|
"results-diffdrive/square/10-09-2024-22-40-01";
|
|
|
|
"results-diffdrive/figure8/chill/10-09-2024-22-34-26";
|
|
|
|
"results-diffdrive/figure8/fancyreps/10-09-2024-21-45-28";
|
|
|
|
"results-diffdrive/figure8/toofast/10-09-2024-22-35-17";
|
2024-08-13 11:45:36 +02:00
|
|
|
]
|
|
|
|
|
|
|
|
s_ = size(PLOT_TESTS)
|
|
|
|
for i = 1:s_(1)
|
|
|
|
clearvars -except PLOT_TESTS s_ i
|
|
|
|
|
|
|
|
sPLOT_TEST = convertStringsToChars(PLOT_TESTS(i));
|
|
|
|
PLOT_TEST = [sPLOT_TEST, '/workspace_composite.mat']
|
|
|
|
load(PLOT_TEST)
|
|
|
|
|
2024-08-29 19:36:11 +02:00
|
|
|
dir = ['images-diffdrive/', sPLOT_TEST, '/']
|
2024-08-13 11:45:36 +02:00
|
|
|
mkdir(dir);
|
2024-09-06 15:49:49 +02:00
|
|
|
|
2024-09-07 09:43:08 +02:00
|
|
|
|
2024-08-13 11:45:36 +02:00
|
|
|
for n=1:3
|
|
|
|
clf; plot_trajectory(t{n}, ref_t{n}, q{n})
|
2024-09-07 09:43:08 +02:00
|
|
|
export_fig(gcf, '-transparent', [dir, num2str(n), '_trajectory.png'])
|
2024-08-13 11:45:36 +02:00
|
|
|
clf; plot_error(t{n}, ref_t{n}, q{n})
|
2024-09-07 09:43:08 +02:00
|
|
|
export_fig(gcf, '-transparent', [dir, num2str(n), '_error.png'])
|
2024-08-31 13:31:35 +02:00
|
|
|
clf; plot_doubleinput(t{n}, sim_data{n}.SATURATION, U_track{n}, U_corr{n}, 0)
|
2024-09-07 09:43:08 +02:00
|
|
|
export_fig(gcf, '-transparent', [dir, num2str(n), '_double_input_1x2.png'])
|
2024-08-31 13:31:35 +02:00
|
|
|
clf; plot_doubleinput(t{n}, sim_data{n}.SATURATION, U_track{n}, U_corr{n}, 1)
|
2024-09-07 09:43:08 +02:00
|
|
|
export_fig(gcf, '-transparent', [dir, num2str(n), '_double_input_2x1.png'])
|
2024-08-31 13:31:35 +02:00
|
|
|
clf; plot_tripleinput(t{n}, sim_data{n}.SATURATION, U{n}, U_track{n}, U_corr{n}, 0)
|
2024-09-07 09:43:08 +02:00
|
|
|
export_fig(gcf, '-transparent', [dir, num2str(n), '_triple_input_1x2.png'])
|
2024-08-31 13:31:35 +02:00
|
|
|
clf; plot_tripleinput(t{n}, sim_data{n}.SATURATION, U{n}, U_track{n}, U_corr{n}, 1)
|
2024-09-07 09:43:08 +02:00
|
|
|
export_fig(gcf, '-transparent', [dir, num2str(n), '_triple_input_2x1.png'])
|
2024-08-31 13:31:35 +02:00
|
|
|
|
2024-08-13 11:45:36 +02:00
|
|
|
%clf; plot_input(t{n}, sim_data{n}.SATURATION, U_track{n}, 'track')
|
2024-09-07 09:43:08 +02:00
|
|
|
%export_fig(gcf, '-transparent', [dir, num2str(n), '_track_input.png'])
|
2024-08-13 11:45:36 +02:00
|
|
|
%clf; plot_input(t{n}, sim_data{n}.SATURATION, U_corr{n}, 'corr')
|
2024-09-07 09:43:08 +02:00
|
|
|
%export_fig(gcf, '-transparent', [dir, num2str(n), '_corr_input.png'])
|
2024-09-11 15:05:20 +02:00
|
|
|
|
2024-09-07 09:43:08 +02:00
|
|
|
clf; plot_input(t{n},sim_data{n}.SATURATION, U{n}, '', 0)
|
|
|
|
export_fig(gcf, '-transparent', [dir, num2str(n), '_total_input_1x2.png'])
|
|
|
|
clf; plot_input(t{n},sim_data{n}.SATURATION, U{n}, '', 1)
|
|
|
|
export_fig(gcf, '-transparent', [dir, num2str(n), '_total_input_2x1.png'])
|
2024-08-13 11:45:36 +02:00
|
|
|
end
|
2024-09-07 09:43:08 +02:00
|
|
|
|
2024-09-06 15:49:49 +02:00
|
|
|
% correction difference (multistep, 1-step)
|
|
|
|
clf; plot_input_diff(t{3}, t{2}, U_corr{3}, U_corr{2}, 0, '\textbf{$$\omega_r^{corr, multistep}$$}', '\textbf{$$\omega_r^{corr, 1step}$$}', '\textbf{$$\omega_l^{corr, multistep}$$}', '\textbf{$$\omega_l^{corr, 1step}$$}')
|
|
|
|
export_fig(gcf, '-transparent', [dir, 'corr_input_diff_1x2.eps'])
|
|
|
|
clf; plot_input_diff(t{3}, t{2}, U_corr{3}, U_corr{2}, 1, '\textbf{$$\omega_r^{corr, multistep}$$}', '\textbf{$$\omega_r^{corr, 1step}$$}', '\textbf{$$\omega_l^{corr, multistep}$$}', '\textbf{$$\omega_l^{corr, 1step}$$}')
|
|
|
|
export_fig(gcf, '-transparent', [dir, 'corr_input_diff_2x1.eps'])
|
|
|
|
|
|
|
|
% input difference (saturated track only, 1step)
|
2024-09-11 15:05:20 +02:00
|
|
|
clf; plot_input_diff(t{1}, t{2}, U{1}, U{2}, 0, '\textbf{$$\omega_r^{trackonly_sat}$$}', '\textbf{$$\omega_r^{1step}$$}', '\textbf{$$\omega_l^{trackonly-sat}$$}', '\textbf{$$\omega_l^{1step}$$}')
|
2024-09-06 15:49:49 +02:00
|
|
|
export_fig(gcf, '-transparent', [dir, 'input_diff_track_1step_1x2.eps'])
|
2024-09-11 15:05:20 +02:00
|
|
|
clf; plot_input_diff(t{1}, t{2}, U{1}, U{2}, 1, '\textbf{$$\omega_r^{trackonly_sat}$$}', '\textbf{$$\omega_r^{1step}$$}', '\textbf{$$\omega_l^{trackonly-sat}$$}', '\textbf{$$\omega_l^{1step}$$}')
|
2024-09-06 15:49:49 +02:00
|
|
|
export_fig(gcf, '-transparent', [dir, 'input_diff_track_1step_2x1.eps'])
|
|
|
|
|
|
|
|
% input difference (saturated track only, multistep)
|
2024-09-11 15:05:20 +02:00
|
|
|
clf; plot_input_diff(t{1}, t{3}, U{1}, U{3}, 0, '\textbf{$$\omega_r^{trackonly_sat}$$}', '\textbf{$$\omega_r^{multistep}$$}', '\textbf{$$\omega_l^{1step}$$}', '\textbf{$$\omega_l^{multistep}$$}')
|
2024-09-06 15:49:49 +02:00
|
|
|
export_fig(gcf, '-transparent', [dir, 'input_diff_1step_multistep_1x2.eps'])
|
2024-09-11 15:05:20 +02:00
|
|
|
clf; plot_input_diff(t{1}, t{3}, U{1}, U{3}, 1, '\textbf{$$\omega_r^{trackonly_sat}$$}', '\textbf{$$\omega_r^{multistep}$$}', '\textbf{$$\omega_l^{1step}$$}', '\textbf{$$\omega_l^{multistep}$$}')
|
2024-09-06 15:49:49 +02:00
|
|
|
export_fig(gcf, '-transparent', [dir, 'input_diff_1step_multistep_2x1.eps'])
|
2024-08-31 13:31:35 +02:00
|
|
|
|
2024-09-07 09:43:08 +02:00
|
|
|
% input difference (1-step, multistep)
|
2024-09-11 15:05:20 +02:00
|
|
|
clf; plot_input_diff(t{2}, t{3}, U{2}, U{3}, 0, '\textbf{$$\omega_r^{1step}$$}', '\textbf{$$\omega_r^{multistep}$$}', '\textbf{$$\omega_l^{1step}$$}', '\textbf{$$\omega_l^{multistep}$$}')
|
|
|
|
export_fig(gcf, '-transparent', [dir, 'input_diff_1step_multistep_1x2.eps'])
|
|
|
|
clf; plot_input_diff(t{2}, t{3}, U{2}, U{3}, 1, '\textbf{$$\omega_r^{1step}$$}', '\textbf{$$\omega_r^{multistep}$$}', '\textbf{$$\omega_l^{1step}$$}', '\textbf{$$\omega_l^{multistep}$$}')
|
|
|
|
export_fig(gcf, '-transparent', [dir, 'input_diff_1step_multistep_2x1.eps'])
|
2024-08-13 11:45:36 +02:00
|
|
|
end
|