Download as pdf or txt
Download as pdf or txt
You are on page 1of 79

İTÜ-EEF Dept.

Of Control Engineering

Ch. 3: Forward and Inverse


Kinematics

KON 318E : Introduction to Robotics 1 1


İTÜ-EEF Dept. Of Control Engineering

Recap: Rigid Motions


• Rigid motion is a combination of rotation and translation
– Defined by a rotation matrix (R) and a displacement vector (d)
– the group of all rigid motions (d,R) is known as the Special Euclidean group,
SE(3)
• We can represent rigid motions (rotations and translations) as
matrix multiplication
• The matrix multiplication H is known as a homogeneous transform
and we note that R T d 
H 
 0 1 

1 R T  RT d 
H  
• Inverse transforms: 0 1 

KON 318E : Introduction to Robotics 2 2


İTÜ-EEF Dept. Of Control Engineering

Recap:Homogeneous Transforms
• Basic transforms:
– Three pure translation, three pure rotation

1 0 0 a 1 0 0 0
0 0 c 0
1 0 0   s
Trans x ,a  Rot x ,  
0 0 1 0 0 s c 0
   
0 0 0 1 0 0 0 1
1 0 0 0  c  0 s 0
0  0 0
1 0 b  1 0
Trans y ,b  Rot y ,  
0 0 1 0  s  0 c  0
   
0 0 0 1  0 0 0 1
1 0 0 0 c  s 0 0
0 1 0 0 s c 0 0
Trans z,c  Rot z,   
0 0 1 c 0 0 1 0
   
0 0 0 1 0 0 0 1

KON 318E : Introduction to Robotics 3 3


İTÜ-EEF Dept. Of Control Engineering

Example
• Euler angles: we have only discussed ZYZ Euler angles. What is the set of
all possible Euler angles that can be used to represent any rotation matrix?
– XYZ, YZX, ZXY, XYX, YZY, ZXZ, XZY, YXZ, ZYX, XZX, YXY, ZYZ
– ZZY cannot be used to describe any arbitrary rotation matrix since two
consecutive rotations about the Z axis can be composed into one rotation

KON 318E : Introduction to Robotics 4 4


İTÜ-EEF Dept. Of Control Engineering

Example
• Compute the homogeneous transformation representing a translation of 3
units along the x-axis followed by a rotation of p/2 about the current z-axis
followed by a translation of 1 unit along the fixed y-axis

T  Ty ,1Tx,3Tz ,p / 2

1 0 0 0  1 0 0 3 0 1 0 0
0 1 0 1  0 1 0 0  1 0 0 0 

0 0 1 0 0 0 1 0 0 0 1 0
   
0 0 0 1  0 0 0 1  0 0 0 1
1 1 0 3
1 0 0 1 

0 0 1 0
 
0 0 0 1

KON 318E : Introduction to Robotics 5 5


İTÜ-EEF Dept. Of Control Engineering

Forward Kinematics Introduction


• Challenge: given all the joint parameters of a manipulator,
determine the position and orientation of the tool frame
– Tool frame: coordinate frame attached to the most distal link of the
manipulator
– Inertial frame: fixed (immobile) coordinate frame fixed to the most
proximal link of a manipulator

• Therefore, we want a mapping between the tool frame and the


inertial frame
– This will be a function of all joint parameters and the physical geometry
of the manipulator

• Purely geometric: no need to worry about joint torques or dynamics


yet !!!

KON 318E : Introduction to Robotics 6 6


İTÜ-EEF Dept. Of Control Engineering

Convention
• A n-DOF manipulator will have n joints (either revolute or prismatic) and n+1
links (since each joint connects two links)
joint i-1 joint i

link i-1 link i

• We assume that each joint only has one DOF.

• Although this may seem like it does not include spherical or


universal joints, we can consider multi-DOF joints as a combination
of 1DOF joints with zero length

KON 318E : Introduction to Robotics 7 7


İTÜ-EEF Dept. Of Control Engineering

Convention
– “Frame o0” is the inertial frame
– “Frame on” is the tool frame
– “Joint i ” connects “link i-1” and “link i”
– “Frame oi” is connected to link i

• Joint variables, qi

 if joint i is revolute
qi   i
d i if joint i is prismatic

KON 318E : Introduction to Robotics 8 8


İTÜ-EEF Dept. Of Control Engineering

Convention
• A homogeneous transformation allows to express the position and orientation
of oj with respect to oi
– It is desired that the position and orientation of the tool frame with respect to the
inertial frame
– An intermediate step is to determine the transformation matrix that gives position
and orientation of oi with respect to oi-1: Ai ( Homogeneous Trans.)
zi
zi-1
Ai

yi
oi

oi-1 yi-1 xi


xi-1  Ai 1 Ai  2 ... Aj i Aj if i  j
– Now we can define the transformation oj to oi as: T j   if i  j
i
I

 T j i 1 if j  i

KON 318E : Introduction to Robotics 9 9


İTÜ-EEF Dept. Of Control Engineering

Convention
• Finally, the position and orientation of the tool frame with respect to the
inertial frame is given by one homogeneous transformation matrix:
– For a n-DOF manipulator

Rn0 on0 
H  n  A1 q1 A2 q 2     An q n 
0 qi :Joint variables,
 T
0 1

“FORWARD KINEMATIC MODEL”

• Ai homogeneous Trans formation Matrix is not a constant matrix, it is a


function of qi joint variable Ai(qi)

• 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

KON 318E : Introduction to Robotics 10 10


İTÜ-EEF Dept. Of Control Engineering

Convention
• Each Homogeneous transformation matrix in Tn0 :

R i 1
o 
i 1
Ai   i i

 0 1 
 i
Rj o 
i
T j  Ai 1 qi 1     A j qn   
i j

0 1
Rii1    R jj 1 o ij 1  R ij 1  o jj 1

Question : How the coordinate frames are attached onto the links??

KON 318E : Introduction to Robotics 11 11


İTÜ-EEF Dept. Of Control Engineering

The Denavit-Hartenberg (DH) Convention


Aim : to develop Forward Kinematic model ( Tn0 )

DEFINITION : DH convention is a method selecting frames

• Representing each individual homogeneous transformation as the


product of four basic transformations:

Ai  Transzi1 , di Rot zi1 , i Transxi , ai Rot xi , i

KON 318E : Introduction to Robotics 12 12


İTÜ-EEF Dept. Of Control Engineering

The Denavit-Hartenberg (DH) Convention


• Four DH parameters of linki and jointi:
– ai: link length
– i: link twist
– di: link offset
– i: joint angle

• Since each Ai is a function of only one variable, three of these will


be constant for each link
– di will be variable for prismatic joints and i will be variable for revolute
joints

• But we said any rigid body needs 6 parameters to describe its


position and orientation
– Three angles (Euler angles, for example) and a 3x1 position vector
– So how can there be just 4 DH parameters?...

KON 318E : Introduction to Robotics 13 13


İTÜ-EEF Dept. Of Control Engineering

Assigning Coordinate Frames


• AIM : Choosing “Frame 0” ….. “Frame n” for a given robot
manipulator

• The choice is not unique, but the result will always be the same

• The following figure, a part serial robot, are considered for


generating D-H frames.

Link_i
Link_i+1

Joint_i Joint_i+1

KON 318E : Introduction to Robotics 14 14


İTÜ-EEF Dept. Of Control Engineering

Assigning Coordinate Frames


• Assingning coordinate frames can be presented as an algorithm
given below:
Start:
for i=0 to n-1
STEP 1 : Assign zi axes
end :
STEP 2 : Establis the base frame
for i=1 to n-1
STEP 3 : Locate origin oi
STEP 4 : Assign xi axes
STEP 5 : Assign yi axes
end
STEP 6 : Establis the “Tool Frame”
STEP 7 : Create DH Table
end.
KON 318E : Introduction to Robotics 15 15
İTÜ-EEF Dept. Of Control Engineering

Assigning Coordinate Frames


STEP 1 : Assign zi axis
• Choose zi as the motion axis (= axis of actuation) of joint i+1
• Repeat this from z0 to zn-1
– If joint i+1 is revolute, zi is the axis of rotation of joint i+1
– If joint i+1 is prismatic, zi is the axis of translation for joint i+1

Joint_i Joint_i+1

Zi

Link i-1
Link i+1
Link i

Zi-1

KON 318E : Introduction to Robotics 16 16


İTÜ-EEF Dept. Of Control Engineering

Assigning Coordinate Frames


STEP 2 : Base Frame
• Choice of base frame nearly arbitrary
• We may choose o0 of the base frame to be any point on z0
• Then choose x0 and y0 by keeping right hand rule

1

z0

x0 y0
KON 318E : Introduction to Robotics 17 17
İTÜ-EEF Dept. Of Control Engineering

Assigning Coordinate Frames


(Now, an iterative process starts at base, assign frames
for each link from base to end-effector)
STEP 3 : Locate origin oi
• Locate oi : an intersection of zi axes by the common
normal between zi and zi-1

KON 318E : Introduction to Robotics 18 18


İTÜ-EEF Dept. Of Control Engineering

Joint_i+1
Joint_i Zi

Link i-1
Link i+1
Link i

Zi-1

oi Common
normal

KON 318E : Introduction to Robotics 19 19


İTÜ-EEF Dept. Of Control Engineering

Assigning Coordinate Frames


STEP 3 : Locate origin oi
• Two special cases :
1. If zi intersect zi-1 (no comon normal) then locate oi at this
intersection
zi-1 oi

zi

KON 318E : Introduction to Robotics 20 20


İTÜ-EEF Dept. Of Control Engineering

Assigning Coordinate Frames


• Two special cases :
2. If zi and zi-1 are parallel then locate oi any convinient position
along zi

zi-1 zi

oi

KON 318E : Introduction to Robotics 21 21


İTÜ-EEF Dept. Of Control Engineering

Assigning Coordinate Frames


STEP 4 : Assign xi axis
• Define xi axis along the common normal between zi and
zi-1 axes
• Direction : from zi-1 to zi

KON 318E : Introduction to Robotics 22 22


İTÜ-EEF Dept. Of Control Engineering

Joint_i
Joint_i+1

Link i-1
Link i+1
Link i

Zi-1 Zi

oi
Common xi
normal

KON 318E : Introduction to Robotics 23 23


İTÜ-EEF Dept. Of Control Engineering

Assigning Coordinate Frames


STEP 4 : Assign xi axis
• Specia Case : İf zi intersect zi-1 then define direction of xi
as a normal to zi and zi-1 plane

zi
zi-1
oi
xi

KON 318E : Introduction to Robotics 24 24


İTÜ-EEF Dept. Of Control Engineering

Assigning Coordinate Frames


STEP 5 : Assign yi axis
• Define yi axis by keeping right-hand rule

KON 318E : Introduction to Robotics 25 25


İTÜ-EEF Dept. Of Control Engineering

Joint_i Joint_i+1

Link i-1
Link i+1
Link i

Zi-1 Zi

yi

oi
Common xi
normal

KON 318E : Introduction to Robotics 26 26


İTÜ-EEF Dept. Of Control Engineering

Assigning Coordinate Frames


STEP 6 : Establish “Tool Frame” ( on)
• The previous assignments are valid up to frame n-1
• “TOOL FRAME” : Frame to which the gripper is attached
– The tool frame assignment is most often defined by the axes n, s, a:
• a is the approach direction
• s is the ‘sliding’ direction (direction along which the grippers open/close)
• n is the normal direction to a and s

KON 318E : Introduction to Robotics 27 27


İTÜ-EEF Dept. Of Control Engineering

D-H Parameters (D-H Table)


STEP 7 : Create DH Table

• DH parameters can be divided into 2 groups :


– Link Parameters : ai , i
– Joint Parameters : di , i

• Physical Basis for DH Parameters :


– ai : distance from intersection of zi-1 and xi to oi along xi
– i : angle from zi-1 to zi around xi
– di :distance from oi-1 to intersection of zi-1 and xi along zi-1
– i : angle from xi-1 to xi around zi-1

KON 318E : Introduction to Robotics 28 28


İTÜ-EEF Dept. Of Control Engineering

Link Parameters :
– ai : distance from intersection of zi-1 and xi to oi along xi
– i : angle from zi-1 to zi around xi i+1
zi
Z’i
Zi-1 Joint_i+1
Joint_i Zi+1

Link i Joint_i+2

zi+1
yi+1
i oi+1 xi+1

zi
ai+1
yi

ai oi xi

KON 318E : Introduction to Robotics 29 29


İTÜ-EEF Dept. Of Control Engineering

Joint Parameters :
– di :distance from oi-1 to intersection of zi-1 and xi along zi-1
– i : angle from xi-1 to xi around zi-1

i Joint_i+1
i+1
Link i Link i+1
Joint_i
Zi-1
xi-1
yi+1
zi+1 di+1
yi-1
di+1 i+1 xi+1

di zi
i yi

xi

KON 318E : Introduction to Robotics 30 30


İTÜ-EEF Dept. Of Control Engineering

DH Parameters : Positive Conventions


(-)

(+)

ai : distance from intersection of zi-1 and xi to oi along xi


di :distance from oi-1 to intersection of zi-1 and xi along zi-1
KON 318E : Introduction to Robotics 31 31
İTÜ-EEF Dept. Of Control Engineering

DH Parameters : Positive Conventions

i : angle from zi-1 to zi around xi


i : angle from xi-1 to xi around zi-1
KON 318E : Introduction to Robotics 32 32
İTÜ-EEF Dept. Of Control Engineering

DH Frames and Parameters

KON 318E : Introduction to Robotics 33 33


İTÜ-EEF Dept. Of Control Engineering

DH Frames and Parameters

KON 318E : Introduction to Robotics 34 34


İTÜ-EEF Dept. Of Control Engineering

DH Frames and Parameters

KON 318E : Introduction to Robotics 35 35


İTÜ-EEF Dept. Of Control Engineering

D-H Table :
• Described by 4 parameters (short names):
– i : twist angle
– ai : link length
– di : joint offset
– i : joint angle
• Joint variable is di or i ( takes “*” symbol)
• Build DH Table with values for each link:
Link a  d 
1 L1 90o 0 1*
2 0 0 d2* 0
    

KON 318E : Introduction to Robotics 36 36


İTÜ-EEF Dept. Of Control Engineering

Link Transformations
Joint_i
Joint_i+1

Link i Link i+1


Joint_i
Zi-1 yi+1
zi+1
xi-1
yi-1
xi+1

zi
yi
Ai+1
Ai xi

Ti-1i+1=Ai Ai+1
KON 318E : Introduction to Robotics 38 38
İTÜ-EEF Dept. Of Control Engineering

Link Transformations
Joint_i
Joint_i+1

Link i Link i+1


Joint_i
Zi-1 yi+1
zi+1
xi-1
yi-1
xi+1

zi
yi

Ai xi

Ai  Transzi1 , di Rotzi1 , i Transxi , ai Rotxi , i


KON 318E : Introduction to Robotics 39 39
İTÜ-EEF Dept. Of Control Engineering

The Denavit-Hartenberg (DH) Convention


Ai  Trans zi1 ,di Rot zi1 ,i Trans xi ,ai Rot xi ,i

1 0 0 0  ci  s i 0 0 1 0 0 ai  1 0 0 0
0 1 0 0   si ci 0 0 0 1 0 0  0 c i  s i 0

0 0 1 di   0 0 1 0  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
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  Ai is function of i , di , i and ai
  i
0 s i c i di 
 
 0 0 0 1 
KON 318E : Introduction to Robotics 40 40
İTÜ-EEF Dept. Of Control Engineering

Example 1: Two-Link Planar Manipulator


• 2DOF: need to assign three coordinate frames
1. Choose z0 axis (axis of rotation for joint 1, base frame)
2. Choose z1 axis (axis of rotation for joint 2)
3. Choose z2 axis (tool frame)
• This is arbitrary for this case since we have described no wrist/gripper
• Instead, define z2 as parallel to z1 and z0 (for consistency)
4. Choose xi axes
• All zi’s are parallel
• Therefore choose xi to intersect oi-1

KON 318E : Introduction to Robotics 41 41


İTÜ-EEF Dept. Of Control Engineering

Example 1: Two-Link Planar Manipulator


y2

x2
y0

y1

x1

x0

KON 318E : Introduction to Robotics 42 42


İTÜ-EEF Dept. Of Control Engineering

Example 1: Two-Link Planar Manipulator


• Now define DH parameters
– First, define the constant parameters ai, i
– Second, define the variable parameters i, di

link ai  i di i
1 a1 0 0 1
2 a2 0 0 2
– The i terms are 0 because all zi are parallel
– Therefore only i are variable

c1  s1 0 a1c1  c2  s2 0 a2c2  T10  A1


s c1 0 a1s1  s c2 0 a2s2  c12  s12 0 a1c1  a2c12 
A1   1 , A2   2 s
0 0 1 0  0 0 1 0  c12 0 a1s1  a2s12 
    T2  A1A2   12
0
0 0 1 0 
0 0 0 1  0 0 0 1 
 
0 0 0 1 

KON 318E : Introduction to Robotics 43 43
İTÜ-EEF Dept. Of Control Engineering

DH Example 2:

3 revolute joints
joint 1 Shown in home position

R
Link 2

Link 1 Link 3

joint 2 joint 3

L1 L2

KON 318E : Introduction to Robotics 44 44


İTÜ-EEF Dept. Of Control Engineering

DH Example 2:

Zi is axis of actuation for joint i+1

Z0 Z0 and Z1 are not co-planar


Z1 and Z2 are parallel
1

2 3
Z1 Z2

KON 318E : Introduction to Robotics 45 45


İTÜ-EEF Dept. Of Control Engineering

DH Example 2:
Z0 and Z1 are not co-planar:
Z0 x0 is the common normal

1
x1 x2 x3

x0

2 3
Z1 Z3
Z2

Z2Zand
1 and Z3Zare
2 are parallel
parallel : :
x1 is selected
x2 is selected on the common
on the common normal that
normal that
lies along lies
the alongofthe
center thecenter
link of
the link

KON 318E : Introduction to Robotics 47 47


İTÜ-EEF Dept. Of Control Engineering

DH Example 2:
Shown with joints in non-zero positions

Z0 x3
z3
2 3
x2

x1
1 Z2
x0

Z1

Observe that frame i moves with link i

KON 318E : Introduction to Robotics 49 49


İTÜ-EEF Dept. Of Control Engineering

DH Example 2:
• Link lengths given
• 1 = 90o (rotate by +90o around x0 to
align Z0 and Z1)
R
Z0
L1 L2

x1 x2 x3

x0
1

Z1 Z3
Z2

KON 318E : Introduction to Robotics 50 50


İTÜ-EEF Dept. Of Control Engineering

DH Example 2:
Build table
R
Z0
L1 L2
1
x1 x2 x3

1 x0

2 3
Z1 Z3
Z2

Link  d  a
1 1* 0 90o R
2 2* 0 0 L1
3 3* 0 0 L2
KON 318E : Introduction to Robotics 51 51
İTÜ-EEF Dept. Of Control Engineering

DH Example 2:

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 1
Ai  Ti   i
0 s i c i di 
 
0 0 0 1 

KON 318E : Introduction to Robotics 52 52


İTÜ-EEF Dept. Of Control Engineering

DH Example 2:
c1 0 s1 Rc1 
s 0  c1 Rs1 
A1  T10   1
0 1 0 0 
 
0 0 0 1 
c 2  s 2 0 L1c 2 
s c 2 0 L1s 2 
A2  T21    2
0 0 1 0 
 
0 0 0 1 
c3  s 3 0 L2 c3 
s c3 0 L2 s3 
A3  T32   3
0 0 1 0 
 
0 0 0 1 
KON 318E : Introduction to Robotics 53 53
İTÜ-EEF Dept. Of Control Engineering

DH Example 2: x3
z0
y2 z3
y1 3
x2
y0 2
x1
1 z2
x0

z1

x1 axis expressed y1 axis expressed z1 axis expressed


wrt {0} wrt {0} wrt {0}

c1 0 s1 Rc1 


s Origin of {1}
 1 0  c1 Rs1  w.r.t. {0}
A1  T1 
0
0 1 0 0 
 
0 0 0 1 
KON 318E : Introduction to Robotics 54 54
İTÜ-EEF Dept. Of Control Engineering

DH Example 2: x3
z0
y2 z3
y1 3
x2
y0 2
x1
1 z2
x0

z1
x2 axis expressed y2 axis expressed z2 axis expressed
wrt {1} wrt {1} wrt {1}

c 2  s 2 0 L1c 2 
s Origin of {2}
 2 c 2 0 L1s 2  w.r.t. {1}
A2  T2 
1
0 0 1 0 
 
0 0 0 1 
KON 318E : Introduction to Robotics 55 55
İTÜ-EEF Dept. Of Control Engineering

DH Example 2: x3
z0
y2 z3
y1 3
x2
y0 2
x1
1 z2
x0

z1
x3 axis expressed y3 axis expressed z3 axis expressed
wrt {2} wrt {2} wrt {2}

c3  s3 0 L2c3 


Origin of {3}
s c3 0 L2 s3  w.r.t. {2}
A3  T32   3
0 0 1 0 
 
0 0 0 1 
KON 318E : Introduction to Robotics 56 56
İTÜ-EEF Dept. Of Control Engineering

DH Example 2:
T30  A1 A2 A3
c1 c 23  c1 s 23 s1 
c1 L2 c 23  L1c 2  R  

s c
 1  23  s1 s 23  c1  
s1 L2 c 23  L1c 2  R  
 s 23 c 23 0 L2 s 23  L1c 2 
 
 0 0 0 1 
where
ci  cos i 
si  sin  i 
c 23  cos 2   3 
s 23  sin  2   3 
KON 318E : Introduction to Robotics 57 57
İTÜ-EEF Dept. Of Control Engineering

Example 3: Three-Link Cylindrical Robot

KON 318E : Introduction to Robotics 58 58


İTÜ-EEF Dept. Of Control Engineering

Example 3: Three-Link Cylindrical Robot


• 3DOF: need to assign four coordinate frames
1. Choose z0 axis (axis of rotation for joint 1, base frame)
2. Choose z1 axis (axis of translation for joint 2)
3. Choose z2 axis (axis of translation for joint 3)
4. Choose z3 axis (tool frame)
• This is again arbitrary for this case since we have described no wrist/gripper
• Instead, define z3 as parallel to z2

KON 318E : Introduction to Robotics 59 59


İTÜ-EEF Dept. Of Control Engineering

Example 3: Three-Link Cylindrical Robot


• Now define DH parameters
– First, define the constant parameters ai, i link ai i di i
– Second, define the variable parameters i, di 1 0 0 d1 1
2 0 -90 d2 0
c1  s1 0 0 1 0 0 0 1 0 0 0 3 0 0 d3 0
s c1 0 0  0 0 1 0  0 1 0 0 
A1   1 , A2   , A3  
0 0 1 d1  0  1 0 d2  0 0 1 d3 
     
0 0 0 1 0 0 0 1 0 0 0 1

c1 0  s1  s1d 3 
s 0 c c d 
T3  A1A2 A3  
0 1 1 1 3 
 0  1 0 d1  d 2 
 
0 0 0 1 

KON 318E : Introduction to Robotics 60 60


İTÜ-EEF Dept. Of Control Engineering

Example 4: Spherical Wrist


• 3DOF: need to assign four coordinate frames
– yaw, pitch, roll (4, 5, 6) all intersecting at one point o (wrist center)

KON 318E : Introduction to Robotics 61 61


İTÜ-EEF Dept. Of Control Engineering

Example 4: spherical wrist


• 3DOF: need to assign four coordinate frames
– yaw, pitch, roll (4, 5, 6) all intersecting at one point o (wrist center)
1. Choose z3 axis (axis of rotation for joint 4)
2. Choose z4 axis (axis of rotation for joint 5)
3. Choose z5 axis (axis of rotation for joint 6)
4. Choose tool frame:
• z6 (a) is collinear with z5
• y6 (s) is in the direction the gripper closes
• x6 (n) is chosen with a right-handed convention

KON 318E : Introduction to Robotics 62 62


İTÜ-EEF Dept. Of Control Engineering

Example 4: spherical wrist


• Now define DH parameters
– First, define the constant parameters ai, i
link ai i di i
– Second, define the variable parameters i, di
4 0 -90 0 4

c 4 0  s4 0 c5 0  s5 0 c6  s6 0 0 5 0 90 0 5
s 0 c4 
0 s 0 c5 
0 s c6 0 0  6 0 0 d6 6
A4   4 , A5   5 , A6   6
0 1 0 0 0 1 0 0 0 0 1 d6 
     
0 0 0 1 0 0 0 1 0 0 0 1

c 4c5c6  s4s6  c 4 c 5 s6  s 4 c 6 c 4 s5 c 4 s5 d 6 
s c c  c s  s 4 c 5 s6  c 4 c 6 s 4 s5 s4s5d 6 
T6  A4 A5 A6   4 5 6
3 4 6

  s5 c 6 s5 c 6 c5 c5d 6 
 
 0 0 0 1 

KON 318E : Introduction to Robotics 63 63


İTÜ-EEF Dept. Of Control Engineering

Example 4: spherical wrist


• The forward kinematics of the spherical wrist were identical to a ZYZ Euler
angle transformation:

c 4c5c6  s4s6  c 4 c 5 s6  s 4 c 6 c 4 s5 c 4 s5 d 6 
s c c  c s  s 4 c 5 s6  c 4 c 6 s 4 s5 s4s5d 6 
T63  A4 A5 A6   4 5 6 4 6

  s5 c 6 s5 c 6 c5 c5d 6 
 
 0 0 0 1 
4  
 5  
c c c  s s  c c s  s c c s  6  
 
R   s c c  c s  s c s  c c s s 
  s c s s c 

KON 318E : Introduction to Robotics 64 64


İTÜ-EEF Dept. Of Control Engineering

Example 5: Matlab “Symbolic Toolbox”


• Find the robot forwaed kinematic model using MATLAB and “Symbolic
Toolbox”

KON 318E : Introduction to Robotics 65 65


İTÜ-EEF Dept. Of Control Engineering

Example 5: Matlab “Symbolic Toolbox”


• D-H parameter are defined after coor. frames assigments.

Link i i ai di i Ti i-1
1 90 0 d1 1 * T1o
2 0 0 d2* 0 T21
3 0 0 d3 3 * T32

KON 318E : Introduction to Robotics 66 66


İTÜ-EEF Dept. Of Control Engineering

Example 5: Matlab “Symbolic Toolbox”


• Transformations
– The resulting transformation matrices for the manipulator :

KON 318E : Introduction to Robotics 67 67


İTÜ-EEF Dept. Of Control Engineering

Example 5: Matlab “Symbolic Toolbox”


• MATLAB Code (Sybolic Toolbox) : Transformation
%Define symbolic variables
syms theta1 theta3 d1 d2 d3
%Define transformations:
T1_0 = [cos(theta1), 0, sin(theta1), 0; sin(theta1), 0, -cos(theta1), 0;0, 1, 0, d1; 0, 0, 0, 1];
T2_1 = [1, 0, 0, 0; 0, 1, 0, 0; 0, 0, 1, d2; 0, 0, 0, 1];
T3_2 = [cos(theta3), -sin(theta3), 0, 0; sin(theta3), cos(theta3), 0, 0; 0, 0, 1, d3; 0, 0, 0, 1];

KON 318E : Introduction to Robotics 68 68


İTÜ-EEF Dept. Of Control Engineering

Example 5: Matlab “Symbolic Toolbox”


• MATLAB Code: Transformation
%Determine transformation
T2_0 = T1_0 * T2_1;
T2_0 = simple(T2_0)
T3_0 = T2_0*T3_2;
T3_0 = simple(T3_0)

After executing the program, the output should be the following:


T2_0 =
[ cos(theta1), 0, sin(theta1), sin(theta1)*d2]
[ sin(theta1), 0, -cos(theta1), -cos(theta1)*d2]
[ 0, 1, 0, d1]
[ 0, 0, 0, 1]
T3_0 =
[ cos(theta1)*cos(theta3), -cos(theta1)*sin(theta3), sin(theta1), sin(theta1)*(d3+d2)]
[ sin(theta1)*cos(theta3), -sin(theta1)*sin(theta3), -cos(theta1), -cos(theta1)*(d3+d2)]
[ sin(theta3), cos(theta3), 0, d1]
[ 0, 0, 0, 1]

KON 318E : Introduction to Robotics 69 69


İTÜ-EEF Dept. Of Control Engineering

Example 5: Matlab “Symbolic Toolbox”


• MATLAB Code: Transformation

%give numeric values for symbolic variables

T2_0Numeric = subs(T2_0,{theta1,d1,d2},{0,0,0})
T3_0Numeric = subs(T3_0,{theta1,theta3,d1,d2,d3},{0,0,0,0,0})

After executing the program, the output should be the following:

T2_0Numeric = T3_0Numeric =
1 0 0 0 1 0 0 0
0 0 -1 0 0 0 -1 0
0 1 0 0 0 1 0 0
0 0 0 1 0 0 0 1

KON 318E : Introduction to Robotics 70 70


İTÜ-EEF Dept. Of Control Engineering

Example 5: Matlab “Symbolic Toolbox”


• MATLAB Code (MuPad) : Transformation
Define transformations:
T1_0 :=matrix([ [cos(theta1), 0, sin(theta1), 0],[ sin(theta1), 0, -cos(theta1), 0],[0, 1, 0, d1],[ 0, 0, 0, 1]]):
T2_1 :=matrix([ [1, 0, 0, 0],[ 0, 1, 0, 0],[0, 0, 1, d2],[ 0, 0, 0, 1]]):
T3_2 :=matrix([ [cos(theta3), -sin(theta3), 0, 0],[sin(theta3), cos(theta3), 0, 0],[ 0, 0, 1, d3],[0, 0, 0, 1]]):

Define Symbols:
theta1:=`θ_1`;theta3:=`θ_3`;d1:=`d_1`;d2:=`d_2` ;d3:=`d_3`:
print(`T_1^0 `=T1_0):
print(`T_2^1 `=T2_1):
print(`T_3^2 `=T3_2):

Define Forwar Kinematic model: (Total Transformations):


T3_0:=Simplify(T1_0 * T2_1 * T3_2):
print(`T_3^0 `=T3_0):
Obtain numerical values:
`θ_1`:=0;`θ_3`:=0;`d_1`:=1;`d_2`:=1;`d_3`:=1:
print(`T_3^0 `=T3_0):
( ps: after formulation choose `Copy as LaTex code` to create Word formulas ! )
KON 318E : Introduction to Robotics 71 71
İTÜ-EEF Dept. Of Control Engineering

Example 6: cylindrical robot with spherical wrist

• 6DOF: need to assign seven coordinate frames


– But we already did this for the previous two examples, so we can fill in the table
of DH parameters:

link ai i di i
1 0 0 d1 1*
2 0 -90 d2* 0
3 0 0 d3* 0
4 0 -90 0 4*
o3, o4, o5 are all at
the same point oc 5 0 90 0 5*
6 0 0 d6 6*

KON 318E : Introduction to Robotics 72 72


İTÜ-EEF Dept. Of Control Engineering

Example 6: cylindrical robot with spherical wrist

• Note that z3 (axis for joint 4) is collinear with z2 (axis for joint 3), thus we can
make the following combination:

r11  c1c 4c5c 6  c1s4s6  s1s5c 6


r11 r12 r13 dx 
r r r23 d y  r21  s1c 4c5c 6  s1s4s6  c1s5c 6
T6  T3 T6   21 22
0 0 3
r31  s4c5c 6  c 4s6
r31 r32 r33 dz 
  r12  c1c 4c5s6  c1s4c 6  s1s5c 6
0 0 0 1
r22  s1c 4c5s6  s1s4s6  c1s5c 6
r32  s4c5c 6  c 4c 6
r13  c1c 4s5  s1c5
r23  s1c 4s5  c1c5
r33  s4s5
d x  c1c 4s5d 6  s1c5d 6  s1d 3
d y  s1c 4s5d 6  c1c5d 6  c1d 3
d z  s4s5d 6  d1  d 2

KON 318E : Introduction to Robotics 73 73


İTÜ-EEF Dept. Of Control Engineering

Example 7: the Stanford manipulator


• 6DOF: need to assign seven coordinate frames:
1. Choose z0 axis (axis of rotation for joint 1, base frame)
2. Choose z1-z5 axes (axes of rotation/translation for joints 2-6)
3. Choose xi axes
4. Choose tool frame
5. Fill in table of DH parameters:

link ai i di i
1 0 -90 0 1*
2 0 90 d2 2*
3 0 0 d3* 0
4 0 -90 0 4*
5 0 90 0 5*
6 0 0 d6 6*

KON 318E : Introduction to Robotics 74 74


İTÜ-EEF Dept. Of Control Engineering

Example 7: the Stanford manipulator


• Now determine the individual homogeneous transformations:

c1 0  s1 0 c 2 0 s2 0 1 0 0 0
s 0 c1 0 s 0  c 2 0  0 1 0 0 
A1   1 , A2   2 , A3  
0 1 0 0 0 1 0 d2  0 0 1 d3 
     
0 0 0 1 0 0 0 1 0 0 0 1
c 4 0  s4 0 c5 0 s5 0  c 6  s6 0 0
s 0 c4 0 s 0  c5 0 s c6 0 0 
A4   4 , A5   5 , A6   6
 0 1 0 0 0  1 0 0 0 0 1 d6 
     
0 0 0 1 0 0 0 1 0 0 0 1

KON 318E : Introduction to Robotics 75 75


İTÜ-EEF Dept. Of Control Engineering

Example 7: the Stanford manipulator


• Finally, combine to give the complete description of the forward kinematics:

r11  c1c 2 c 4c5c 6  s4s6   s2s5c 6   d 2 s4c5c 6  c 4s6 


r21  s1c 2 c 4c5c 6  s4s6   s2s5c 6   c1 s4c5c 6  c 4s6 
r31  s2 c 4c5c 6  s4s6   c 2s5c 6
r12  c1 c 2 c 4c5s6  s 4c 6   s2s5s6   s1  s4c5s6  c 4c 6 
r11 r12 r13 dx  r22  s1 c 2 c 4c5s6  s4c 6   s2s5s6   c1  s4c5s6  c 4s6 
r d y 
r r23 r32  s2 c 4c5s6  s4c 6   c 2s5s6
T6  A1    A6   21 22
0
r31 r32 r33 dz  r13  c1 c 2c 4s5  s2c5   s1s4s5
 
0 0 0 1 r23  s1 c 2c 4s5  s2c5   c1s4s5
r33  s2c 4s5  c 2c5
d x  c1s2d 3  s1d 2  d 6 c1c 2c 4s5  c1c5s2  s1s4s5 
d y  s1s2d 3  c1d 2  d 6 c1s4s5  c 2c 4s1s5  c5s1s2 
d z  c 2d 3  d 6 c 2c5  c 4s2s5 

KON 318E : Introduction to Robotics 76 76


İTÜ-EEF Dept. Of Control Engineering

Example 8: the SCARA manipulator


• 4DOF: need to assign five coordinate frames:
1. Choose z0 axis (axis of rotation for joint 1, base frame)
2. Choose z1-z3 axes (axes of rotation/translation for joints 2-4)
3. Choose xi axes
4. Choose tool frame
5. Fill in table of 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*

KON 318E : Introduction to Robotics 77 77


İTÜ-EEF Dept. Of Control Engineering

Example 8: the SCARA manipulator


• Now determine the individual homogeneous transformations:

c1  s1 0 a1c1  c2 s2 0 a2c2  1 0 0 0 c 4  s4 0 0


s c1 0 a1s1  s  c2 0 a2s2  0 1 0 0  s c4 0 0 
A1   1 , A2   2 , A3   , A4   4
0 0 1 0  0 0 1 0  0 0 1 d3  0 0 1 d4 
       
0 0 0 1  0 0 0 1  0 0 0 1 0 0 0 1

c12c 4  s12s4  c12s4  s12c 4 0 a1c1  a2c12 


s c  c s  s12s4  c12c 4 0 a1s1  a2s12 
T4  A1    A4   12 4
0 12 4

 0 0  1  d3  d 4 
 
 0 0 0 1 

KON 318E : Introduction to Robotics 78 78


İTÜ-EEF Dept. Of Control Engineering

Example 9: Human Arm


• As shown, the human arm consists of a series of rigid links connected by three
anatomical joints (shoulder joint, elbow joint, and wrist joint) :

Kinematic models of the Human and Robot arms.


KON 318E : Introduction to Robotics 79 79
İTÜ-EEF Dept. Of Control Engineering

Example 9: Human Arm


• Human arm D-H parameters :

• KUKA-Arm model D-H parameters

KON 318E : Introduction to Robotics 80 80


İTÜ-EEF Dept. Of Control Engineering

Dual Arm Examples

DLR Humanoid: Justin


KON 318E : Introduction to Robotics 81 81
İTÜ-EEF Dept. Of Control Engineering

KON 318E : Introduction to Robotics 84 84

You might also like