diff --git a/Files_4_thesis/Different_angle/docking_different_angle.m b/Files_4_thesis/Different_angle/docking_different_angle.m index 1417f0fe01da2041b56acdf318cdc9eedfc8f437..d90efb21642e530ec7aee84afc9b9a393a917653 100644 --- a/Files_4_thesis/Different_angle/docking_different_angle.m +++ b/Files_4_thesis/Different_angle/docking_different_angle.m @@ -202,6 +202,8 @@ Omega_Z_data_3 = Vel_Matrix_data_3(:,7); % marker position figure; +set(gcf,'color','white'); + subplot(3,1,1); plot(t_P_sec_data_1,Pose_X_data_1,'LineWidth',3); hold on @@ -209,14 +211,12 @@ plot(t_P_sec_data_2,Pose_X_data_2,'r','LineWidth',1.7); hold on plot(t_P_sec_data_3,Pose_X_data_3,'g','LineWidth',1.6); -title('Marker Pose Along x_{mar} - axis'); -% set(t,'interpreter','latex'); -% xlabel('$ time [sec]$','interpreter','latex'); +title('Pose estimation in marker coordinate system'); ylabel('${x_{mar}}$ [m]','interpreter','latex','FontSize',14); -grid on -% axis([0 45 -.01 .2]); + l2 = legend('${Config. 3}$', '${Center}$','${Config. 4}$'); set(l2,'interpreter','latex','FontSize',11); +legend('boxoff'); subplot(3,1,2); plot(t_P_sec_data_1,Pose_Y_data_1,'LineWidth',3); @@ -224,12 +224,7 @@ hold on plot(t_P_sec_data_2,Pose_Y_data_2,'r','LineWidth',1.7); hold on plot(t_P_sec_data_3,Pose_Y_data_3,'g','LineWidth',1.6); - -title('Marker Pose Along y_{mar} - axis'); -% xlabel('$ time [sec]$','interpreter','latex'); ylabel('${y_{mar}}$ [m]','interpreter','latex','FontSize',14); -grid on -% axis([0 46 -.2 .1]); subplot(3,1,3); plot(t_P_sec_data_1,Theta_data_1,'LineWidth',3); @@ -238,14 +233,13 @@ plot(t_P_sec_data_2,Theta_data_2,'r','LineWidth',1.7); hold on plot(t_P_sec_data_3,Theta_data_3,'g','LineWidth',1.6); -title('Marker Pose Along \theta_{mar} - axis'); xlabel('$ time [sec]$','interpreter','latex','FontSize',14); ylabel('${\theta_{mar}}$ [rad]','interpreter','latex','FontSize',14); -grid on -% axis([0 46 -.1 .15]); % control signals figure; +set(gcf,'color','white'); + subplot(3,1,1); plot(t_V_sec_data_1,Vel_X_data_1,'LineWidth',3); @@ -254,14 +248,11 @@ plot(t_V_sec_data_2,Vel_X_data_2,'r','LineWidth',1.7); hold on plot(t_V_sec_data_3,Vel_X_data_3,'g','LineWidth',1.6); -title('Control Signal Along x_{Rob} - axis'); -% xlabel('$ time [sec]$','interpreter','latex'); +title('Control Signals'); ylabel('$\dot{x}_{Rob}$ [m/s]','interpreter','latex','FontSize',14); -grid on -axis([0 45 -.01 .2]); l2 = legend('${Config. 3}$', '${Center}$','${Config. 4}$'); set(l2,'interpreter','latex','FontSize',11); - +legend('boxoff') subplot(3,1,2); plot(t_V_sec_data_1,Vel_Y_data_1,'LineWidth',3); @@ -269,13 +260,8 @@ hold on plot(t_V_sec_data_2,Vel_Y_data_2,'r','LineWidth',1.7); hold on plot(t_V_sec_data_3,Vel_Y_data_3,'g','LineWidth',1.6); - - -title('Control Signal Along y_{Rob} - axis'); -% xlabel('$ time [sec]$','interpreter','latex'); ylabel('$\dot{y}_{Rob}$ [m/s]','interpreter','latex','FontSize',14); -grid on -% axis([0 46 -.2 .1]); + subplot(3,1,3); plot(t_V_sec_data_1,Omega_Z_data_1,'LineWidth',3); @@ -283,14 +269,8 @@ hold on plot(t_V_sec_data_2,Omega_Z_data_2,'r','LineWidth',1.7); hold on plot(t_V_sec_data_3,Omega_Z_data_3,'g','LineWidth',1.6); - -title('Control Signal Along \theta_{Rob} - axis'); xlabel('$ time [sec]$','interpreter','latex','FontSize',14); ylabel('$\dot{\theta}_{Rob}$ [rad/s]','interpreter','latex','FontSize',14); -grid on -% axis([0 46 -.1 .15]); - - % Trajectory @@ -322,6 +302,8 @@ grid on % % quiver(y_arrow,x_arrow,Vy,Vx,'r--','LineWidth',1.5); % figure; +set(gcf,'color','white'); + subplot(1,3,1); plot(Pose_Y_data_1,Pose_X_data_1,'b','LineWidth',2); % hold on @@ -340,11 +322,9 @@ plot(Pose_Y_data_3,Pose_X_data_3,'g','LineWidth',2); hold on plot(y_circle,x_circle,'k--','LineWidth',3.4); -title('Entire Area'); -xlabel('${y_{mar}}$ [m]','interpreter','latex','FontSize',14); +title('Approach zone + SM zone + Target area'); ylabel('${x_{mar}}$ [m]','interpreter','latex','FontSize',14); axis([-.4 .4 .18 1.4]); -grid on subplot(1,3,2); plot(Pose_Y_data_1,Pose_X_data_1,'b','LineWidth',1.6); @@ -355,11 +335,9 @@ plot(Pose_Y_data_3,Pose_X_data_3,'g','LineWidth',1.6); hold on plot(y_circle,x_circle,'k--','LineWidth',3.4); -title('SM zone'); +title('SM zone + Target area'); xlabel('${y_{mar}}$ [m]','interpreter','latex','FontSize',14); -% ylabel('${X}$ [m]','interpreter','latex','FontSize',11); axis([-.01 0.02 .195 .32]); -grid on subplot(1,3,3); plot(Pose_Y_data_1,Pose_X_data_1,'b','LineWidth',2); @@ -370,11 +348,8 @@ plot(Pose_Y_data_3,Pose_X_data_3,'g','LineWidth',2); hold on plot(y_circle,x_circle,'k--','LineWidth',3.4); -title('Target'); -xlabel('${y_{mar}}$ [m]','interpreter','latex','FontSize',14); -% ylabel('${X}$ [m]','interpreter','latex','FontSize',11); +title('Target area'); axis([0.0125 .015 .1995 .2055]); -grid on l = legend('${Config. 3}$', '${Center}$','${Config. 4}$','Target'); set(l,'interpreter','latex','FontSize',11); diff --git a/Files_4_thesis/Different_controllers/docking_with_PID_controller.m b/Files_4_thesis/Different_controllers/docking_with_PID_controller.m index 597277d6a841376b2d354753588e8c3c5729a0ca..4c77bac4a54d5965e805e137625a7f3fa0209b6a 100644 --- a/Files_4_thesis/Different_controllers/docking_with_PID_controller.m +++ b/Files_4_thesis/Different_controllers/docking_with_PID_controller.m @@ -309,6 +309,8 @@ Omega_Z_data_5 = Vel_Matrix_data_5(:,7); % marker position figure; +set(gcf,'color','white'); + subplot(3,1,1); plot(t_P_sec_data_1,Pose_X_data_1,'LineWidth',3); hold on @@ -317,16 +319,12 @@ hold on plot(t_P_sec_data_3,Pose_X_data_3,'g','LineWidth',2.3); hold on plot(t_P_sec_data_4,Pose_X_data_4,'m','LineWidth',1.6); +title('Pose estimation in marker coordinate system'); +ylabel('${x_{mar}}$ [m]','interpreter','latex','FontSize',14); - -title('Marker Pose Along X_{mar} - Axis'); -% set(t,'interpreter','latex'); -% xlabel('$ time [sec]$','interpreter','latex'); -ylabel('${X_{mar}}$ [m]','interpreter','latex','FontSize',12); -grid on -% axis([0 45 -.01 .2]); l2 = legend('${P_y = 0.86, I_y = 0, D_y = 0.002}$', '${P_y = 0.66, I_y = 0, D_y = 0.1}$','${P_y = 0.86, I_y = 0, D_y = 0.1}$','${P_y = 0.51, I_y = 0.0005, D_y = 0.05}$'); set(l2,'interpreter','latex','FontSize',11); +legend('boxoff'); subplot(3,1,2); plot(t_P_sec_data_1,Pose_Y_data_1,'LineWidth',3); @@ -337,11 +335,7 @@ plot(t_P_sec_data_3,Pose_Y_data_3,'g','LineWidth',2.3); hold on plot(t_P_sec_data_4,Pose_Y_data_4,'m','LineWidth',1.6); -title('Marker Pose Along Y_{mar} - Axis'); -% xlabel('$ time [sec]$','interpreter','latex'); -ylabel('${Y_{mar}}$ [m]','interpreter','latex','FontSize',12); -grid on -% axis([0 46 -.2 .1]); +ylabel('${y_{mar}}$ [m]','interpreter','latex','FontSize',14); subplot(3,1,3); plot(t_P_sec_data_1,Theta_data_1,'LineWidth',3); @@ -352,14 +346,13 @@ plot(t_P_sec_data_3,Theta_data_3,'g','LineWidth',2.3); hold on plot(t_P_sec_data_4,Theta_data_4,'m','LineWidth',1.6); -title('Marker Pose Along \theta_{mar} - Axis'); -xlabel('$ time [sec]$','interpreter','latex','FontSize',12); -ylabel('${\theta_{mar}}$ [rad]','interpreter','latex','FontSize',12); -grid on -% axis([0 46 -.1 .15]); +xlabel('$ time [sec]$','interpreter','latex','FontSize',14); +ylabel('${\theta_{mar}}$ [rad]','interpreter','latex','FontSize',14); % control signals figure; +set(gcf,'color','white'); + subplot(3,1,1); plot(t_V_sec_data_1,Vel_X_data_1,'LineWidth',3); @@ -370,13 +363,13 @@ plot(t_V_sec_data_3,Vel_X_data_3,'g','LineWidth',2.3); hold on plot(t_V_sec_data_4,Vel_X_data_4,'m','LineWidth',1.6); -title('Control Signal Along X_{rob} - Axis'); -% xlabel('$ time [sec]$','interpreter','latex'); -ylabel('$\dot{X_{rob}}$ [m/s]','interpreter','latex','FontSize',12); -grid on +title('Control Signals'); +ylabel('$\dot{x}_{Rob}$ [m/s]','interpreter','latex','FontSize',14); axis([0 45 -.01 .2]); + l2 = legend('${P_y = 0.86, I_y = 0, D_y = 0.002}$', '${P_y = 0.66, I_y = 0, D_y = 0.1}$','${P_y = 0.86, I_y = 0, D_y = 0.1}$','${P_y = 0.51, I_y = 0.0005, D_y = 0.05}$'); set(l2,'interpreter','latex','FontSize',11); +legend('boxoff'); subplot(3,1,2); @@ -387,13 +380,7 @@ hold on plot(t_V_sec_data_3,Vel_Y_data_3,'g','LineWidth',2.3); hold on plot(t_V_sec_data_4,Vel_Y_data_4,'m','LineWidth',1.6); - - -title('Control Signal Along Y_{rob} - Axis'); -% xlabel('$ time [sec]$','interpreter','latex'); -ylabel('$\dot{Y_{rob}}$ [m/s]','interpreter','latex','FontSize',12); -grid on -% axis([0 46 -.2 .1]); +ylabel('$\dot{y}_{Rob}$ [m/s]','interpreter','latex','FontSize',14); subplot(3,1,3); plot(t_V_sec_data_1,Omega_Z_data_1,'LineWidth',3); @@ -403,13 +390,8 @@ hold on plot(t_V_sec_data_3,Omega_Z_data_3,'g','LineWidth',2.3); hold on plot(t_V_sec_data_4,Omega_Z_data_4,'m','LineWidth',1.6); - -title('Control Signal Along \theta_{rob} - Axis'); -xlabel('$ time [sec]$','interpreter','latex','FontSize',12); -ylabel('$\dot{\theta_{rob}}$ [rad/s]','interpreter','latex','FontSize',12); -grid on -% axis([0 46 -.1 .15]); - +xlabel('$ time [sec]$','interpreter','latex','FontSize',14); +ylabel('$\dot{\theta}_{Rob}$ [rad/s]','interpreter','latex','FontSize',14); % Trajectory @@ -442,6 +424,8 @@ grid on % quiver(Pose_Y_data_1,Pose_X_data_1,Vy,Vx,'r--','LineWidth',.1); figure; +set(gcf,'color','white'); + subplot(1,3,1); plot(Pose_Y_data_1,Pose_X_data_1,'b','LineWidth',2); hold on @@ -465,11 +449,9 @@ quiver(Pose_Y_data_4,Pose_X_data_4,gradient(Pose_Y_data_4),gradient(Pose_X_data_ hold on plot(y_circle,x_circle,'k--','LineWidth',3.4); -title('Entire Area'); -xlabel('${Y}$ [m]','interpreter','latex','FontSize',11); -ylabel('${X}$ [m]','interpreter','latex','FontSize',11); +title('Approach zone + SM zone + Target area'); +ylabel('${x}_{mar}$ [m]','interpreter','latex','FontSize',14); axis([-.1 .4 .18 1.4]); -grid on subplot(1,3,2); plot(Pose_Y_data_1,Pose_X_data_1,'b','LineWidth',1.6); @@ -482,11 +464,9 @@ plot(Pose_Y_data_4,Pose_X_data_4,'m','LineWidth',1.6); hold on plot(y_circle,x_circle,'k--','LineWidth',3.4); -title('SM zone'); -xlabel('${Y}$ [m]','interpreter','latex','FontSize',11); -% ylabel('${X}$ [m]','interpreter','latex','FontSize',11); +title('SM zone + Target area'); +xlabel('${y}_{mar}$ [m]','interpreter','latex','FontSize',14); axis([-.005 0.045 .195 .32]); -grid on subplot(1,3,3); plot(Pose_Y_data_1,Pose_X_data_1,'b','LineWidth',2); @@ -499,17 +479,18 @@ plot(Pose_Y_data_4,Pose_X_data_4,'m','LineWidth',2); hold on plot(y_circle,x_circle,'k--','LineWidth',3.4); -title('Target'); -xlabel('${Y}$ [m]','interpreter','latex','FontSize',11); -% ylabel('${X}$ [m]','interpreter','latex','FontSize',11); +title('Target area'); axis([0.0065 .0095 .1995 .2055]); -grid on + l = legend('${P_y = 0.86, I_y = 0, D_y = 0.002}$', '${P_y = 0.66, I_y = 0, D_y = 0.1}$','${P_y = 0.86, I_y = 0, D_y = 0.1}$','${P_y = 0.51, I_y = 0.0005, D_y = 0.05}$' ,'Target'); set(l,'interpreter','latex','FontSize',11); +% legend('boxoff'); % sampling time figure; +set(gcf,'color','white'); + subplot(2,2,1); plot(diff(TimeP_ros_data_3)/1e9,'r','LineWidth',1.4) hold on @@ -527,10 +508,11 @@ hold on; plot (diff(t_P_sec_data_5),'b--','LineWidth',1.8); title({'Android Camera';'Position'}); -% ylabel('Sampling time [sec]','interpreter','latex','FontSize',11); axis([0 234 .068 .3]); + l4 = legend('${Time_{ROS}}$','${Time_{Real}} [sec]$','Orientation','horizontal'); set(l4,'interpreter','latex','FontSize',13); +legend('boxoff'); subplot(2,2,3); plot(diff(TimeV_ros_data_3)/1e9,'r','LineWidth',1.4); @@ -553,8 +535,9 @@ xlabel('samples','interpreter','latex','FontSize',13); axis([0 234 .068 .3]); - figure; +set(gcf,'color','white'); + subplot(2,1,1); pa1 = plot(diff(TimeP_ros_data_3)/1e9,'r','LineWidth',2.1); hold on @@ -566,13 +549,14 @@ pa4 = plot (diff(t_P_sec_data_5),'b--','LineWidth',1.8); hold off; axis([0 234 0 .3]); title('Position'); -ylabel('Sampling time [sec]','interpreter','latex','FontSize',13); - -l5 = legend([pa1 pa2],'$USB Camera {Time_{ROS}}$','$ USB Camera {Time_{Real}} [sec]$','Orientation','horizontal'); -set(l5,'interpreter','latex','FontSize',12); -% legend('boxoff'); - +% ylabel('Sampling time [sec]','interpreter','latex','FontSize',13); +% +% l5 = legend([pa1 pa2],'$USB Camera {Time_{ROS}}$','$ USB Camera {Time_{Real}} [sec]$','Orientation','horizontal'); +% set(l5,'interpreter','latex','FontSize',11); +% leg = +legend('ROS Time, USB camera','Real Time, USB camera [sec]','ROS Time, IP camera','Real Time, IP camera [sec]','Location','northwest'); +legend('boxoff'); subplot(2,1,2); p1 = plot(diff(TimeV_ros_data_3)/1e9,'r','LineWidth',2.1); @@ -585,11 +569,11 @@ p4 = plot (diff(t_V_sec_data_5),'b--','LineWidth',1.8); hold off; axis([0 234 0 .3]); title('Velocity'); -ylabel('Sampling time [sec]','interpreter','latex','FontSize',13); -xlabel('Sample','interpreter','latex','FontSize',13); - -l6 = legend([p3 p4],'$ Android Camera {Time_{ROS}}$','$ Android Camera {Time_{Real}} [sec]$','Orientation','horizontal'); -set(l6,'interpreter','latex','FontSize',12); +% ylabel('Sampling time [sec]','interpreter','latex','FontSize',13); +% xlabel('Sample','interpreter','latex','FontSize',13); +% +% l6 = legend([p3 p4],'$ Android Camera {Time_{ROS}}$','$ Android Camera {Time_{Real}} [sec]$','Orientation','horizontal'); +% set(l6,'interpreter','latex','FontSize',12); MaxOvershoot_1 = -ref_y + min(Pose_Y_data_1) MaxOvershoot_2 = -ref_y + min(Pose_Y_data_2) diff --git a/Files_4_thesis/Finding_X_dot_with_Pcontroller/docking_with_P_controller.m b/Files_4_thesis/Finding_X_dot_with_Pcontroller/docking_with_P_controller.m index 2ece986a4c6486a42065f6ebb32088be75643f75..fa7151f6bd9902bc1762ef75e9eab270d83c609f 100644 --- a/Files_4_thesis/Finding_X_dot_with_Pcontroller/docking_with_P_controller.m +++ b/Files_4_thesis/Finding_X_dot_with_Pcontroller/docking_with_P_controller.m @@ -239,46 +239,51 @@ xlabel('Time [sec]'); ylabel('\theta [rad]'); grid on + + % control signals figure; +set(gcf,'color','white'); + subplot(3,1,1); plot(t_V_sec_data_1,Vel_X_data_1,'LineWidth',2); hold on -plot(t_V_sec_data_2,Vel_X_data_2,'r','LineWidth',2); +plot(t_V_sec_data_2,Vel_X_data_2,'r','LineWidth',1.6); hold on plot(t_V_sec_data_3,Vel_X_data_3,'g','LineWidth',2); -title('Control Signal X -axis'); -ylabel('$\dot{X}$ [m/s]','interpreter','latex'); -grid on +title('Control Signals'); +ylabel('$\dot{x}_{Rob}$ [m/s]','interpreter','latex','FontSize',14); +% grid on axis([0 60 -.01 .2]); -l = legend('$\dot{X}$ = 0.15 [m/sec]','$\dot{X}$ = 0.1 [m/sec]','$\dot{X}$ = 0.16 [m/sec]'); -set(l,'interpreter','latex'); +l = legend('$\dot{x}_{Rob}$ = 0.15 [m/s]','$\dot{x}_{Rob}$ = 0.1[m/s]','$\dot{x}_{Rob}$ = 0.16[m/s]'); +set(l,'interpreter','latex','FontSize',12); +legend('boxoff'); subplot(3,1,2); plot(t_V_sec_data_1,Vel_Y_data_1,'LineWidth',2.5); hold on -plot(t_V_sec_data_2,Vel_Y_data_2,'r','LineWidth',1.8); +plot(t_V_sec_data_2,Vel_Y_data_2,'r','LineWidth',1.5); hold on plot(t_V_sec_data_3,Vel_Y_data_3,'g','LineWidth',2.1); -title('Control Signal Y -axis'); -ylabel('$\dot{Y}$ [m/s]','interpreter','latex'); -grid on +% title('Control Signal y_{Rob} - axis'); +ylabel('$\dot{y}_{Rob}$ [m/s]','interpreter','latex','FontSize',14); +% grid on % axis([0 46 -.2 .1]); subplot(3,1,3); plot(t_V_sec_data_1,Omega_Z_data_1,'LineWidth',2.5); hold on -plot(t_V_sec_data_2,Omega_Z_data_2,'r','LineWidth',1.8); +plot(t_V_sec_data_2,Omega_Z_data_2,'r','LineWidth',1.45); hold on plot(t_V_sec_data_3,Omega_Z_data_3,'g','LineWidth',2.1); -title('Control Signal \theta -axis'); -xlabel('$ time [sec]$','interpreter','latex'); -ylabel('$\dot{\theta}$ [rad/s]','interpreter','latex'); -grid on +% title('Control Signal \theta_{Rob} - axis'); +xlabel('$ time [sec]$','interpreter','latex','FontSize',14); +ylabel('$\dot{\theta}_{Rob}$ [rad/s]','interpreter','latex','FontSize',14); +% grid on % axis([0 46 -.1 .15]); @@ -310,8 +315,9 @@ grid on % % quiver(y_arrow,x_arrow,Vy,Vx,'r--','LineWidth',1.5); % - figure; +set(gcf,'color','white'); + subplot(1,3,1); plot(Pose_Y_data_1,Pose_X_data_1,'b','LineWidth',2); hold on @@ -321,11 +327,14 @@ plot(Pose_Y_data_3,Pose_X_data_3,'g','LineWidth',2); hold on plot(y_circle,x_circle,'k--','LineWidth',3.4) -title('Docking Trajectroy (Whole area)'); -xlabel('${Y}$ [m]','interpreter','latex'); -ylabel('${X}$ [m]','interpreter','latex'); +title('Approach zone + SM zone + Target area'); +xlabel('${y}_{mar}$ [m]','interpreter','latex','FontSize',14); +ylabel('${x}_{mar}$ [m]','interpreter','latex','FontSize',14); axis([-.3 .4 .18 1.4]); -grid on +% grid on +l2 = legend('$\dot{x}_{Rob}$ = 0.15[m/s]','$\dot{x}_{Rob}$ = 0.1[m/s]','$\dot{x}_{Rob}$ = 0.16[m/s]','Target','Location','northwest'); +set(l2,'interpreter','latex'); +legend('boxoff'); subplot(1,3,2); plot(Pose_Y_data_1,Pose_X_data_1,'b','LineWidth',2); @@ -335,11 +344,11 @@ hold on plot(Pose_Y_data_3,Pose_X_data_3,'g','LineWidth',2); hold on plot(y_circle,x_circle,'k--','LineWidth',3.4); -title('Docking Trajectroy (SM zone)'); -xlabel('${Y}$ [m]','interpreter','latex'); +title('SM zone + Target area'); +xlabel('${y}_{mar}$ [m]','interpreter','latex','FontSize',14); % ylabel('${X}$ [m]','interpreter','latex'); axis([-.01 0.06 .195 .32]); -grid on +% grid on subplot(1,3,3); plot(Pose_Y_data_1,Pose_X_data_1,'b','LineWidth',2); @@ -349,17 +358,16 @@ hold on plot(Pose_Y_data_3,Pose_X_data_3,'g','LineWidth',2); hold on plot(y_circle,x_circle,'k--','LineWidth',3.4); -title('Docking Trajectroy (reference area)'); -xlabel('${Y}$ [m]','interpreter','latex'); +title('Target area'); +xlabel('${y}_{mar}$ [m]','interpreter','latex','FontSize',14); % ylabel('${X}$ [m]','interpreter','latex'); axis([0.006 .011 .198 .204]); -grid on +% grid on % l2 = legend('x_dot = 0.15','x_dot = 0.1','x_dot = 0.16','Reference Position'); -l2 = legend('$\dot{X}$ = 0.15 [m/sec]','$\dot{X}$ = 0.1 [m/sec]','$\dot{X}$ = 0.16 [m/sec]','Reference Position'); -set(l2,'interpreter','latex'); - figure; +set(gcf,'color','white'); + subplot(2,1,1); plot(diff(TimeP_ros_data_1)/1e9,'g') hold on @@ -388,8 +396,9 @@ ylabel('Sampling time'); % xlabel('samples'); % ylabel('time step'); % axis([150 250 0 .02]); - figure; +set(gcf,'color','white'); + subplot(3,1,1); plot(diff(Pose_X_data_1)); title('X-Pose diff'); diff --git a/Files_4_thesis/Laser Scanner Results/scanner_rob.jpg b/Files_4_thesis/Laser Scanner Results/scanner_rob.jpg index 4e05664b153d663ecda989c77bf5f8102e3ed5ae..7b91c0195edb69ce954ff9045cb19bb0ca9a108d 100644 Binary files a/Files_4_thesis/Laser Scanner Results/scanner_rob.jpg and b/Files_4_thesis/Laser Scanner Results/scanner_rob.jpg differ diff --git a/Files_4_thesis/MSc_Thesis_Report_Alijani_Farid.pdf b/Files_4_thesis/MSc_Thesis_Report_Alijani_Farid.pdf index f1bb1e9fe7ac33d0bf220e60715f97ec8b6a945a..9482eed4c3668edf976c549d00f271ee4bc8a789 100644 Binary files a/Files_4_thesis/MSc_Thesis_Report_Alijani_Farid.pdf and b/Files_4_thesis/MSc_Thesis_Report_Alijani_Farid.pdf differ diff --git a/Files_4_thesis/Report.docx b/Files_4_thesis/Report.docx index 68422bfcbe897c0e6bd6c9575f20919b94e58cda..8d5215ad4f1d3b355f850637be8cfc9c366e8853 100644 Binary files a/Files_4_thesis/Report.docx and b/Files_4_thesis/Report.docx differ diff --git a/Files_4_thesis/scanner_analysis.m b/Files_4_thesis/scanner_analysis.m index 28ca11bc1bdeffef725b5ab0eb19676eb688819d..ab6d932682c343857b31b061afffd5e242fde072 100644 --- a/Files_4_thesis/scanner_analysis.m +++ b/Files_4_thesis/scanner_analysis.m @@ -67,14 +67,14 @@ plot(angle,s_exp_2,'m--','LineWidth',1.9); hold on; plot(angle,s_exp_3,'b--','LineWidth',1.9); hold on; -plot(angle,s_exp_4,'c--','LineWidth',1.5); +plot(angle,s_exp_4,'g--','LineWidth',1.1); hold on; % plot(angle,s_exp_5,'b--','LineWidth',.8); % hold on; plot(angle,dist_to_obst,'rx','LineWidth',.05); title(''); xlabel('${Angle}$ [rad]','interpreter','latex','FontSize',14); -ylabel('${Obstacle [m]}$','interpreter','latex','FontSize',14); +ylabel('${Distance [m]}$','interpreter','latex','FontSize',14); axis([-.09 .42 .08 .2]); % legend('Experiment 1','Experiment 2','Experiment 3','Safety Curve'); subplot(1,2,2); @@ -84,7 +84,7 @@ plot(X_exp_2,Y_exp_2,'m--','LineWidth',1.9); hold on plot(X_exp_3,Y_exp_3,'b--','LineWidth',1.9); hold on -plot(X_exp_4,Y_exp_4,'c--','LineWidth',1.5); +plot(X_exp_4,Y_exp_4,'g--','LineWidth',1.1); hold on % plot(X_exp_5,Y_exp_5,'b--','LineWidth',.1); % hold on @@ -93,7 +93,7 @@ title(''); xlabel('${X}$ [m]','interpreter','latex','FontSize',14); ylabel('${Y}$ [m]','interpreter','latex','FontSize',14); axis([-.1 .16 -.18 .18]); -l = legend('Experiment 1','Experiment 2','Experiment 3','Safety Curve'); +l = legend('Experiment 1','Experiment 2','Experiment 3','Safety Curve','Orientation','horizontal'); set(l,'interpreter','latex','FontSize',13); %% docked robot with marker vs. docked robot without marker! @@ -146,10 +146,10 @@ plot(X_DockedwithNOmar,Y_DockedwithNOmar); hold on; plot(X_obst_DockedwithNOmar,Y_obst_DockedwithNOmar,'r','LineWidth',3); % xlabel('$ X [m] $','interpreter','latex','FontSize',14); -ylabel('$ Y [m] $','interpreter','latex','FontSize',14); -title('Scanner Analysis WITHOUT marker, Top View'); +% ylabel('$ Y [m] $','interpreter','latex','FontSize',14); +title('No marker in docking platform'); legend('Obstacles','Laser scanner safety curve (r = 10 cm)'); -grid on +% grid on axis([-2.5 4 -4 1]); subplot(3,1,2); @@ -157,8 +157,8 @@ plot(X_DockedwithMar,Y_DockedwithMar,'b'); hold on; plot(X_obst_DockedwithMar,Y_obst_DockedwithMar,'r','LineWidth',3); ylabel('$ Y [m] $','interpreter','latex','FontSize',14); -title('Scanner Analysis WITH marker, Top View'); -grid on +title('Marker �circular bottle� in docking platform'); +% grid on axis([-2.5 4 -4 1]); subplot(3,1,3); @@ -166,8 +166,9 @@ plot(X_DockedwithMar,Y_DockedwithMar,'b'); hold on; plot(X_obst_DockedwithMar,Y_obst_DockedwithMar,'r','LineWidth',.3); xlabel('$ X [m] $','interpreter','latex','FontSize',14); -ylabel('$ Y [m] $','interpreter','latex','FontSize',14); -grid on +% ylabel('$ Y [m] $','interpreter','latex','FontSize',14); +% grid on +title('Detected marker'); axis([.04 .16 -.12 .12]); % @@ -176,9 +177,9 @@ subplot(3,1,1); plot(s_angle_DockedwithNOmar,s_val_DockedwithNOmar); hold on plot(s_angle_DockedwithNOmar,dist_to_obst,'r','LineWidth',.2); -xlabel('Angle [rad]'); -ylabel('Distance to Obstacle [m]'); -title('Scanner Analysis; docked robot WITHOUT a marker'); +% xlabel('Angle [rad]'); +% ylabel('Distance to Obstacle [m]'); +title('No marker in docking platform'); l2 = legend('${Obstacles}$', '${Safety Margin (r = 10 cm)}$'); set(l2,'interpreter','latex','FontSize',12); @@ -190,17 +191,18 @@ subplot(3,1,2); plot(s_angle_DockedwithMar,s_val_DockedwithMar); hold on plot(s_angle_DockedwithMar,dist_to_obst,'r','LineWidth',.2); -xlabel('Angle [rad]'); +% xlabel('Angle [rad]'); ylabel('Distance to objects [m]'); -title('Scanner Analysis; docked robot WITH a marker'); +title('Marker �circular bottle� in docking platform'); axis([-2.2 2.2 -.5 5]); subplot(3,1,3); plot(s_angle_DockedwithMar,s_val_DockedwithMar); hold on plot(s_angle_DockedwithMar,dist_to_obst,'r','LineWidth',10); +title('Detected marker'); xlabel('Angle [rad]'); -ylabel('Distance to Obstacle [m]'); +% ylabel('Distance to Obstacle [m]'); axis([-.15 .35 .08 .15]); %% The robot is moving Towards docking...! @@ -295,22 +297,22 @@ subplot(2,1,1); plot(s_angle_DockedwithBOX,s_val_DockedwithBOX,'b','LineWidth',.01); hold on plot(s_angle_DockedwithBOX,dist_to_obst, 'r','LineWidth',5); -xlabel('Angle [rad]'); -ylabel('Distance to Obstacle [m]'); -title('Scanner Analysis; docked robot with a BOX marker'); +% xlabel('Angle [rad]'); +% ylabel('Distance to Obstacle [m]'); +title('Marker, e.g., Box in docking platform'); legend('Surrounding objects','Laser scanner safety line (r = 10 cm)'); -axis([-2.2 2.2 0 5]); +axis([-2.2 2.2 -.5 5]); subplot(2,1,2); plot(s_angle_DockedwithBOX,s_val_DockedwithBOX,'b','LineWidth',.01); hold on plot(s_angle_DockedwithBOX,dist_to_obst, 'r','LineWidth',5); -xlabel('Angle [rad]'); -ylabel('Distance to Obstacle [m]'); +% xlabel('Angle [rad]'); +% ylabel('Distance to Obstacle [m]'); axis([-1.9 0 .08 .22]); +title('Detected marker'); - - -figure; -plot(X_DockedwithBOX,Y_DockedwithBOX); \ No newline at end of file +% +% figure; +% plot(X_DockedwithBOX,Y_DockedwithBOX); \ No newline at end of file