0% found this document useful (0 votes)
15 views2 pages

Q2 B

The document defines the kinematic model of a 4 degree of freedom robot arm as a serial link robot. It defines each link with symbolic variables and calculates the forward kinematics transformation matrix. It then tests the kinematic model using example link parameters.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views2 pages

Q2 B

The document defines the kinematic model of a 4 degree of freedom robot arm as a serial link robot. It defines each link with symbolic variables and calculates the forward kinematics transformation matrix. It then tests the kinematic model using example link parameters.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

% Questao 2B

syms ang1;
syms ang2;
syms ang3;
syms ang4;
syms l1;
syms l2;
syms d2;
syms d3;

L(1) = Link([ang1,l1,0,0]);
L(2) = Link([0,d2,0,-pi/2,1]); % Variavel articular d2
L(2).qlim=[0,1]
L(3) = Link([0,d3,0,0,1]); % Variavel articular d3
L(3).qlim=[0,1]
L(4) = Link([ang4,l2,0,0]);
S = SerialLink(L)

L =
Revolute(std): theta=q1 d=l1 a=0 alpha=0 offset=0
Prismatic(std): theta=0 d=q2 a=0 alpha=-pi/2 offset=0
Prismatic(std): theta=0 d=q3 a=0 alpha=0 offset=0
Revolute(std): theta=q4 d=l2 a=0 alpha=1 offset=0

L =
Revolute(std): theta=q1 d=l1 a=0 alpha=0 offset=0
Prismatic(std): theta=0 d=q2 a=0 alpha=-pi/2 offset=0
Prismatic(std): theta=0 d=q3 a=0 alpha=0 offset=0
Revolute(std): theta=q4 d=l2 a=0 alpha=1 offset=0

S =

noname:: 4 axis, RPPR, stdDH, slowRNE, Symbolic


+---+-----------+-----------+-----------+-----------+-----------+
| j | theta | d | a | alpha | offset |
+---+-----------+-----------+-----------+-----------+-----------+
| 1| q1| l1| 0| 0| 0|
| 2| 0| q2| 0| -pi/2| 0|
| 3| 0| q3| 0| 0| 0|
| 4| q4| l2| 0| 0| 0|
+---+-----------+-----------+-----------+-----------+-----------+

A01 = trotz(ang1)*transl(0, 0, l1);


A12 = trotz(0)*trotx(-pi/2)*transl(0, 0, d2);
A23 = trotz(0)*transl(0, 0, d3);
A34 = trotz(ang4)*transl(0, 0, l2);

A04 = A01*A12*A23*A34

A04 =

[ cos(ang1)*cos(ang4), -cos(ang1)*sin(ang4), -sin(ang1), -3*sin(ang1)]


[ cos(ang4)*sin(ang1), -sin(ang1)*sin(ang4), cos(ang1), 3*cos(ang1)]
[ -sin(ang4), -cos(ang4), 0, 1]
[ 0, 0, 0, 1]

% Testando Robo da Figura 2b

ang1 = 0;
ang2 =0;
ang3 = 0;
ang4 = 0;
l1 = 1;
l2 = 1;
d2 = 1;
d3 = 1;

L(1) = Link([ang1,l1,0,0]);
L(2) = Link([0,d2,0,-pi/2,1]);
L(2).qlim=[0,1]
L(3) = Link([0,d3,0,0,1]);
L(3).qlim=[0,1]
L(4) = Link([ang4,l2,0,0]);
S = SerialLink(L)

teach(S)

You might also like