Professional Documents
Culture Documents
BSEE 18-22
Introduction
This lab deals with the computation of the arm equation from the D-H parameters for Different
Robots, The D-H parameters contain the information for link length, link angle, link twist joint
distance. The transformation matrix is computed with respect to the next joint, this matrix is then
multiplied with rest of link parameters to obtain the final transformation matrix which tells about the
position of final tooltip w.r.t to the stationary base or the first joint.
Code
disp(sprintf('Press 1 for alpha II \nPress 2 for Rhino \nPress 3 for SCARA \
nPress 4 for Intellidex'));
m = input('Choose number:');
switch(m)
case 1
n = 5; %alpha 2
case 2
n = 5; %rhino
case 3
n = 4; %scara
case 4
n=6; %Intelledex
end
G = [1 0 0 0; 0 1 0 0 ; 0 0 1 0; 0 0 0 1];
%M is the matrix containing the inputs/parameters for the computation of
%the arm equation
M=[215 0 0 -pi/2;0 177.8 0 0;0 177.8 0 0;0 0 -pi/2 -pi/2;96.5 0 0 0];
% the array version
for k = 1 : n
d = M(k,1);
a = M(k,2);
t= M(k,3);
al = M(k,4);