Home > arte3.2.0 > demos > direct_jacobian_demo.m

direct_jacobian_demo

PURPOSE ^

DIRECT JACOBIAN DEMO

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 DIRECT JACOBIAN DEMO

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % DIRECT JACOBIAN DEMO
0002 
0003 % Copyright (C) 2012, by Arturo Gil Aparicio
0004 %
0005 % This file is part of ARTE (A Robotics Toolbox for Education).
0006 %
0007 % ARTE is free software: you can redistribute it and/or modify
0008 % it under the terms of the GNU Lesser General Public License as published by
0009 % the Free Software Foundation, either version 3 of the License, or
0010 % (at your option) any later version.
0011 %
0012 % ARTE is distributed in the hope that it will be useful,
0013 % but WITHOUT ANY WARRANTY; without even the implied warranty of
0014 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0015 % GNU Lesser General Public License for more details.
0016 %
0017 % You should have received a copy of the GNU Leser General Public License
0018 % along with ARTE.  If not, see <http://www.gnu.odrg/licenses/>.
0019 
0020 close all;
0021 
0022 fprintf('\nThe demo shows how to compute the end effectors speed as a function of the joint speeds')
0023 
0024 robot =  load_robot('example','scara');
0025 
0026 T=1; %Tiempo que dura el movimiento
0027 
0028 q1=0:0.01:pi/2;
0029 q2=0:0.01:pi/2;
0030 
0031 q_v=pi/2/T; %rad/s
0032 V=zeros(3, length(q1));
0033 for i=1:length(q1),
0034    V(:,i) = compute_end_velocity(robot, [q1(i) -q2(i) 0 0], [q_v q_v 0 0]);
0035 end
0036 
0037 figure, hold
0038 plot(V(1, :), 'r')
0039 plot(V(2, :), 'g')
0040 plot(V(3, :), 'b')
0041 legend('V_x', 'V_y', 'V_z')
0042 title('End effector speed (m/s)')
0043 xlabel('time (s)')
0044 
0045 figure, hold
0046 plot(q1, 'r')
0047 plot(q2, 'g')
0048 legend('q_1', 'q_2')
0049 title('Joint positions (rad)')
0050 xlabel('time (s)')

Generated on Fri 03-Jan-2014 12:20:01 by m2html © 2005