-
Notifications
You must be signed in to change notification settings - Fork 0
/
Panda_Traj1_Plot.m
45 lines (40 loc) · 1.2 KB
/
Panda_Traj1_Plot.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
35
36
37
38
39
40
41
42
43
44
45
%%% Purpose:
%%% Plot the results for the Panda robot performing the pick-place motion
%%%
%%% Last revision: 30 May 2024
clear all
close all
clc
load('results/q_Traj1_PI.txt','-ascii')
load('results/RefMass_Traj1_PI.txt','-ascii')
load('results/nIter_Traj1_PI.txt','-ascii')
load('results/Error_Traj1_PI.txt','-ascii')
load('results/q_Traj1_Grad.txt','-ascii')
load('results/RefMass_Traj1_Grad.txt','-ascii')
load('results/nIter_Traj1_Grad.txt','-ascii')
load('results/Error_Traj1_Grad.txt','-ascii')
figure(1);
plot([RefMass_Traj1_PI;RefMass_Traj1_Grad]');
axis([0 length(RefMass_Traj1_PI) -inf inf]);
axis('auto y');
figure(2);
tiledlayout(2,1)
ax1 = nexttile;
plot(ax1,q_Traj1_PI);
title(ax1,'Pseudo Inverse solution');
axis([0 length(q_Traj1_PI) -3 2.5]);
% axis([0 600 -inf inf]);
% axis('auto y');
ax2 = nexttile;
plot(ax2,q_Traj1_Grad);
title(ax2,'DRM-Minimizing solution');
axis([0 length(q_Traj1_Grad) -3 2.5]);
% axis([0 600 -inf inf]);
% axis('auto y');
figure(3);
p3 = bar(nIter_Traj1_Grad,0.99,'FaceColor',[0.4660 0.6740 0.1880]);
% p3(1).FaceColor = [0.4660 0.6740 0.1880];
hold;
figure(3);
bar(nIter_Traj1_PI,0.9,'FaceColor',[0.9290 0.6940 0.1250]);
hold;