Commit 3dea1dee authored by Farid Alijani's avatar Farid Alijani
Browse files

Paper and plot added

parent 6970fd07
......@@ -75,9 +75,10 @@ hold on;
% hold on;
plot(angle,dist_to_obst,'rx','LineWidth',.05);
title('');
xlabel('${\theta_b}$ [rad]','interpreter','latex','FontSize',14);
ylabel('${Distance}$ [m]','interpreter','latex','FontSize',14);
xlabel('${\theta_b}$ [rad]','interpreter','latex','FontSize',20);
ylabel('${Distance}$ [m]','interpreter','latex','FontSize',20);
axis([-.09 .42 .08 .2]);
set(gca,'box','off','fontsize',20);
% legend('Experiment 1','Experiment 2','Experiment 3','Safety Curve');
subplot(1,2,2);
% plot(X_exp_1,Y_exp_1,'m--','LineWidth',.9);
......@@ -92,10 +93,11 @@ hold on
% hold on
plot(X_obst,Y_obst,'r--','LineWidth',.05);
title('');
xlabel('${X}$ [m]','interpreter','latex','FontSize',14);
ylabel('${Y}$ [m]','interpreter','latex','FontSize',14);
xlabel('${X}$ [m]','interpreter','latex','FontSize',20);
ylabel('${Y}$ [m]','interpreter','latex','FontSize',20);
axis([-.1 .16 -.18 .18]);
l = legend('Experiment 1','Experiment 2','Experiment 3','Safety Curve','Orientation','horizontal');
set(gca,'box','off','fontsize',20);
l = legend('Trial 1','Trial 2','Trial 3','Safety Curve','Orientation','horizontal');
set(l,'interpreter','latex','FontSize',13);
%% docked robot with marker vs. docked robot without marker!
......@@ -164,76 +166,30 @@ for i = 1:points_DockedwithBOX
X_obst_DockedwithBOX(i) = dist_to_obst * cos(s_angle_DockedwithBOX(i));
Y_obst_DockedwithBOX(i)= dist_to_obst * sin(s_angle_DockedwithBOX(i));
end
%
% figure;
% set(gcf,'color','white');
% subplot(2,1,1);
%
%
%
%
% 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('${\theta_b}$ [rad]','interpreter','latex','FontSize',14);
% ylabel('$ {Distance} $ [m]','interpreter','latex','FontSize',14);
% axis([-1.9 0 .08 .22]);
% title('Detected marker (zoomed in area from the first plot)');
%
% figure;
% plot(X_DockedwithBOX,Y_DockedwithBOX);
% checking accuracy in robot coordinate system
figure;
set(gcf,'color','white');
subplot(3,2,1);
plot(s_angle_DockedwithNOmar,s_val_DockedwithNOmar);
hold on
plot(s_angle_DockedwithNOmar,dist_to_obst,'r','LineWidth',.2);
% title('No marker on docking platform');
axis([-2.2 2.2 -.5 10]);
set(gca,'box','off','fontsize',20);
subplot(3,2,2);
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('No marker on docking platform, TOP VIEW');
% title('No marker on docking platform, TOP VIEW');
% legend('Obstacles','Laser scanner safety curve (r = 10 cm)');
% grid on
axis([-2.5 6 -4 2]);
axis([-2 4.5 -4 1.5]);
set(gca,'box','off','fontsize',20);
subplot(3,2,4);
plot(X_DockedwithMar,Y_DockedwithMar,'b');
hold on;
plot(X_obst_DockedwithMar,Y_obst_DockedwithMar,'r','LineWidth',3);
hold off;
ylabel('$ Y $ [m]','interpreter','latex','FontSize',14);
title('Marker circular bottle on docking platform, TOP VIEW');
% grid on
axis([-2.5 6 -4 2]);
subplot(3,2,6);
% 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
% title('Detected marker (zoomed area from middle plot), TOP VIEW');
% axis([.04 .16 -.12 .12]);
%
% figure;
% set(gcf,'color','white');
subplot(3,2,1);
plot(s_angle_DockedwithNOmar,s_val_DockedwithNOmar);
hold on
plot(s_angle_DockedwithNOmar,dist_to_obst,'r','LineWidth',.2);
title('No marker on docking platform');
axis([-2.2 2.2 -.5 5]);
subplot(3,2,3);
orig_coordinate_cir = gca; % create axes
......@@ -241,7 +197,8 @@ plot(orig_coordinate_cir,s_angle_DockedwithMar,s_val_DockedwithMar);
hold on
plot(orig_coordinate_cir,s_angle_DockedwithMar,dist_to_obst,'r','LineWidth',.2);
ylabel('$ {Distance} $ [m]','interpreter','latex','FontSize',14);
axis([-2.3 2.3 -.5 15]);
axis([-2.3 2.3 -.5 10]);
set(orig_coordinate_cir,'box','off','fontsize',20);
% ----- Zoomed in ------
hkids_cir = get(orig_coordinate_cir, 'child'); % get original coordinate properties
......@@ -252,6 +209,7 @@ set(hkids_cir(2),'marker','.')
zoomed_coordinate_cir = axes('Position',get(orig_coordinate_cir,'Position'),...
'XAxisLocation','bottom',...
'YAxisLocation','left',...
'fontsize',15,...
'Color','none',...
'XColor','k','YColor','k', 'NextPlot', 'add'); % make ax2. Use nexplot to maintain your settings
......@@ -261,15 +219,54 @@ plot(zoomed_coordinate_cir,s_angle_DockedwithMar,dist_to_obst,'Color','r');
set(zoomed_coordinate_cir,'xlim',[-.15 .32])% axes limit for zoom out,
set(zoomed_coordinate_cir,'ylim',[.08 .2])% axes limit for zoom out,
set(zoomed_coordinate_cir, 'Units', 'normalized', 'Position', [.34 0.47 0.12 0.14])
set(zoomed_coordinate_cir, 'Units', 'normalized', 'Position', [.35 0.48 0.15 0.18])
% ----- Zoomed in ------
subplot(3,2,4);
orig_coordinate_cir_T = gca; % create axes
plot(orig_coordinate_cir_T,X_DockedwithMar,Y_DockedwithMar);
hold on;
plot(orig_coordinate_cir_T,X_obst_DockedwithMar,Y_obst_DockedwithMar,'r','LineWidth',3);
ylabel('$ {Y} $ [m]','interpreter','latex','FontSize',14);
axis([-2 4.5 -4 1.5]);
set(orig_coordinate_cir_T,'box','off','fontsize',20);
% ----- Zoomed in ------
hkids_cir_T = get(orig_coordinate_cir_T, 'child'); % get original coordinate properties
%
% set(hkids_cir_T(1),'marker','.','Color','r')
% set(hkids_cir_T(2),'marker','*')
set(hkids_cir_T(1),'Color','r')
set(hkids_cir_T(2),'Color','b')
zoomed_coordinate_cir_T = axes('Position',get(orig_coordinate_cir_T,'Position'),...
'XAxisLocation','bottom',...
'YAxisLocation','left',...
'fontsize',13,...
'Color','none',...
'XColor','k','YColor','k', 'NextPlot', 'add'); % make ax2. Use nexplot to maintain your settings
plot(zoomed_coordinate_cir_T,X_DockedwithMar,Y_DockedwithMar);
hold on;
plot(zoomed_coordinate_cir_T,X_obst_DockedwithMar,Y_obst_DockedwithMar,'Color','r');
set(zoomed_coordinate_cir_T,'xlim',[.08 .13])% axes limit for zoom out,
set(zoomed_coordinate_cir_T,'ylim',[-.06 .06])% axes limit for zoom out,
set(zoomed_coordinate_cir_T, 'Units', 'normalized', 'Position', [.84 0.485 0.15 0.18])
% ----- Zoomed in ------
subplot(3,2,5);
orig_coordinate_box = gca; % create axes
plot(orig_coordinate_box,s_angle_DockedwithBOX,s_val_DockedwithBOX,'b','LineWidth',.01);
hold on
plot(orig_coordinate_box,s_angle_DockedwithBOX,dist_to_obst, 'r','LineWidth',5);
axis([-2.3 2.3 -.15 6]);
xlabel('$ {\theta_b} $ [rad]','interpreter','latex','FontSize',14);
axis([-2.3 2.3 -.15 5]);
set(orig_coordinate_box,'box','off','fontsize',20);
% ----- Zoomed in BOX------
hkids_box = get(orig_coordinate_box, 'child'); % get original coordinate properties
......@@ -280,6 +277,7 @@ set(hkids_box(2),'marker','.')
zoomed_coordinate_box = axes('Position',get(orig_coordinate_box,'Position'),...
'XAxisLocation','bottom',...
'YAxisLocation','left',...
'fontsize',13,...
'Color','none',...
'XColor','k','YColor','k', 'NextPlot', 'add'); % make ax2. Use nexplot to maintain your settings
......@@ -288,11 +286,43 @@ hold on;
plot(zoomed_coordinate_box,s_angle_DockedwithBOX,dist_to_obst,'Color','r');
set(zoomed_coordinate_box,'xlim',[-1.6 -.3])% axes limit for zoom out,
set(zoomed_coordinate_box,'ylim',[.08 .22])% axes limit for zoom out,
set(zoomed_coordinate_box, 'Units', 'normalized', 'Position', [.32 0.18 0.14 0.14])
set(zoomed_coordinate_box,'ylim',[.08 .2])% axes limit for zoom out,
set(zoomed_coordinate_box, 'Units', 'normalized', 'Position', [.35 0.18 0.15 0.18])
% ----- Zoomed in BOX------
subplot(3,2,6);
orig_coordinate_box_T = gca; % create axes
plot(orig_coordinate_box_T,X_DockedwithBOX,Y_DockedwithBOX,'b','LineWidth',.01);
hold on
plot(orig_coordinate_box_T,X_obst_DockedwithMar,Y_obst_DockedwithMar, 'r','LineWidth',5);
xlabel('$ {X} $ [m]','interpreter','latex','FontSize',14);
axis([-.53 .9 -.8 1.5]);
set(orig_coordinate_box_T,'box','off','fontsize',20);
% ----- Zoomed in BOX_T------
hkids_box_T = get(orig_coordinate_box_T, 'child'); % get original coordinate properties
set(hkids_box_T(1),'Color','r')
set(hkids_box_T(2),'Color','b')
zoomed_coordinate_box_T = axes('Position',get(orig_coordinate_box_T,'Position'),...
'XAxisLocation','bottom',...
'YAxisLocation','left',...
'fontsize',13,...
'Color','none',...
'XColor','k','YColor','k', 'NextPlot', 'add'); % make ax2. Use nexplot to maintain your settings
plot(zoomed_coordinate_box_T,X_DockedwithBOX,Y_DockedwithBOX);
hold on;
plot(zoomed_coordinate_box_T,X_obst_DockedwithMar,Y_obst_DockedwithMar,'Color','r');
set(zoomed_coordinate_box_T,'xlim',[-.16 .2])% axes limit for zoom out,
set(zoomed_coordinate_box_T,'ylim',[-.22 .22])% axes limit for zoom out,
set(zoomed_coordinate_box_T, 'Units', 'normalized', 'Position', [.84 0.2 .15 .18])
% ----- Zoomed in BOX_T------
%% The robot is moving Towards docking...!
Scanner_Matrix_Moving = csvread('scanner_data_Moving_Towards_Docking_WITH_Marker.txt',0,0);
......@@ -334,7 +364,6 @@ end
% figure;
% set(gcf,'color','white');
%
% subplot(1,2,1);
% plot(s_angle_out,s_val_out,'b','LineWidth',2);
% hold on
......@@ -358,4 +387,16 @@ end
% % axis([-1.2 5 -3.5 1.5]);
%
\ No newline at end of file
% figure;
% 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
% title('Detected marker (zoomed area from middle plot), TOP VIEW');
% axis([.04 .16 -.12 .12]);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment