Chapter 4 PDF
Chapter 4 PDF
Page 25
2 13 7 6
1 px
If c1 is not 0 then c 2 = − L1
L2 c1
1 py
If c1 = 0 then c 2 = − L1
L2 s1
Using pz = s2L2 from element (3,4) we can solve:
p z L2
θ 2 = tan −1
2 c
d2
Y
X
c1 − s1 0 0 1 0 0 0 c 3 − s3 0 0
s c1 0 0 0 0 − 1 − d 2 s c3 0 0
0
T = 1 1
T = 2
T = 3
1
0 0 1 0
2
0 1 0 0
3
0 0 1 L2
0 0 0 1 0 0 0 1 0 0 0 1
Y1
4.6 Describe a simple algorithm for choosing the nearest solution from a set of
possible solutions.
4.9 Figure 4.13 shows a two-link planar arm with rotary joints. For this arm, the
second link is half as long as the first, that is: L1 = 2L2 . The joint range limits in
degrees are:
0 < θ1 < 180,
-90 < θ2 < 180.
Sketch the approximate reachable workspace (an area) of the tip of link 2.
i αi-1 a i-1 di θi
1 0 0 0 θ1
2 0 a1 0 θ2+90
3 α2 0 d3 θ3-90
4 0 a3 0 θ4
α2 = 45, a1 = 1, d3 = 2 , a3 = 2
c1 − s1 0 0 c 2 − s2 0 a1
s c1 0 0 s c2 0 0
0
T = 1 1
T = 2
1
0 0 1 0
2
0 0 1 0
0 0 0 1 0 0 0 1
c3 − s3 0 0
c 4 − s4 0 a3
2 2 2
s3 c3 − − 1 s c4 0 0
2 4
3T = 4T =
2 2 2 3
2 2 2 0 0 1 0
s3 2 c3 1
0 2 2 0 0 0 1
0 0 1
0
4 T = 01T 12T 23T 34T
1
0 T 04T = 10T 01T 12T 23T 34T = 41T
2
... ... ... a3 c3 c 2 − a 3 s 3 s 2 + s 2 + a1
c1 s1 0 0 2
− s 0 ... − c2
2
1 c1 0 ... ... a3 c3 s 2 + a 3 s 3 c 2
0T = 4T =
1 1
2
0 0 1 0
... ... ... a3 s 3
2
0 0 0 1
2
0 0 0 1
2
p z = a3 s3 ⇒ s 3 = 0.707 → θ 3 = 45 or 135
2
0
P4 ORG = 01T 12T 23T 3P4 ORG
U sin g z = (k 1 s 2 − k 2 c 2 )sα 1 + k 4
and knowing that sα 1 = 0 , we have z = k 4
Then , z = f 3 + d 2 = f 3
z = 1.707 = f 3 = a 3 sα 2 s 3 − d 4 sα 3 sα 2 c3 + d 4 cα 3 cα 2 + d 3 cα 2 = s 3 + 1 ⇒
⇒ s 3 = 0.707 → θ 3 = 45 or 135
0
0
P4 ORG = 1
1.414
a1 = 0 → k 3 = r
r = 0 2 + 12 + 1.414 2 = 3
2 2
f 3 = a3 sα 2 s 3 − d 4 sα 3 sα 2 c3 + d 4 cα 3 cα 2 + d 3 cα 2 = s3 +
2 2
k 3 = 3 = a3 + d 4 + d 3 + a 2 + 2d 4 d 3 cα 3 + 2a 2 a 3 c 3 + 2a 2 d 4 cα 33 s 3 + a12 + d 22 + 2d 2 f 3
2 2 2 2
= 3 + 2 s 3 + 2 ⇒ s 3 = −1 → θ 3 = −90
Programming Exercise.
where "wrelb," an input, is the wtist frame specified relative to the base frame;
"current," an input, is the current position of the robot (given as a vector of joint
angles); "near" is the nearest solution; "far" is the second solution; and "sol" is
a flag which indicates whether solutions were found or not. (sol = FALSE if no
solutions were found). The link lengths (meters) are 11 = 12 = 0.5.
The joint ranges of motion are: 170 < θi < 170. Test your routine by calling it
back-to-back with KIN to test whether they are indeed inverses of one another.
% INVKIN
%
%
% Calculates inverse kineamtics for the 3-link manipulator.
%
l1 = 0.5;
l2 = 0.5;
x = wrelb(1);
y = wrelb(2);
t = wrelb(3);
if (c2>1 | c2<-1),
flag = 0;
near = current;
far = current;
else
s2_1 = sqrt(1-c2*c2);
s2_2 = -sqrt(1-c2*c2);
ans_t2_1 = atan2(s2_1,c2)*180/pi;
ans_t2_2 = atan2(s2_2,c2)*180/pi;
end
end
end
if nargout == 0,
flag
near
end
where "trels" is the {T} frame specified relative to the {S} frame. Other
parameters are exactly as in the INVKIN subroutine. The definitions of {T} and
{S} should be globally defined variables or constants. SOLVE should use calls to
TMULT, TINVERT, and INVKIN.
% SOLVE
%
%
% Calculates inverse kineamtics for the 3-link manipulator.
% SOLVE calculates wrelb and solves for joints 1, 2 and 3
%
% SOLVE(goal, tool, station, current), where goal, tool and
% station are given in user form.
%
% returns 2 vectors (1x3) with the near solution and the far
% far solution, and a flag to indicate if a solution was found
trels = utoi(goal);
srelb = utoi(station);
trelw = utoi(tool);
The robot is using the same tool in the same working area as in Programming
Exercise (Part 2), so {T} and {S} are defined.
Calculate the joint angles for each of the three goal frames given below.
Assume that the robot will start with all angles equal to 0.0 and move to these
three goals in sequence. The program should find the neareat solution with
respect to the previous goal point.
[x1 y1 θ1 ] = [0.0 0.0 -90.0],
[x2 y2 θ2 ] = [0.6 -0.3 45.0],
[x3 y3 θ3 ] = [-0.4 0.3 120.0],
[x4 y4 θ4 ] = [0.8 1.4 30.0].
You should call SOLVE and WHERE back to back to make sure they are truly
inverse functions.
% PROG_4_3
%
% Prints the joint values for every goal frame for
% the 3-link manipulator
%
% PROG_4_3(goal_frame) where goal frame is matrix, where each
% row is a goal especifation of the form [x y angle]. Angle in
degrees
%
n = size(goal_frame);
for i = 1:n(1),
goal = goal_frame(i,1:3);
[near far flag] = solve(goal, tool, station, current);
current = near
if flag == 0,
i = n;
end
end
» goal = [0 0 -90 ; 0.6 -0.3 45 ; -0.4 0.3 120 ; 0.8 1.4 30.0 ];
» prog_4_3(goal)
current =
current =
current =
current =