Home > subfunctions > ccl_rob_vis_move.m

ccl_rob_vis_move

PURPOSE ^

ccl_rob_vis_move (R, X, L)

SYNOPSIS ^

function ccl_rob_vis_move (figh, R, X, L,varargin)

DESCRIPTION ^

 ccl_rob_vis_move (R, X, L)
 Visualisation of the arm movement
 Input:
   R               Task space movements
   X               Joint space movements
   L               Arm link length
   varargin        Arguments for figure title and position

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function ccl_rob_vis_move (figh, R, X, L,varargin)
0002 % ccl_rob_vis_move (R, X, L)
0003 % Visualisation of the arm movement
0004 % Input:
0005 %   R               Task space movements
0006 %   X               Joint space movements
0007 %   L               Arm link length
0008 %   varargin        Arguments for figure title and position
0009 dim_n = length(R(1,:)) ;
0010 xmin = -1.5 ; xmax = 2 ;
0011 ymin = -2.5 ; ymax = 2.5 ;
0012 
0013 fig_handle = figure(figh); hold on
0014 if nargin > 3
0015     title_txt = varargin{1};title(title_txt);
0016     pos       = varargin{2};set(fig_handle, 'Position', pos);
0017 end
0018 axis equal
0019 xlim([xmin,xmax]) ; ylim([ymin,ymax]) ;
0020 plot( [R(1,:)], [R(2,:)], 'LineWidth', 4 ) ;
0021 xlabel('x');
0022 ylabel('y');
0023 % stroboscopic plot of arm
0024 for i=1:round(dim_n/25):dim_n
0025     c = ((dim_n-i)/dim_n) * ones(1,3) ;
0026     ccl_rob_plot_arm (X(:,i), L, c) ;
0027     pause (0.1) ;
0028     axis tight;
0029 end
0030 hold off
0031 end

Generated on Mon 01-Jan-2018 15:49:39 by m2html © 2005