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

parameters

PURPOSE ^

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

SYNOPSIS ^

function robot = parameters()

DESCRIPTION ^

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   PARAMETERS Returns a data structure containing the parameters of a
   DELTA robot with 3 degrees of freedom

   Author: Ángel Rodríguez 
   email: arodgre@gmail.com date:   18/12/2013
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0002 %   PARAMETERS Returns a data structure containing the parameters of a
0003 %   DELTA robot with 3 degrees of freedom
0004 %
0005 %   Author: Ángel Rodríguez
0006 %   email: arodgre@gmail.com date:   18/12/2013
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 
0026 function robot = parameters()
0027 
0028 path=pwd;
0029 
0030 %For this special case, the mecanisme is divided into three different siral
0031 %arms wich are 3DOF spherical arms.
0032 
0033 robot1=load_robot('example','3dofspherical');
0034 robot2=load_robot('example','3dofspherical');
0035 robot3=load_robot('example','3dofspherical');
0036 
0037 robot=[];
0038 robot.name='Example DELTA 3DOF';
0039 %treated separately in the plotting tools
0040 robot.parallel=1;
0041 
0042 robot.robot1=robot1;
0043 robot.robot2=robot2;
0044 robot.robot3=robot3;
0045 robot.nserial=3;
0046 
0047 
0048 %Kinematics
0049 robot.inversekinematic_fn='inversekinematic_DELTA3DOF(robot,T)';
0050 robot.directkinematic_fn='directkinematic_DELTA3DOF(robot,q)';
0051 %robot.drawrobot3D_fn='drawDELTA3DOF(robot,T)';
0052 robot.DOF=9;
0053 
0054 robot.debug=1;
0055 robot.T0=eye(4);
0056 
0057 
0058 
0059 
0060 %Geometrical Parámeters (m, rad)
0061 
0062 %d1 is the radius of the base's triangle
0063 robot.d1=0.5;
0064 %d2 is the radius of the efector's triangle
0065 robot.d2=0.25;
0066 %L1 is the length of the upper arms
0067 robot.L1=0.3;
0068 %L2 is the length of the lower arms
0069 robot.L2=0.7;
0070 %Alpha is an array of the angle between X axis and the arms
0071 robot.alpha=[pi/3, pi, 5*pi/3];%[60º,180º,40º]
0072 % initial position for (0,0,-0.45)
0073 robot.q=[0.0548 2.4189 0 0.0548 2.4189 0 0.0548 2.4189 0];
0074 
0075 alpha=robot.alpha;
0076 d1=robot.d1;
0077 d2=robot.d2;
0078 
0079 robot.TX=[1     0           0     0;
0080           0 cos(-pi/2)  -sin(-pi/2) 0;
0081           0 sin(-pi/2)   cos(-pi/2) 0;
0082           0     0          0      1  ];%Turn over X axis to put Z as the rotational axes of each joint
0083 
0084 TX=robot.TX;
0085 
0086 T01_1= [cos(alpha(1)) -sin(alpha(1)) 0 d1*cos(alpha(1));
0087         sin(alpha(1)) cos(alpha(1))  0 d1*sin(alpha(1));
0088         0 0 1 0; 
0089         0 0 0 1];
0090 
0091 T01_2= [cos(alpha(2)) -sin(alpha(2)) 0 d1*cos(alpha(2));
0092         sin(alpha(2)) cos(alpha(2)) 0 d1*sin(alpha(2));
0093         0 0 1 0; 
0094         0 0 0 1];
0095 
0096 T01_3= [cos(alpha(3)) -sin(alpha(3)) 0 d1*cos(alpha(3)); 
0097         sin(alpha(3)) cos(alpha(3)) 0 d1*sin(alpha(3));
0098         0 0 1 0; 
0099         0 0 0 1];
0100 
0101 robot.robot1.T0=T01_1*TX;
0102 robot.robot2.T0=T01_2*TX;
0103 robot.robot3.T0=T01_3*TX;
0104 
0105 %INITIALIZATION OF VARIABLES REQUIRED FOR THE SIMULATION
0106 %position, velocity and acceleration
0107 %robot=init_sim_variables(robot);
0108 robot.path = path;
0109 
0110 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0111 %GRAPHICS   Autor: Arturo Gil
0112 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0113 %read graphics files
0114 robot.graphical.has_graphics=1;
0115 robot.graphical.color = [255 20 40]./255;
0116 %for transparency
0117 robot.graphical.draw_transparent=0;
0118 %draw DH systems
0119 robot.graphical.draw_axes=1;
0120 %DH system length and Font size, standard is 1/10. Select 2/20, 3/30 for
0121 %bigger robots
0122 robot.graphical.axes_scale=1;
0123 %adjust for a default view of the robot
0124 robot.axis=[-3.5 3.5 -3.5 3.5 0 1]
0125 robot = read_graphics(robot);
0126 
0127 robot.equipment=load_robot('example/Delta/base_plate');
0128 robot.tool=load_robot('example/Delta/effector');

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