Professional Documents
Culture Documents
AE5337 Homework 3 Liu
AE5337 Homework 3 Liu
We can calculate all the angle deviations from current joint positions and then choose one
set that minimize the overall joint rotation needed.
Solution:
Factors might affect repeatability:
1. Sensor resolution and noise
2. Actuator control accuracy
3. Looseness of joints
4. Flexibility of links
a = L3;
alpha = 0;
d = 0;
theta = 0;
T3fH = HomoTrans(a,alpha,d,theta);
% ii) ========================
% T0fH = [ 0.5 -0.866 0 7.5373
% 0.866 0.6 0 3.9266
% 0 0 1 0
% 0 0 0 1]
% iii) =======================
% T0fH = [ 0 1 0 -3
% -1 0 0 2
% 0 0 1 0
% 0 0 0 1]
% iv) ======================
% T0fH = [0.866 0.5 0 -3.1245
% -0.5 0.866 0 9.1674
% 0 0 1 0
% 0 0 0 1]
Px = U1(1,4);
Py = U1(2,4);
Pz = U1(3,4);
nx = U1(1,1);
ny = U1(2,1);
nz = U1(3,1);
%Frame 0 to 1
a = 0;
alpha = 0;
d = 0;
theta = theta1;
T0f1 = HomoTrans(a,alpha,d,theta);
%Frame 1 to 2
a = L1;
alpha = 0;
d = 0;
theta = theta2;
T1f2 = HomoTrans(a,alpha,d,theta);
%Frame 2 to 3
a = L2;
alpha = 0;
d = 0;
theta = theta3;
T2f3 = HomoTrans(a,alpha,d,theta);
%Frame 3 to H
a = L3;
alpha = 0;
d = 0;
theta = 0;
T3fH = HomoTrans(a,alpha,d,theta);
% This function computes the homogeneous transform matrix from MDH params
function T = HomoTrans(a,alpha,d,theta)
T = [ cos(theta) -sin(theta) 0 a
sin(theta)*cos(alpha) cos(theta)*cos(alpha) -sin(alpha) -sin(alpha)*d
sin(theta)*sin(alpha) cos(theta)*sin(alpha) cos(alpha) cos(alpha)*d
0 0 0 1 ];
end
## Inverse Kinematics:
Angles =
Theta1 Theta2 Theta3
______ ______ ______
0 0 0
0 0 0
## Inverse Kinematics:
Angles =
Theta1 Theta2 Theta3
______ ______ ______
9.9999 20 29.999
27.114 ‐20 52.885
It is found in this case that the element (2,2) should be 0.5. It is wrong because the norm of
every column and every row in a rotation matrix should equal to 1.
## Inverse Kinematics:
Angles =
Theta1 Theta2 Theta3
______ ______ ______
90 90 90
163.74 ‐90 ‐163.74
In this case, the program fail because the value of sqrt(Px^2+Py^2‐real(k)^2) is not a real
number. This means that the position (Px, Py) is out of reachability. By inspection we can
easily find that Py = 9.1674 > (L1+L2+L3) which is not reasonable.