Home > arte3.2.0 > robots > example > scara > parameters.m

parameters

PURPOSE ^

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

SYNOPSIS ^

function robot = parameters()

DESCRIPTION ^

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   PARAMETERS Returns a data structure containing the parameters of the
   SCARA example arm with 4 DOF.

   Author: Arturo Gil. Universidad Miguel Hernández de Elche. 
   email: arturo.gil@umh.es date:   03/01/2012
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0002 %   PARAMETERS Returns a data structure containing the parameters of the
0003 %   SCARA example arm with 4 DOF.
0004 %
0005 %   Author: Arturo Gil. Universidad Miguel Hernández de Elche.
0006 %   email: arturo.gil@umh.es date:   03/01/2012
0007 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0008 
0009 % Copyright (C) 2012, by Arturo Gil Aparicio
0010 %
0011 % This file is part of ARTE (A Robotics Toolbox for Education).
0012 %
0013 % ARTE is free software: you can redistribute it and/or modify
0014 % it under the terms of the GNU Lesser General Public License as published by
0015 % the Free Software Foundation, either version 3 of the License, or
0016 % (at your option) any later version.
0017 %
0018 % ARTE is distributed in the hope that it will be useful,
0019 % but WITHOUT ANY WARRANTY; without even the implied warranty of
0020 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0021 % GNU Lesser General Public License for more details.
0022 %
0023 % You should have received a copy of the GNU Leser General Public License
0024 % along with ARTE.  If not, see <http://www.gnu.org/licenses/>.
0025 function robot = parameters()
0026 
0027 %Kinematic parameters
0028 robot.DH.theta= '[q(1) q(2) 0 q(4)]';
0029 robot.DH.d='[0.5  0      q(3)  0]';
0030 robot.DH.a='[0.5    0.3  0    0]';
0031 robot.DH.alpha= '[ 0 pi  0 0]';
0032 
0033 %Jacobian matrix. Variation of (X, Y, Z) as a function of (w1, w2, w3)
0034 robot.J='[-a(2)*sin(q(1)+q(2))-a(1)*sin(q(1)) -a(2)*sin(q(1)+q(2)) 0; a(2)*cos(q(1)+q(2))+a(1)*cos(q(1)) a(2)*cos(q(1)+q(2)) 0; 0 0 -1];';
0035 robot.name='Scara example 4GDL arm';
0036 
0037 robot.inversekinematic_fn = 'inversekinematic_scara(robot, T)';
0038 
0039 %number of degrees of freedom
0040 robot.DOF = 4;
0041 
0042 %rotational: R, translational: T
0043 robot.kind=['R' 'R' 'T' 'R'];
0044 
0045 %minimum and maximum rotation angle in rad
0046 robot.maxangle =[-pi pi; %Axis 1, minimum, maximum
0047                 deg2rad(-150) deg2rad(150); %Axis 2, translational, minimum, maximum
0048                 0 0.5; %Axis 3, translational
0049                 deg2rad(-360) deg2rad(360)]; %Axis 4
0050              
0051 
0052 %maximum absolute speed of each joint rad/s or m/s
0053 robot.velmax = [deg2rad(200); %Axis 1, rad/s
0054                 deg2rad(200); %Axis 2, m/s
0055                 2; %Axis 3, m/s
0056                 deg2rad(360)]; %Axis 4, rad/s
0057              
0058 % end effectors maximum velocity
0059 robot.linear_velmax = 1.0; %m/s
0060 
0061 robot.accelmax=robot.velmax/0.1; % 0.1 is here an acceleration time
0062 
0063 %base reference system
0064 robot.T0 = eye(4);
0065 
0066 %INITIALIZATION OF VARIABLES REQUIRED FOR THE SIMULATION
0067 %position, velocity and acceleration
0068 robot=init_sim_variables(robot);
0069 robot.path = pwd;
0070 
0071 % GRAPHICS
0072 robot.graphical.has_graphics=0;
0073 robot.graphical.color = [25 20 40];
0074 %for transparency
0075 robot.graphical.draw_transparent=0;
0076 %draw DH systems
0077 robot.graphical.draw_axes=1;
0078 %DH system length and Font size, standard is 1/10. Select 2/20, 3/30 for
0079 %bigger robots
0080 robot.graphical.axes_scale=1;
0081 %adjust for a default view of the robot
0082 robot.axis=[-0.75 0.75 -0.75 0.75 0 2];
0083 %read graphics files
0084 robot = read_graphics(robot);
0085 
0086 %DYNAMICS
0087 robot.has_dynamics=0;

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