Académique Documents
Professionnel Documents
Culture Documents
2
1. Kinematic Chains
• Joint variables, qi
⎧θ if joint i is revolute
qi = ⎨ i
⎩ di if joint i is prismatic
1. Kinematic Chains
4
1. Kinematic Chains
• The position and orientation of the tool frame with respect to the
inertial frame is given by one homogeneous transformation matrix:
⎡ Rn0 on0 ⎤
⎥ = Tn = A1 ( q1 ) A2 ( q2 ) ⋅⋅⋅ An ( qn )
0
H =⎢
⎣0 1⎦
⎡ Rii −1 oii −1 ⎤
Ai (qi ) = ⎢ ⎥
⎣ 0 1 ⎦
Rij = Rii+1 ⋅⋅⋅ R jj −1 , oij = oij −1 + R ij −1o jj −1
• Thus, to fully define the forward kinematics for any serial manipulator,
all we need to do is create the Ai transformations and perform matrix
multiplication
2. Forward Kinematics:
The Denavit-Hartenberg (DH) Convention
• Representing each individual homogeneous transformation as the
product of four basic transformations:
Ai = Rot z ,θi Trans z ,di Trans x,ai Rot x ,αi
⎡cθi − sθi 0 0 ⎤ ⎡1 0 0 0 ⎤ ⎡1 0 0 ai ⎤ ⎡1 0 0 0⎤
⎢ ⎥ ⎢ 0⎥
0 0 ⎥ ⎢0 1 0 0 ⎥ ⎢0 1 0 0 ⎥ ⎢0 cαi − sαi
= ⎢ θi ⎥
s cθi
⎢ ⎥⎢ ⎥
⎢0 0 ⎥
1 0 ⎢0 0 1 di ⎥ ⎢0 0 1 0 ⎥ ⎢0 sαi cαi 0⎥
⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥
⎢⎣ 0 0 0 1 ⎥⎦ ⎣0 0 0 1 ⎦ ⎣0 0 0 1 ⎦ ⎢⎣0 0 0 1 ⎥⎦
• Four DH parameters:
– ai: link length - Each Ai is a function of only one variable
– αi: link twist -> di will be variable for prismatic joints
qi will be variable for revolute joints
– di: link offset - Any rigid body needs 6 parameters to describe
– θi: joint angle its position and orientation <-> 4 DH parameters
6
2. Forward Kinematics:
The Denavit-Hartenberg (DH) Convention
• Representing each individual homogeneous transformation as the
product of four basic transformations:
Ai = Rot z ,θi Trans z ,di Trans x ,ai Rot x ,αi
⎡cθi − sθi cαi sθi sαi ai cθi ⎤
⎢ ⎥
⎢ sθ cθi cαi −cθi sαi ai sθi ⎥
=⎢ i
0 sαi cαi di ⎥
⎢ ⎥
⎢⎣ 0 0 0 1 ⎥⎦
• Four DH parameters:
– ai: link length - Each Ai is a function of only one variable
– αi: link twist -> di will be variable for prismatic joints
qi will be variable for revolute joints
– di: link offset - Any rigid body needs 6 parameters to describe
– θi: joint angle its position and orientation <-> 4 DH parameters
7
Positive convention:
10
Assigning coordinate frames
11
13
14
Example 1: two-link planar manipulator
16
Example 2: three-link cylindrical robot
link ai αi di θi
• Now define DH parameters 1 0 0 d1 θ1
– Define the constant parameters ai, αi 2 0 -90 d2 0
– Define the variable parameters θi, di 3 0 0 d3 0
⎡c1 − s1 0 0⎤ ⎡1 0 0 0⎤
⎢s c1 0 0⎥ ⎢0 0 1 0⎥
A1 = ⎢ 1 ⎥ , A2 = ⎢ ⎥
⎢0 0 1 d1 ⎥ ⎢ 0 −1 0 d2 ⎥
⎢ ⎥ ⎢ ⎥
⎣0 0 0 1⎦ ⎣0 0 0 1⎦
⎡1 0 0 0⎤ ⎡ c1 0 − s1 − s1d3 ⎤
⎢0 1 0 0 ⎥ ⎢s 0 c1 c1d3 ⎥
A3 = ⎢ ⎥ , T3 = ⎢
0 1 ⎥
⎢0 0 1 d3 ⎥ ⎢ 0 −1 0 d1 + d 2 ⎥
⎢ ⎥ ⎢ ⎥
⎣0 0 0 1⎦ ⎣0 0 0 1 ⎦
17
18
Example 3: spherical wrist
link ai αi di θi
• Now define DH parameters 4 0 -90 0 θ4
– Define the constant parameters ai, αi 5 0 90 0 θ5
– Define the variable parameters θi, di 6 0 0 d6 θ6
T63 = A4 A5 A6
⎡ c4c5c6 − s4 s6 −c4c5 s6 − s4c6 c4 s5 c4 s5d 6 ⎤
⎢s c c + c s − s4c5 s6 + c4c6 s4 s5 s4 s5d 6 ⎥
=⎢ 4 5 6 4 6 ⎥
⎢ − s5c6 s5c6 c5 c5d 6 ⎥
⎢ ⎥
⎣ 0 0 0 1 ⎦
19
link ai αi di θi link ai αi di θi
4 0 -90 0 θ4 4 0 -90 0 θ4
5 0 90 0 θ5 5 0 90 0 -90 +θ5
6 0 0 d6 θ6 6 0 0 d6 θ6
3
20
General procedure for determining
forward kinematics
1. Label joint axes as z0, …, zn-1 (axis zi is joint axis for joint i+1)
2. Choose base frame: set o0 on z0 and choose x0 and y0 using right-
handed convention
3. For i = 1 : n-1,
i. Place oi where the normal to zi and zi-1 intersects zi. If zi intersects zi-1,
put oi at intersection. If zi and zi-1 are parallel, place oi along zi such
that di=0
ii. xi is the common normal through oi, or normal to the plane formed by
zi-1 and zi if the two intersect
iii. Determine yi using right-handed convention
4. Place the tool frame: set zn parallel to zn-1
5. For i = 1 : n, fill in the table of DH parameters
6. Form homogeneous transformation matrices, Ai
7. Create Tn0 that gives the position and orientation of the end-effector
in the inertial frame
21
22
Example 4: cylindrical robot with spherical wrist
• Note that z3 (axis for joint 4) is collinear r11 = c1c4c5c6 − c1s4 s6 + s1s5c6
with z2 (axis for joint 3), thus we can r21 = s1c4 c5c6 − s1s4 s6 − c1s5c6
make the following combination:
r31 = − s4 c5c6 − c4 s6
z6 ≡ a r12 = −c1c4 c5 s6 − c1s4 c6 − s1s5c6
x6 ≡ n
z3,z5 r22 = − s1c4 c5 s6 − s1s4 s6 + c1s5c6
r32 = s4 c5c6 − c4c6
x3,x5 y3,z4 r13 = c1c4 s5 − s1c5
r23 = s1c4 s5 + c1c5
⎡ r11 r12 r13 dx ⎤ r33 = − s4 s5
⎢r dy ⎥ d x = c1c4 s5 d 6 − s1c5 d 6 − s1d3
21 r22 r23
T6 = T3 T6 = ⎢
0 0 3 ⎥
⎢ r31 r32 r33 dz ⎥ d y = s1c4 s5 d 6 + c1c5 d 6 + c1d3
⎢ ⎥
⎣0 0 0 1⎦ d z = − s4 s5 d 6 + d1 + d 2
23
24
Example 5: the Stanford manipulator
25
link ai αi di θi
1 a1 0 0 θ1
2 a2 180 0 θ2
3 0 0 d3 0
4 0 0 d4 θ4
28
Example 6: the SCARA manipulator
link ai αi di θi
1 a1 0 d1 θ1 0
0
2 a2 180 0 θ2
0
3 0 0 d3 0
4 0 0 d4 θ4
29
31
a3 < 0
32
Example 7: PUMA 560
link ai αi di θi
1 0 -90 0 θ1
2 a2 0 d2 θ2
3 a3 90 0 θ3
4 0 -90 d4 θ4
5 0 90 0 θ5
6 0 0 d6 θ6 33
(
#DOF = 6 nL − n j + ∑ fi )
i =1
*excluding ground
35
(
#DOF = 3 nL − n j + ∑ fi )
i =1
• Example (2D):
– Planar four-bar, nL = 3, nj = 4, fi = 1(for all joints)
• 3(3 - 4) + 4 = 1DOF
– Forward kinematics:
⎛ ⎞
δ 2 − 2δ + 2 L2 2 ⎟
−1 ⎜
θ = cos
⎜⎜ 2 ⎟
⎝ 2 ( L1 − δ ) + L2 ⎠
2
⎟
⎛ L ⎞ π
+ tan −1 ⎜ 2 ⎟−
⎝ L1 − δ ⎠ 2
36
3. Inverse Kinematics
• Find the values of joint parameters that will put the tool frame at a
desired position and orientation (within the workspace)
– Given H:
⎡ R o⎤
H =⎢ ⎥ ∈ SE ( 3)
⎣ 0 1⎦
– Find all solutions to:
Tn0 ( q1 ,..., qn ) = H
– Noting that:
Tn0 ( q1 ,..., qn ) = A1 ( q1 ) ⋅⋅⋅ An ( qn )
– This gives 12 (nontrivial) equations with n unknowns
37
3. Inverse Kinematics
39
Kinematic decoupling
40
Kinematic decoupling
Kinematic decoupling
• Since [xc yc zc]T are determined from the first three joint angles,
our forward kinematics expression now allows us to solve for the
first three joint angles decoupled from the final three.
– Thus we now have R30
– Note that:
R = R30 R63
– To solve for the final three
joint angles:
( ) ( )
−1 T
R63 = R30 R = R30 R
⎧−atan2 ( − y, x ) y<0
• We use atan2(·) instead ⎪
of atan(·) to account for ⎪π − atan ⎛ − y ⎞ y ≥ 0, x < 0
⎪ ⎜ ⎟
the full range of angular ⎝ x⎠
⎪
solutions: ⎪
atan2 ( y, x ) = ⎨ atan ⎛⎜ y ⎞⎟ y ≥ 0, x ≥ 0
⎪ ⎝x⎠
⎪ π
⎪ y > 0, x = 0
⎪ 2
⎪⎩ undefined y = 0, x = 0
43
Inverse position
Example: RRR manipulator
• To solve for θ1, project the arm onto the x0, y0 plane
(1) : θ1 = atan2 ( xc , yc )
(2) : θ1 = π + atan2 ( xc , yc )
45
Inverse position
RRR: Left arm and right arm solutions
• Left arm: • Right arm:
θ1 = ϕ − α θ1 = α + β
ϕ = atan2 ( xc , yc ) α = atan2 ( xc , yc )
α = atan2 ( xc 2 + yc 2 − d 2 , d ) β = π + atan2 ( xc 2 + yc 2 − d 2 , d )
(
= atan2 − xc 2 + yc 2 − d 2 , − d )
46
Inverse position
RRR: Left arm and right arm solutions
• Therefore there are in general two solutions for θ1
• Finding θ2 and θ3 is identical to the planar two-link manipulator we
have seen previously:
r 2 + s 2 − a2 2 − a32
cos θ3 =
2a2 a3
r 2 = xc 2 + yc 2 − d 2
s = zc − d1
xc 2 + yc 2 − d 2 + ( zc − d1 ) − a2 2 − a32
2
cos θ3 =
2a2 a3
:= D
• Therefore we can find two solutions for θ3:
(
θ3 = atan2 D, ± 1 − D 2 )
47
Inverse position
RRR: Left arm and right arm solutions
• The two solutions for θ3 correspond to the elbow-down and elbow-
up positions respectively
• Now solve for θ2:
θ 2 = atan2 ( r , s ) − atan2 ( a2 + a3c3 , a3 s3 )
= atan2 ( xc 2 + yc 2 − d 2 , zc − d1 )
−atan2 ( a2 + a3c3 , a3 s3 )
48
Inverse position
RRR: Four total solutions
• In general, there will be a maximum of four solutions to the inverse
position kinematics of an elbow manipulator. Ex: PUMA
49
Inverse position
Example: RRP manipulator
• Spherical configuration
– Solve for θ1 using same method as with RRR
θ1 = atan2 ( xc , yc )
– If there is an offset,
there will be left-arm
and right-arm solutions
– Solve for θ2:
θ 2 = atan2 ( s, r )
r 2 = xc 2 + yc 2
s = zc − d1
d3 = r 2 + s 2 = xc 2 + yc 2 + ( zc − d1 )
2
50
Inverse orientation
• Now that we can solve for the position of the wrist center (given
kinematic decoupling), we can use the desired orientation of the
end effector to solve for the last three joint angles
– Finding a set of Euler angles corresponding to a desired
rotation matrix R
– We want the final three joint angles that give the orientation of
the tool frame with respect to o3 (i.e. R63)
51
52
Inverse orientation: spherical wrist
⎡ c4c5c6 − s4 s6 −c4c5 s6 − s4 c6 c4 s5 ⎤
R63 = ⎢ s4 c5c6 + c4 s6 − s4c5 s6 + c4 c6 s4 s5 ⎥
⎢ ⎥
⎢⎣ − s5c6 s5c6 c5 ⎥⎦
53
• Nonsingular case
– If θ5 ≠ 0, then r33 ≠ ±1 and:
(
θ5 = atan2 r33 , ± 1 − r332 )
– Thus there are two values for θ5. Using the first (s5 > 0):
θ 4 = atan2 ( r13 , r23 )
θ 6 = atan2 ( −r31 , r32 )
– Using the second value for θ5 (s5 < 0):
θ 4 = atan2 ( − r13 , −r23 )
θ 6 = atan2 ( r31 , −r32 )
– Thus for the nonsingular case, there are two solutions for the
inverse orientation kinematics
54
Inverse orientation: spherical wrist
• Singular case
– θ5 = 0 thus s5 = 0 and r13 = r23 = r31 = r32 = 0
– Therefore, R63 has the form:
⎡ c4c6 − s4 s6 −c4 s6 − s4 c6 0 ⎤ ⎡ c46 − s46 0 ⎤ ⎡ r11 r12 0⎤
R63 = ⎢ s4 c6 + c4 s6 − s4 s6 + c4c6 0 ⎥ = ⎢ s46 c46 0 ⎥ = ⎢ r21 r22 0⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎢⎣ 0 0 1 ⎥⎦ ⎢⎣ 0 0 1 ⎥⎦ ⎢⎣ 0 0 1 ⎥⎦
– So we can find the sum θ4 + θ6 as follows:
θ 4 + θ 6 = atan2 ( r11 , r21 ) = atan2 ( r11 , −r12 )
– Since we can only find the sum, there is an infinite number of
solutions (singular configuration)
55
56
Example: RRR arm with spherical wrist
⎝ ⎠
• Finally, we can solve for the two remaining angles as follows:
θ 4 = atan2 ( c1c23r13 + s1c23r23 + s23r33 , −c1s23r13 − s1s23r23 + c23r33 )
θ 6 = atan2 ( − s1r11 + c1r21 , s1r12 − c1r22 )
• For the singular configuration (θ5 = 0), we can only find θ4 + θ6 thus
it is common to arbitrarily set θ4 and solve for θ6
57
( ) ( )
−1 T kinematics
R63 = R30 R = R30 R
58
Example: SCARA manipulator
• DH parameters:
link ai αi di θi
1 a1 0 0 θ1
2 a2 180 0 θ2
3 0 0 d3 0
4 0 0 d4 θ4
⎡ R o⎤
T40 = ⎢ ⎥
⎣ 0 1⎦
⎡ c12 c4 + s12 s4 s12c4 − c12 s4 0 a1c1 + a2 c12 ⎤
⎢s c − c s −c12c4 − s12 s4 0 a1s1 + a2 s12 ⎥
= ⎢ 12 4 12 4 ⎥
⎢ 0 0 −1 −d3 − d 4 ⎥
⎢ ⎥
⎣ 0 0 0 1 ⎦ 59
• Thus, given the form of T40, R must have the following form:
⎡cα sα 0⎤
R = ⎢ sα −cα 0 ⎥ α = θ1 + θ 2 − θ 4 = atan2 ( r11 , r12 )
⎢ ⎥
⎢⎣ 0 0 −1⎥⎦
• To solve for θ1 and θ2 we project the manipulator onto the x0-y0 plane:
ox 2 + o y 2 − a12 − a2 2
c2 =
2a1a2
• This gives two solutions for θ2: (
θ 2 = atan2 c2 , ± 1 − c2 2 )
• Once θ2 is known, we can solve for θ1:
( )
θ1 = φ −ψ = atan2 ox , o y − atan2 ( a1 + a2c2 , a2 s2 )
• θ4 is now give as: θ 4 = θ1 + θ 2 − atan2 ( r11 , r12 )
• Finally, it is trivial to see that d3 = -(oz + d4 )
60