Você está na página 1de 3

ITMT

270
Robotics Systems
Application
Assignment 5 (Computer
Lab Report)
Department of Applied Engineering and
Technology College of Science and
Technology Morehead State University
Shane Holbrook

Software used: MatLab


Version: R2015b 8.6.0.267246
Describe the purpose of the laboratory (at least 50 words):
In the previous labs we have only learned how to place points and connect
them with lines. (Example the prism and cubes.) However, in this lab we
learned how to relate the previous labs with a more practical approach. So in
other words we made an actual simulated SCARA robot out of the points and
lines. The purpose of this lab is to make us better understand the concepts we
have been learning from the beginning. The purpose of MatLab is to simulate
and make things easier on us. This lab also allowed us to build our own SCARA
robot with the concepts we have been learning. Utilization of the Denavit
Hartenberg method we also mapped out the matrices for each of the links,
although we didnt do the entire homogeneous matrix due to the fact that the
SCARA robot here is stationary. Overall the ideal is to make us more familiar
with the concepts and more comfortable working with MatLab by learning the
code, concepts, and practices of the Denavit Hartenberg method, and how the
coding can actually produce almost anything we want it, as long as we
Name of de robot simulated:
Number of degrees of freedom: 4
SCARA Robot
Robot
classification
By kinematic structure: serial
By degrees of freedom: Planar
By the workspace geometry:
By the motions characteristics: Inverse
Cartesian
kinematics or linear interpolated.
Simulated
joints
Type of
Quanti
joint
ty
3
Revolut
e
1
Prismati
c
0
Univers
al
0
Spheric
al
1. What commands or functions did you learn for Matlab (only the new)?
The view command was new to me. Also the position of the reference frames. I gained a
better understanding of how they work in this assignment as well.
2. Enter your programming code developed in Matlab. Adds comments to
understand step by step what the code is doing.
clear all
close all
clc
% input parameters

a1= 6;
d1 = 5;
teta1 = 0/180*pi; %rotation of the first motor
alpha2 = 180/180*pi;
a2 = 4;
teta2 = 0/180*pi; % rotation of the second motor
d3 = 2; %translation of the linear motor
d4 = 1;
teta4 = 0/180*pi;
% DH transformation matrices
A0_1 = [cos(teta1) -sin(teta1) 0 a1*cos(teta1); sin(teta1) cos(teta1) 0
a1*sin(teta1);0 0 1 d1;0 0 0 1]
A1_2 = [cos(teta2) sin(teta2) 0 a2*cos(teta2); sin(teta2) -cos(teta2) 0 a2*sin(teta2);
0 0 -1 0; 0 0 0 1]
A2_3 = [1 0 0 0; 0 1 0 0; 0 0 1 d3; 0 0 0 1]
A3_4 = [cos(teta4) -sin(teta4) 0 0; sin(teta4) cos(teta4) 0 0; 0 0 1 d4; 0 0 0 1]
% position of the reference frame 0
frame0 = [0; 0; 0];
% position of the end of the big cylinder
big = [0; 0; d1];
% position of the reference frame 1
frame1 = [A0_1(1,4); A0_1(2,4); A0_1(3,4)];
% position of the reference frame 2
A0_2 = A0_1*A1_2;
frame2 = [A0_2(1,4); A0_2(2,4); A0_2(3,4)];
% position of the reference frame 3
A0_3 = A0_1*A1_2*A2_3;
frame3 = [A0_3(1,4);A0_3(2,4); A0_3(3,4)];
% position of the reference frame 4
A0_4 = A0_1*A1_2*A2_3*A3_4;
frame4 = [A0_4(1,4); A0_4(2,4); A0_4(3,4)];
% plotting
line([frame0(1), big(1)], [frame0(2), big(2)], [frame0(3), big(3)], 'lineWidth' ,5,
'color', [1 0 0]);
line ([frame1(1), big(1)], [frame1(2), big(2)], [frame1(3), big(3)], 'lineWidth' ,5,
'color', [0 1 0]);
line ([frame1(1), frame2(1)], [frame1(2), frame2(2)], [frame1(3), frame2(3)],
'lineWidth' ,5, 'color', [0 0 1]);
line ([frame2(1), frame3(1)], [frame2(2), frame3(2)], [frame2(3), frame3(3)],
'lineWidth' ,5, 'color', [1 0 1]);
line ([frame4(1), frame3(1)], [frame4(2), frame3(2)], [frame4(3), frame3(3)],
'lineWidth' ,5, 'color', [0 0 0]);
grid on
axis equal
axis ([0, 20, -15, 15, 0, 7]);
xlabel ('x (mm)');
ylabel ('y (mm)');
zlabel ('z (mm)');
title ('SCARA robot');
% VIEW(-15,15)

3. Include the graphical representation of your model.

Você também pode gostar