0% found this document useful (0 votes)
9 views

Matlab Program

The function compute_DH_matrices1 calculates the transformation matrices for a robotic arm using Denavit-Hartenberg parameters. It takes six joint angles as input and constructs the transformation matrices based on predefined link lengths and angles. The overall transformation matrix is computed by multiplying individual matrices and displayed at the end.

Uploaded by

t61076447
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Matlab Program

The function compute_DH_matrices1 calculates the transformation matrices for a robotic arm using Denavit-Hartenberg parameters. It takes six joint angles as input and constructs the transformation matrices based on predefined link lengths and angles. The overall transformation matrix is computed by multiplying individual matrices and displayed at the end.

Uploaded by

t61076447
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

function T = compute_DH_matrices1(theta1, theta2, theta3, theta4,

theta5, theta6)
d = [243.3, 0, 0, 227.6, 0, 61.5];
a = [0, 200, 87, 0, 0, 0];
alpha = [-90, 180, 90, 90, -90, 0];
theta = [theta1, -90 + theta2, -90 + theta3, theta4, theta5, theta6]
alpha = deg2rad(alpha);
theta = deg2rad(theta);
T = eye(4);
for i = 1:6
A_i = [cos(theta(i)), -sin(theta(i)) * cos(alpha(i)), sin(theta(i)) * sin(alpha(i)), a(i) * cos(theta(i));

sin(theta(i)), cos(theta(i)) * cos(alpha(i)), -cos(theta(i)) * sin(alpha(i)), a(i) * sin(theta(i));

0, sin(alpha(i)), cos(alpha(i)), d(i);

0, 0, 0, 1];

fprintf('Transformation matrix A_%d:\n', i);


disp(A_i);
T = T * A_i;
end
disp('Overall transformation matrix T:');
disp(T);
end

You might also like