1 function plotCoopVel(rootPath, coordName)
8 fileName = strcat('coopVel.txt');
9 xDot = importMatrices(strcat(rootPath, coordName, fileName));
10 xDotSqueez = squeeze(xDot);
11 nStep = size(xDot, 3);
13 %millisecond indicated in missionManager
15 totSecondPassed = sControlLoop*(nStep-1);
16 seconds = 0:sControlLoop:totSecondPassed;
21 figure('Renderer', 'painters', 'Position', [0 0 710 550])
24 plot(seconds, xDotSqueez(1:3,:));
25 %vertical line to show where insertion begin
26 plot([secInsertion; secInsertion], [-0.1 0.02]', '--m');
27 text([secInsertion+2], [0.011], {
'\rightarrow Inside the hole'},
'Color',
'magenta',
'FontSize',14);
30 xlab = xlabel(
'time [s]');
31 ylab = ylabel(
'Velocities [m/s]');
32 tq = title(
'Cooperative Tool Linear Velocities');
33 leg = legend(
'$\dot{x}$',
'$\dot{y}$',
'$\dot{z}$');
37 plot(seconds, xDotSqueez(4:6,:));
38 %vertical line to show where insertion begin
39 plot([secInsertion; secInsertion], [ylim]', '--m');
40 text([secInsertion+2], [0.0027], {
'\rightarrow Inside the hole'},
'Color',
'magenta',
'FontSize',14);
42 xlab2 = xlabel(
'time [s]');
43 ylab2 = ylabel(
'Velocities [rad/s]');
44 tq2 = title(
'Cooperative Tool Angular Velocities');
45 leg2 = legend(
'$w_x$',
'$w_y$',
'$w_z$');
47 set(leg,
'Interpreter',
'latex',
'FontSize' , legFontSize);
48 set (tq,
'Interpreter',
'latex',
'FontSize' , titleFontSize);
49 set (ylab,
'Interpreter',
'latex',
'FontSize', ylabFontSize);
50 set (xlab,
'Interpreter',
'latex',
'FontSize', xlabFontSize);
51 set(leg2,
'Interpreter',
'latex',
'FontSize' , legFontSize);
52 set (tq2,
'Interpreter',
'latex',
'FontSize' , titleFontSize);
53 set (ylab2,
'Interpreter',
'latex',
'FontSize', ylabFontSize);
54 set (xlab2,
'Interpreter',
'latex',
'FontSize', xlabFontSize);
68 % ylab = ylabel(strcat(
'Cooperative vel [m/s], [rad/s]'));
69 % tq = title(
'Cooperative velocity of tool');
72 % leg = legend(
'$\dot{x}$',
'$\dot{y}$',
'$\dot{z}$',
'$w_x$',
'$w_y$',
'$w_z$');
74 % leg = legend(
'$\dot{x}$',
'$\dot{y}$',
'$\dot{z}$',
'$w_y$',
'$w_z$');
77 %
set(leg,
'Interpreter',
'latex',
'FontSize' , legFontSize);
78 %
set (tq,
'Interpreter',
'latex',
'FontSize' , titleFontSize);
79 %
set (ylab,
'Interpreter',
'latex',
'FontSize', ylabFontSize);