AUV-Coop-Assembly
Master Thesis for Robotics Engineering. Cooperative peg-in-hole assembly with two underwater vehicles guided by vision
main4thesis.m
1 clearvars;
2 
3 rootPath = 'log/logPegBella/withVision/';
4 robotNameA = 'g500_A';
5 robotNameB = 'g500_B';
6 coordName = 'Coordinator/';
7 set(groot,'defaultLineLineWidth',1.5)
8 
9 %millisecond indicated in missionManager
10 global sControlLoop
11 sControlLoop = 0.1;
12 
13 %second of insertion phase
14 global secInsertion
15 secInsertion = 77; %withVision exp
16 %secInsertion = 23.4; %errorALL exp
17 
18 %% plot yDot
19 %plotYDotDivided(rootPath, robotNameA, 'yDotFinalWithCollision');
20 
21 %% plot Force Task things
22 
23 taskName = 'FORCE_INSERTION';
24 plotTask(rootPath, robotNameA, taskName);
25 plotTask(rootPath, robotNameB, taskName);
26 
27 %% plot yDots and related thing
28 %plotYDotDivided(rootPath, robotNameA, 'yDotTPIK1');
29 %plotYDotDivided(rootPath, robotNameB, 'yDotTPIK1');
30 plotYDotDivided(rootPath, robotNameA, 'yDotFinal'); %after cooperation
31 plotYDotDivided(rootPath, robotNameB, 'yDotFinal'); %after cooperation
32 %plotYDotDivided(rootPath, robotNameA, 'yDotFinalWithCollision'); %after cooperation with collision
33 
34 
35 plotForcesTorquesWorld(rootPath, robotNameA, 'yes'); %yes to plot norm
36 %plotForcesTorquesWorld(rootPath, robotNameB, 'yes'); %yes to plot norm
37 
38 
39 plot6DVectorDivided(rootPath, robotNameA, 'toolVel4Collision');
40 plot6DVectorDivided(rootPath, robotNameB, 'toolVel4Grasp');
41 
42 
43 %% plot coord things
44 %here are plotted velocities of tool, not the final one but the
45 %intermidiate that are input and output of the cooperation policy
46 %plotNonCoopVel(rootPath, coordName, robotNameA);
47 %plotNonCoopVel(rootPath, coordName, robotNameB);
48 plotCoopVel(rootPath, coordName); %this is the feasible one
49 
50 
51 %% Plot goal moving for change_goal and pose tool
52 plotTransformMatrices(rootPath, coordName);
53 plotGenericErrorDivided(strcat(rootPath, coordName, "realgoal_Tool_error.txt"),'realgoal_Tool_error', 'yes');
54 
55 
56 %% Vision
57 %pathName = rootPath + "g500_C/errorStereoL.txt";
58 %plotGenericErrorDivided(pathName, "errorStereo", 'no')
ABSTRACT class task. Each task is a derived class of this class. It contains all the variable that th...
Definition: task.h:17