You are on page 1of 10

FoR Lab 4

Name: Armaghan Shafiq

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);

G = G*[cos(t) -cos(al)*sin(t) sin(al)*sin(t) a*cos(t); sin(t)


cos(al)*cos(t) -sin(al)*cos(t) a*sin(t); 0 sin(al) cos(al) d; 0 0 0 1];
end
G;
Discussion and Results:
M is the matric containing the D-H parameters for all the joints.

1) For the ALPHA II robot

2) For the RHINO XR3


3) For the SCARA

4) For the Intellidex

You might also like