Chương 04

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

Ho Chi Minh city University of Technology and Education

Faculty of Electrical & Electronics Engineering


Robotics and Intelligent Control Laboratory

Robotics

Presenter: Dr. Duc Thien, Tran

1
Tài liệu tham khảo

1. John J. Craig, Introduction to Robotics: Mechanics and Control, 2018.


2. F. Fahimi, Autonomous Robots: modeling, path planning, and control, 2009.
3. PGS. Nguyễn Trường Thịnh, Giáo trình Kỹ thuật Robot, NXB Đại học Quốc gia TP.HCM, 2014.
4. Bruno Siciliano, Lorenzo Sciavicco, Luigi Villani and Giuseppe Oriolo, Robotics: Modelling,
Planning and Control, 2009.
5. https://www.youtube.com/watch?v=8MzC8Nmr2rg
6. https://www.youtube.com/watch?v=OYEvD8UHT8Y

2
Contents

Topic 1: Introduction
Topic 2: Basic robotic concepts
Topic 3: Spatial Representations of Rigid Bodies
Topic 4: Forward Kinematics of Robot Manipulators

3
- Topic 4 -
Forward Kinematics of Robot
Manipulators

- Week 3 -
Objectives

• Understand basic concepts of forward kinematics


• Kinematically model robot manipulators using the Denavit-Hartenberg parameters
• Kinematically model robot manipulators using arbitrary homogeneous transformation
matrices

5
Outline

1. Introduction

2. Geometric method

3. Denavit-Hartenberg (DH) convention

4. Modified Denavit – Hartenberg (DH)

5. Examples of Denavit-Hartenberg

- Forward Kinematics of Robot Manipulators -


Kinematics of Robot Manipulators

{n}

qi+1

Relation between joints (qi) and the


pose (position/orientation) of some
point (e.g.: frame {n})
qi
{0}
Kinematics of Robot Manipulators

1. Forward and Inverse formulations


x = f (q)

Forward
Joint kinematics Operational
space space
q = (q1 , , qn ) x = ( x, y , z , α , β , γ )
Inverse
kinematics

Forward kinematics q = f −1 (x)


Given a joint configuration, find the pose (position/orientation) of some part of the robot (e.g. end
effector)
Inverse Kinematics
Find the joint configuration that achieves a certain pose (position/orientation) of some part of the
robot
Kinematics of Robot Manipulators

1. Forward and Inverse formulations

T=?

What values must q have to


Given q, where is the end
achieve the shown pose of the
effector?
end effector?

Forward kinematics Inverse kinematics


Forward Kinematics
1. Example: 6 dof (degrees-of-freedom) robot

Forward kinematics: position and orientation


of the end effector

From: Springer Handbook of Robotics, 2nd Ed. (2016)


Forward Kinematics

Example (robot R-R): given q1, q2 , where is the end effector?


- Position of the end effector
ŷ y {e} x x = l1 cos(q1 ) + l2 cos(q1 + q2 )
y φ
y = l1 sin(q1 ) + l2 sin(q1 + q2 )
l2
- Orientation of the end effector
l1 q2
φ= q1 + q2
{0} q1
x  x x̂ l1 cos(q1 ) + l2 cos(q1 + q2 ) 
 
Position and orientation: x =  y  x =  l1 sin(q1 ) + l2 sin(q1 + q2 ) 
About axis φ   
z   q1 + q2

cos(q1 + q2 ) − sin(q1 + q2 ) 0 l1 cos(q1 ) + l2 cos(q1 + q2 ) 


As a homogeneous 0  sin(q + q ) cos(q + q ) 0 l1 sin(q1 ) + l2 sin(q1 + q2 ) 
Te =  1 2 1 2
transformation matrix  0 0 1 0 
 
 0 0 0 1 
Note: the reference frame of the end effector was arbitrarily assigned
Forward Kinematics

Example (robot R-R): given q1, q2 , where is the end effector?


- Position of the end effector
ŷ y {e} x x = l1 cos(q1 ) + l2 cos(q1 + q2 )
y φ
y = l1 sin(q1 ) + l2 sin(q1 + q2 )
l2
- Orientation of the end effector
q2
l1 φ= q1 + q2
{0} q1
x x̂  x l1 cos(q1 ) + l2 cos(q1 + q2 ) 
 
Position and orientation: x =  y  x =  l1 sin(q1 ) + l2 sin(q1 + q2 ) 
φ   q1 + q2 

 q1 
Joint vector: q=  x = f (q)
 q2 
Forward Kinematics

1. In a generic way: Joint configuration

x = f (q)

Position/orientation of some point* (e.g. end effector)


x3
f is different for different operational
points* x
f is a (highly) nonlinear function
x is usually with respect to the base
• f is usually represented using a
homogeneous transformation x1 x2
- It contains position and orientation
Baxter Robot

* Points x are usually called: operational points


Forward Kinematics

For an Open Chain


1. Homogeneous transformation of every frame with respect to the previous one:

1 {2}
{1}
T2
{n − 1}
0
T1 n −1
Tn
{0}

Base Efector
final {n}

Previous frame i −1 Every T (usually) depends of a single


Ti Current frame joint (variable)

2. Forward kinematics: frame {n} with respect to frame {0}


Tn = ( 0 T1 )( 1T2 ) ... ( n − 2 Tn −1 )( n −1Tn )
0 Pose of the end effector with
respect to the robot base
Forward Kinematics

Frame for the End Effector


1. (almost) By convention:
o
[y] n {e}: end effector frame
[x]

{e} o sometimes called s


(sliding plane of jaws)

a [z]

a: approach vector (aligned with the roll axis and pointing outwards)
o: orientation vector (in the direction of motion of the gripper jaws)
n: normal vector (orthogonal to the plane defined by o and a)
2. Homogeneous transformation matrix:  nx ox ax px 
n oy ay p y  (px, py, pz): position of {e}
Pose of the end effector with
respect to the robot base
0
Te =  y with respect to the base
 nz oz az pz 
 
0 0 0 1
Forward Kinematics

In general:
• Assign reference frames to links (not necessarily to every link)
• Relate frame {i} to frame {i-1}
• Apply compositions of transformations to obtain the end effector frame with respect to the base
Forward Kinematics
Geometric Methods
• They assign arbitrary reference frames (by inspection)
• The transformation matrices (or screws) from frame to frame are different (there is no general
transformation matrix)
Examples:
• Generic geometric methods
• Product of exponentials (PoE)

Systematic Methods:
• They assign reference frames based on rules
• The relation between frames is given by some parameters (based on rules)
• Generic (similar) transformations are obtained between frames
Examples:
• Denavit-Hartenberg (DH)
• Hayati-Roberts
• Khalil-Kleinfinger, etc.
Outline

1. Introduction

2. Geometric method

3. Denavit-Hartenberg (DH) convention

4. Modified Denavit – Hartenberg (DH)

5. Examples of Denavit-Hartenberg

- Forward Kinematics of Robot Manipulators -


Geometric Method

Introduction
I. Main Characteristic:
It arbitrarily assigns reference frames
II. Procedure:
1. Assign arbitrary frames to each link (they must move with the link) → The motion is usually about
the z axis or along it
2. Describe each frame with respect to the previous one (using homogeneous transformation
matrices)
3. Multiply the partial descriptions (of the kinematic chain) to obtain the end effector with respect to
the base frame
• Note:
At the end a “standard” frame can be added to the end effector
Steps 1 and 2 can be done link by link (first for link 1, then for link 2,…)
Forward Kinematics: Geometric Method

2D Example: R-R Robot


ŷ y {e} x
y φ Procedure:
l2 1. Assign frames (that move with each link)
2. Relate a frame to the previous one
{1} q2
l1 (0T1 and 1Te)

{0} q1
x x̂

• 0T1: system {1} with respect to {0} = “take” {0} to {1}


- Rotate q1 about z: Rotz(q1) 0
T1 = Rot z (q1 )Trx (l1 )
- Translate l1 along the resulting x (current frame): Trx(l1)

cos(q1 ) − sin(q1 ) 0 0  1 0 0 l1  cos(q1 ) − sin(q1 ) 0 l1 cos(q1 ) 


 sin(q ) cos(q ) 0 0  0 1 0 0   sin(q1 ) cos(q1 ) 0 l1 sin(q1 ) 
0
T1 =  1 1
=
 0 0 1 0  0 0 1 0  0 0 1 0 
    
 0 0 0 1  0 0 0 1  0 0 0 1 
Forward Kinematics: Geometric Method

2D Example: R-R Robot


ŷ y {e} x Procedure:
y φ
1. Assign frames (that move with each link)
l2 2. Relate a frame to the previous one
{1} q2 (0T1 and 1Te)
l1
{0} q1
x x̂
• 1Te: system {e} with respect to {1} = “take” {1} to {e}
- Rotate q2 about z: Rotz(q2) 1
Te = Rot z (q2 )Trx (l2 )
- Translate l2 along the resulting x (current frame): Trx(l2)

cos(q2 ) − sin(q2 ) 0 0  1 0 0 l2  cos(q2 ) − sin(q2 ) 0 l2 cos(q2 ) 


 sin(q ) cos(q ) 0 0  0 1 0 0   sin(q2 ) cos(q2 ) 0 l2 sin(q2 ) 
1
Te =  2 2
=
 0 0 1 0  0 0 1 0  0 0 1 0 
    
 0 0 0 1  0 0 0 1  0 0 0 1 
Forward Kinematics: Geometric Method

2D Example: R-R Robot


Procedure:
3. Multipliy to obtain the final transformation matrix 0Te
0
Te = ( 0 T1 )( 1Te )
cos(q1 ) − sin(q1 ) 0 l1 cos(q1 )  cos(q2 ) − sin(q2 ) 0 l2 cos(q2 ) 
 sin(q ) cos(q ) 0 l1 sin(q1 )   sin(q2 ) cos(q2 ) 0 l2 sin(q2 ) 
0
Te =  1 1

 0 0 1 0  0 0 1 0 
  
 0 0 0 1  0 0 0 1 
cos(q1 + q2 ) − sin(q1 + q2 ) 0 l1 cos(q1 ) + l2 cos(q1 + q2 ) 
 sin(q + q ) cos(q + q ) 0 l1 sin(q1 ) + l2 sin(q1 + q2 ) 
0
Te =  1 2 1 2

 0 0 1 0 
 
 0 0 0 1 

Position and orientation of the end


effector with respect to the base frame
MATLAB Codes

function T = Trans(x,y,z) function R = Troty(phi)


T=[1,0,0,x;... R=[cos(phi), 0,sin(phi),0;...
0,1,0,y;... 0,1,0,0;...
0,0,1,z;... -sin(phi),0,cos(phi),0;...
0,0,0,1]; 0,0,0,1];
End End
function R = Trotx(phi) function R = Trotz(phi)
R=[1,0,0,0;... R=[cos(phi) -sin(phi) 0 0;...
0,cos(phi),-sin(phi),0;... sin(phi) cos(phi) 0 0;...
0,sin(phi),cos(phi),0;... 0 0 1 0;...
0,0,0,1]; 0 0 0 1];
End End

23
Forward Kinematics: Geometric Method
3D Example: SCARA Robot

ABB’s SCARA Robot (IRB910SC)


Adept’s SCARA Robot (cobra s800)

https://youtu.be/IRDJnwFDq88 https://youtu.be/97KX-j8Onu0
Forward Kinematics: Geometric Method

3D Example: SCARA Robot

Adept’s SCARA Robot Schematic model of a SCARA robot


Forward Kinematics: Geometric Method

3D Example: SCARA Robot


q1 l3
1. Take {0} to {1} l2
- Translate {0} a distance l1 along z0.
z1
- Rotate 180°+q1 about z0 to get to {1} y1 x1

0
T1 = Trz (l1 ) Rot z (180° + q1 )
l4
1 0 0 0  −c1
−s
s1 0 0
l1
0 1 0 0  −c1 0 0 
  1 z0
0 0 1 l1   0 0 1 0
   
0 0 0 1  0 0 0 1
y0
x0
 −c1 s1 0 0
−s −c1 0 0 
0
T1 =  1
 0 0 1 l1 
  Arbitrarily assign
 0 0 0 1 frames

Since translation and rotation are with respect to the same


axis, we have: Trz (l1 ) Rot z (q1 ) = Rot z (q1 )Trz (l1 )
Forward Kinematics: Geometric Method

3D Example: SCARA Robot q2


q1 l3
2. Take {1} to {2} l2 z2 y2
- Translate {1} a distance l2 along x1
z1
- Then rotate (-90°+q2) about the new z to get to y1 x1 x2
{2}
1
T2 = Trx (l2 ) Rot z (−90° + q2 )
l4
1 0 0 l2   s2 c2 0 0
l1
0 z0
 1 0 0  
 −c2 s2 0 0 
0 0 1 0  0 0 1 0
    y0
0 0 0 1  0 0 0 1 x0

 s2 c2 0 l2 
 −c s2 0 0 
1
T2 =  2 Arbitrarily assign
 0 0 1 0
  frames
 0 0 0 1

In this case (as in general) the product is not commutative


Forward Kinematics: Geometric Method

3D Example: SCARA Robot q2 q3

3. Take {2} to {3} q1 l3 q4


l2 z2 y2
Translate {2} a distance l3 along x2 to get to {3}
1 0 0 l3  z1 z3 y3
y1 x1 x2
0 1 0 0 
2
T3 = Trx (l3 ) =
0 0 1 0
x3
 
0 0 0 1
z4 x4 l4
y4
4. Take {3} to {4} l1
z0
- Translate {3} a distance (-l4+q3) along z3
- Then, rotate (90°+q4) about z to get to {4} y0
x0

 − s4 −c4 0 0 
c Arbitrarily assign
3 − s4 0 0  frames
T
=4 Trz (−l4 + q3 ) Rot z (90° + q4 ) = 4
 0 0 1 q3 − l4 
 
 0 0 0 1 
Forward Kinematics: Geometric Method

3D Example: SCARA Robot q2 q3

5. Multiply: take {0} to {4} q1 l3 q4


l2 z2 y2
Write the end effector {4} in terms of the base
{0} → multiply the kinematic chain z1
x1 x2
z3 y3
y1
0
T4 = ( 0 T1 )( 1T2 )( 2 T3 )( 3 T4 ) x3

 −c1 s1 0 0   s2 c2 0 l2   1 0 0 l3   − s4 −c4 0 0 
−s −c1 0 0   −c2 s2 0 0  0 1 0 0   c4 − s4 0 0  z4 x4 l4
0
T4 =  1 y4
 0

0 1 l1   0

0 1 0  0 0 1

0  0

0 1 q3 − l4 
 l1
 0 0 0 1  0 0 0 1  0 0 0 1  0 0 0 1  z0

 −c124 s124 0 −l3 s12 − l2 c1  x0


y0
−s −c124 0 l3c12 − l2 s1 
0
T4 =  124
 0 0 1 l1 − l4 + q3 
 
 0 0 0 1 
Forward kinematics using arbitrary
reference frames
Forward Kinematics: Geometric Method

3D Example: SCARA Robot q2 q3


Optional: q1 l3 q4
l2 z2 y2
The end effector convention can be used (axis n = x,
o = y, a = z) for frame {e} z1 z3 y3
y1 x1 x2
- Rotate {4} 180° about x4 x3
1 0 0 0  1 0 0 0
0 cos(180°) − sin(180°) 0  0 −1 0 0 
4
Te =  = z4
0 sin(180°) cos(180°) 0  0 0 −1 0 x4 l4
    y4
0 0 0 1  0 0 0 1 l1
z0

- Forward kinematics: y0 xe
0
Te = ( T4 )( Te )
0 4 x0
ye

ze
 −c124 − s124 0 −l3 s12 − l2 c1 
−s c124 0 l3c12 − l2 s1 
0
Te =  124
 0 0 −1 l1 − l4 + q3 
  Verify the result when the joint
 0 0 0 1  configuration is null (zeros)
Outline

1. Introduction

2. Geometric method

3. Denavit-Hartenberg (DH) convention

4. Modified Denavit – Hartenberg (DH)

5. Examples of Denavit-Hartenberg

- Forward Kinematics of Robot Manipulators -


Denavit-Hartenberg Convention

Introduction
• Notation: Denavit - Hartenberg = DH
• It describes forward kinematics using 4 parameter for each joint: θi, di, ai, αi
• Example:
y3 x3
Artic. i di θi ai αi
z3 1 450 180+q1 -150 90
x2
2 0 90+q2 600 0
y5 x4
z5 y4 3 0 180+q3 -200 90
y2 z2
x5 z4
4 640 180+q4 0 90
5 0 180+q5 0 90
z6 y6
6 0 q6 0 0
x6
x1 z1
y1 z0
Fanuc M-10iA

x0 y0
Denavit-Hartenberg Convention

Introduction
I. It is a systematic (and classical) method used to describe forward kinematics of manipulators
II. Procedure
1. Determine 1 frame per joint (based on some rules)
2. Determine 4 parameters (θi, di, ai, αi) that describe the pose between every two reference frames
(based on rules)
3. Using the 4 parameters (per joint) compute the homogeneous transformation matrices
→ Determine the pose of the end effector with respect to the base (product of the homogeneous
transformation matrices)
III. There are 2 conventions
Standard DH: it is the most used convention.
Modified DH: less common (introduced by J.J. Craig*)

*J.J. Craig. Introduction to Robotics: Mechanics and Control. 1st edition (1986)
Denavit-Hartenberg Convention

(1) Assigning a Reference Frame

1. Number joint axes: 1 to n (from the base to the end effector) showing the axis of motion for each joint

2. Base reference frame: assign frame {0} to the base, with axis z0 along the axis of motion of joint 1
(arbitrary origin)

3. Axis zi: align zi with the axis of motion of joint i+1

4. Origin of frame {i}: find the origin of frame {i} at the intersection of zi & zi-1, or at the intersection of zi
with the common normal between zi & zi-1

5. Axis xi: assign xi in the direction of zi-1 x zi. If they are parallel, assign xi along the common normal
between zi-1 & zi

6. Axis yi: assign yi to complete the frame (following the right hand rule)

7. End effector frame {n}: xn must be orthogonal to zn-1 and it must intersect it
Denavit-Hartenberg Convention

(1) Assigning a Reference Frame

1. Number joint axes: 1 to n (from the base to the end effector) showing the axis of motion for each
joint

Joint 2 Joint
Joint
(q2) i+1 (qi+1)
n (qn)

Joint 1
(q1)

Joint
Link 0 i (qi) End
(base) effector
Denavit-Hartenberg Convention

(1) Assigning a Reference Frame

1. Number joint axes: 1 to n (from the base to the end effector) showing the axis of motion for each
joint

2. Base reference frame: assign frame {0} to the base, with axis z0 along the axis of motion of joint 1
(arbitrary origin)
→ Axis x0 is arbitrary, and axis y0 completes the frame (right-hand rule)
q3
z0 q2
q1 y0

x0
Denavit-Hartenberg Convention

(1) Assigning a Reference Frame

1. Axis zi: align zi with the axis of motion of joint i+1

2. Origin of frame {i}:


a) At the intersection of zi & zi-1, or
b) At the intersection of zi with the common normal between zi & zi-1
→ If zi & zi-1 are parallel, arbitrarily chose any normal q 3
z0 q2 z2
q1 y0 z1

x0
Denavit-Hartenberg Convention

(1) Assigning a Reference Frame

1. Axis xi: assign xi in the direction of zi-1 x zi. If (zi-1 & zi) are parallel, assign xi along the common
normal between zi-1 & zi

2. Axis yi: assign yi to complete the frame (following the right hand rule)

q3
z0 q2
q1 y0 y2
z1 y1
z2
x0 x1 x2

Note: actually, xi can be assigned in the direction of ±(zi-1 x zi).


Denavit-Hartenberg Convention

(1) Assigning a Reference Frame


1. End effector frame {n}:
xn must be orthogonal to zn-1 and it must intersect it (the origin of the frame is usually at the end of
the kinematic chain)
Usually zn goes in the same direction as zn-1 pointing outwards
yn completes the frame (right hand rule)

q3 z3
z0 q2 x3
q1 y0 y2
z1 y1
z2 y3

x0 x1 x2 n=3
Denavit-Hartenberg Convention

(2) Assigning the DH Parameters

Joint Parameters

1. Joint angle (θi): rotation angle from axis xi-1 to axis xi about axis zi-1
→ It is the joint variable if the i-th joint is revolute

2. Joint displacement (di): distance from the origin of frame {i-1} to the intersection of axis zi-1 to axis
xi along axis zi-1
→ It is the joint variable if the i-th joint is prismatic

Link Parameters (constants)

1. Link length (ai): distance from the intersection of axis zi-1 and axis zi to the origin of frame {i} along
axis xi

2. Link rotation angle (αi): rotation angle from axis zi-1 to axis zi about axis xi
Denavit-Hartenberg Convention

(2) Assigning the DH Parameters

joint joint
qi-1 qi joint
qi+1

zi
zi-1
xi-1 xi

Joint parameters
• di: distance from the origin of {i-1} to the [intersection of zi-1 with xi] along zi-1
• θi: rotation angle from xi-1 to xi about zi-1

Note: di, θi have sign (they can be + or -)


Denavit-Hartenberg Convention

(2) Assigning the DH Parameters

joint joint
qi-1 qi joint
qi+1

Angle between joint


axis
zi
zi-1
xi-1 xi

Link parameters
• ai: distance from [the intersection of zi-1 with xi] to the origin of {i} along xi
• αi: angle from zi-1 to zi about xi

Note: ai, αi have sign (they can be + or -)


Denavit-Hartenberg Convention

(2) Assigning the DH Parameters

joint joint
qi-1 qi joint
qi+1

zi
zi-1
xi-1 xi

Summary
• di: distance from the origin of {i-1} to the [intersection of zi-1 with xi] along zi-1
• θi: rotation angle from xi-1 to xi about zi-1
• ai: distance from [the intersection of zi-1 with xi] to the origin of {i} along xi
• αi: angle from zi-1 to zi about xi
Denavit-Hartenberg Convention

(2) Assigning the DH Parameters


Example q3 z3
z0 q2 x3
q1 y0 y2
z1 y1
z2 y3

x0 x1 x2
l1 l2
Joint i di θi ai αi
1 0 q1 l1 0
2 0 180+q2 -l2 90
3 l3 180+q3 0 0

di: distance from the origin of {i-1} to [the intersection of zi-1 to xi] along zi-1
θi: rotation angle from xi-1 to xi about zi-1
ai: distance from [the intersection of zi-1 with xi] to the origin of {i} along xi
αi: angle from zi-1 to zi about xi|
Denavit-Hartenberg Convention

(2) Assigning the DH Parameters


Example q3 z3
z0 q2 x3
q1 y0 y2
z1 y1
z2 y3

x0 x1 x2
l1 l2

Note:
Joint i di θi ai αi Joint i di θi ai αi Home
1 0 q1 l1 0 Sometimes 1 0 q1 l1 0 0
2 0 180+q2 -l2 90 written as 2 0 q2 -l2 90 180
3 l3 180+q3 0 0 3 l3 q3 0 0 180

Sometimes the “home” is omitted


Denavit-Hartenberg Convention

(3) Homogeneous Transformation


Objective: take frame {i-1} to frame {i}
qi+1
1. First take {i-1} to {G} qi
zg
{G} xg zi
zi-1
xi-1 xi
{i}
{i-1}

- Rotate an angle θi about zi-1


- Translate a distance di along zi-1
cos θi − sin θi 0 0
 sin θ cos θi 0 0  It varies according
i −1
TG (θi , di ) = Rot zi−1 (θi ) Trzi−1 (di ) =  i
to the joint value
 0 0 1 di  (θi, di)
 
 0 0 0 1
Note: if first there is a translation and then a rotation, the result is the same (Why?)
Denavit-Hartenberg Convention

(3) Homogeneous Transformation


Objective: take frame {i-1} to frame {i}
qi+1
2.Then take {G} to {i} qi
zg
{G} xg zi
zi-1
xi-1 xi
{i}
{i-1}

- Translate a distance ai along xi


- Rotate an angle αi about xi

1 0 0 ai 
0 cos α − sin α i 0  Always
G
Ti (α i , ai ) = Trxi (ai ) Rot xi (α i ) =  i
constant
0 sin α i cos α i 0
 
0 0 0 1
Nota: if first there is a translation, and then a rotation, the result is the same
Denavit-Hartenberg Convention

(3) Homogeneous Transformation


Objective: take frame {i-1} to frame {i} i −1
Ti = ( i −1TG )( G Ti )

cos θi − sin θi 0 0  1 0 0 ai 
 sin θ cos θi 0 0  0 cos α i − sin α i 0 
i −1
Ti (θi , di , α i , ai ) =  i

 0 0 1 di  0 sin α i cos α i 0
  
 0 0 0 1  0 0 0 1

cos θi − cos α i sin θi sin α i sin θi ai cos θi 


 sin θ cos α i cos θi − sin α i cos θi ai sin θi 
i −1
Ti (θi , di , α i , ai ) =  i

 0 sin α i cos α i di 
 
 0 0 0 1 

DH Homogeneous transformation matrix for the adjacent


reference frames {i-1} and {i}
Denavit-Hartenberg Convention
(3) Homogeneous Transformation

Final result:
End effector with respect to the base
Using the product of homogeneous transformations
0
Tn = ( 0 T1 )( 1T2 ) ( n − 2 Tn −1 )( n −1Tn )
Denavit-Hartenberg Convention
(3) Homogeneous Transformation
Example z3
q3
z0 x3
q2 y2
q1 y0 z1 y1
Artic. i di θi ai αi z2 y3
1 0 q1 l1 0 x0 x1 x2
l1 l2
2 0 180+q2 -l2 90
3 l3 180+q3 0 0

cos q1 − sin q1 0 l1 cos q1 


 sin q cos q1 0 l1 sin q1 
0
T1 =  1

 0 0 1 0 
 
 0 0 0 1 

cos (180° + q2 ) 0 sin (180° + q2 ) −l2 cos (180° + q2 )   − cos q2 0 − sin q2 l2 cos q2 
  
sin (180° + q2 ) 0 − cos (180° + q2 ) −l2 sin (180° + q2 )   − sin q2 0 cos q2 l2 sin q2 
1
T2 =  =
 0 1 0 0   0 1 0 0 
   
 0 0 0 1   0 0 0 1 
Denavit-Hartenberg Convention
(3) Homogeneous Transformation

Example q3
z3

z0 x3
q2 y2
q1 y0 z1 y1
Artic. i di θi ai αi z2 y3
1 0 q1 l1 0 x0 x1 x2
l1 l2
2 0 180+q2 -l2 90
3 l3 180+q3 0 0

cos (180° + q3 ) − sin (180° + q3 ) 0 0   − cos q3 sin q3 0 0


  
sin (180° + q3 ) cos (180° + q3 ) 0 0   − sin q3 − cos q3 0 0 
2
T3 =  =
 0 0 1 l3   0 0 1 l3 
   
 0 0 0 1  0 0 0 1

c12 c3 −c12 s3 − s12 l2 c12 − l3 s12 + l1c1 


c1 = cos(q1)
s c − s12 s3 c12 l3c12 + l2 s12 + l1s1  s1 = sin(q1)
0
T3 = ( 0 T1 )( 1T2 )( 2 T3 ) =  12 3
 − s3 −c3 0 0  c12 = cos(q1+q2)
  s12 = sin(q1+q2)
 0 0 0 1 
Denavit-Hartenberg Convention
(3) Homogeneous Transformation

Example q3
z3

z0 x3
q2 y2
q1 y0 z1 y1
Artic. i di θi ai αi z2 y3
1 0 q1 l1 0 x0 x1 x2
l1 l2
2 0 180+q2 -l2 90
3 l3 180+q3 0 0

Initial position (shown in the figure):


- All joint variables are zero (q1 = 0, q2 = 0, q3 = 0)

1 0 0 l1   −1 0 0 l2   −1 0 0 0 1 0 0 l2 + l1 
0 1 0 0  0 0 1 0   0 −1 0 0  0 0 1 l3 
0
T1 =  1
T2 =  2
T3 =  0
T3 = 
0 0 1 0 0 1 0 0 0 0 1 l3  0 −1 0 0 
       
0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1 

Verify with the figure, giving “interpretations” to the homogeneous transformations


Denavit-Hartenberg Convention
Illustration

https://youtu.be/rA9tm0gTln8
Note: the video uses r instead of a and no sub indices are added
Exercise

1. Assign frames.
l3 2. Specify the parameters of the DH table.
3. Determine homogenous transformation
matrices, 0T1, 1T2, 2T3, 0T3.
4. Specify the orientations and position of the
q3 end-effector with respect to
l2
q1 q2 q3
0 0 0
l1 90o 0 0
q1 q2
0 90o 0
0 0 90o

54
Code MATLAB
cos θi − cos α i sin θi sin α i sin θi ai cos θi 
 sin θ cos α i cos θi − sin α i cos θi ai sin θi 
i −1
Ti (θi , di , α i , ai ) =  i

 0 sin α i cos α i di 
 
 0 0 0 1 

function T = standardDH(d,theta,a, anpha)


T=[cos(theta),-cos(anpha)*sin(theta),sin(anpha)*sin(theta),a*cos(theta);...
sin(theta),cos(anpha)*cos(theta),-sin(anpha)*cos(theta),a*sin(theta);...
0, sin(anpha), cos(anpha),d;...
0,0,0,1];
end

55
Code MATLAB

syms q1 q2 q3 l1 l2 l3
T01=standardDH(0,q1,l1,0)
T12=standardDH(0,q2,l2,0)
T23=standardDH(0,q3,l3,0)
T02=T01*T12
simplify(T02)
T03=simplify(T01*T12*T23)

56
Exercise
1. Assign frames.
2. Specify the parameters of the DH table.
3. Determine homogenous transformation
matrices, 0T1, 1T2, 2T3, 0T3.
4. Specify the orientations and position of the
q2 l2 q3 end-effector with respect to
The figure presents the initial pose of the robot,
which means that q1=0, q2=0, q3=0
l1
q1 q2 q3
q1
0 0 0
90o 0 0
0 90o 0
0 0 90o
57
Code MATLAB

syms q1 q2 q3 l1 l2 l3
T01=standardDH(0,pi/2+q1,l1,0)
T12=standardDH(0,-pi/2+q2,l2,0)
T23=standardDH(0,q3,l3,0)
T02=T01*T12
simplify(T02)
T03=simplify(T01*T12*T23)

58
MATLAB Code

function T = DHConvention(d, theta, a, alpha)


T= [cos(theta), -cos(alpha)*sin(theta), sin(alpha)*sin(theta), a*cos(theta);...
sin(theta),cos(alpha)*cos(theta),-sin(alpha)*cos(theta),a*sin(theta);...
0,sin(alpha),cos(alpha),d;...
0,0,0,1];
End

syms q1 q2 q3 l1 l2 l3
T01=DHConvention(0,pi/2+q1,l1,0)
T12=DHConvention(0,-pi/2+q2,l2,0)
T23=DHConvention(0,q3,l3,0)
T03=simplify(T01*T12*T23)

59
Outline

1. Introduction

2. Geometric method

3. Denavit-Hartenberg (DH) convention

4. Modified Denavit – Hartenberg (DH)

5. Examples of Denavit-Hartenberg

- Forward Kinematics of Robot Manipulators -


Modified Denavit – Hartenberg
(D-H).
(Modified DH*)
1. Introduced by J.J. Craig (Introduction to Robotics, Mechanics and Control)
2. Main characteristics:
Sometimes it creates confusion (when it is used without explicitly stating it)
It uses axis zi at the i-th joint
ai, αi: relate zi and zi+1 along xi
di, θi: relate xi-1 to xi along axis zi
cθi −cαi sθi sαi sθi ai cθi 
  Frames at the end
i −1  sθ cαi cθi − sαi cθi ai sθi  of the link
Standard: Ti =  i
0 sαi cαi di 
 
 0 0 0 1 

 cθi − sθi 0 ai −1 
 
i −1 cα sθ cαi−1 cθi − sαi−1 −di sαi−1 
Modified: Ti =  i−1 i Frames at the
s s sαi−1 cθi cαi−1 di cαi−1  beginning of the
 αi−1 θi 
 0 0 0 1  link

*Only for reference


Modified Denavit – Hartenberg (D-H).

The link and joint parameters:


• Twist angle, 𝛼𝛼𝑖𝑖−1 is the angle between 𝑧𝑧𝑖𝑖−1 to 𝑧𝑧𝑖𝑖 measured about 𝑥𝑥𝑖𝑖−1
• Link length, 𝑎𝑎𝑖𝑖−1 is the distance from z𝑖𝑖−1 to 𝑧𝑧𝑖𝑖 measured along 𝑥𝑥𝑖𝑖−1
• Offset length, 𝑑𝑑𝑖𝑖 is the distance from 𝑥𝑥𝑖𝑖−1 to 𝑥𝑥𝑖𝑖 measured along 𝑧𝑧𝑖𝑖
• Joint angle, 𝜃𝜃𝑖𝑖 is the angle between 𝑥𝑥𝑖𝑖−1 to 𝑥𝑥𝑖𝑖 measured about 𝑧𝑧𝑖𝑖

62
Modified Denavit – Hartenberg (D-H).

The frame transformation i-1Ti describing the finite


motion from link i -1 to link i may then be expressed
as the following sequence of elementary
transformations, starting from link (i – 1):
1. A rotation 𝛼𝛼𝑖𝑖−1 about 𝑥𝑥𝑖𝑖−1 ;
2. A translation 𝑎𝑎𝑖𝑖−1 along the 𝑥𝑥𝑖𝑖−1 axis;
3. A rotation 𝜃𝜃𝑖𝑖 about 𝑧𝑧𝑖𝑖 ;
4. A translation 𝑑𝑑𝑖𝑖 along the same axis 𝑧𝑧𝑖𝑖 ;

63
Modified Denavit – Hartenberg (D-H).

The homogeneous transformation i-1T


i is represented as a product of four basic
transformations as follows:
i-1T =𝑅𝑅 𝑥𝑥𝑖𝑖−1 , 𝛼𝛼𝑖𝑖−1 𝑇𝑇 𝑥𝑥𝑖𝑖−1 , , 𝛼𝛼𝑖𝑖−1 𝑅𝑅 𝑧𝑧𝑖𝑖 , 𝜃𝜃𝑖𝑖 𝑇𝑇 𝑧𝑧𝑖𝑖 , 𝑑𝑑𝑖𝑖
i

1 0 0 0  1 0 0 ai −1  cθi − sθi 0 0  1 0 0 0
0 c 0  0  
− sαi−1 1 0 0   sθi cθi 0 0  0 1 0 0 
=
α i −1

0 sα cαi−1 0  0 0 1 0  0 0 0 0 0 0 1 di 
 i −1
   
0 0 0 1  0 0 0 1   0 0 0 1  0 0 0 1

 cθi − sθi 0 ai −1 
 
i −1 cαi−1 sθi cαi−1 cθi − sαi−1 −di sαi−1 
Ti = 
s s sαi−1 cθi cαi−1 di cαi−1 
 αi−1 θi 
 0 0 0 1 

64
Modified Denavit – Hartenberg (D-H).

Step - 1: Assigning of base frame: the base frame {0} is assigned to link 0. The base frame {0} is arbitrary. For
simplicity choose z0 along z1 axis when the first joint variable is zero. Using this convention, we have a0 = 0 and
α0 = 0. This also ensures that d1 = 0 if the joint is revolute and θ1 = 0 if the joint is prismatic.
Step - 2: Identify links. The link frames are named by number according to the link to which they are attached (i.e.
frame {i} is attached rigidly to link i).
Identify joints. The z-axis of frame {i}, called zi, is coincident with the joint axis i. The link i has two joint axes, zi
and zi+1 . The zi axis is assigned to joint i and zi+1 is assigned to joint (i+1).
For i = 1,….., n perform steps 3 to 6.
Step – 3: Identify the common normal between zi and zi+1 axes, or point of intersection. The origin of frame {i} is
located where the common normal ( ai ) meets the zi axis.
Step – 4: Assign the zi axis pointing along the ith joint axis.
Step – 5: Assign xi axis pointing along the common normal ( ai ) in the direction from zi axis to zi+1 axis. In the
case of ai = 0, xi is normal to the plane of zi and zi+1 axes.
Step – 6: The yi axis is selected to complete right-hand coordinate system.

65
Modified Denavit – Hartenberg (D-H).

Step – 7: Assigning of end-effector frame: If the joint n is revolute, the direction of xn is chosen along the direction
of xn−1 when θn = 0 and the origin of frame {n} is chosen so that dn = 0. If the joint n is prismatic, the direction of xn
is chosen so that θn = 0 and the origin of frame {n} is chosen at the intersection of xn-1 with zn so that dn = 0.
Step – 8: The link parameters are determined as mentioned in table 4.

Step - 9: Form 0Tn=0T12T3…n-1Tn. This gives the position and orientation of the end-effector frame expressed in
the base coordinates.

66
Modified Denavit – Hartenberg (D-H).

67
Modified Denavit – Hartenberg
(D-H).
1. Attach the frames to the manipulator.
2. Determine the Denavit – Hartenberg parameters.
3. Compute the individual transformations for each link.
4. Find the transformation between the frame {N} and frame {0}
Modified Denavit – Hartenberg
(D-H).
• 3- DOF manipulator • Summary of link-frame attachment procedure

X4(EE) 1. Identify the joint axes and imagine infinite lines


Z4(EE) along them.
θ3
2. Identify the common perpendicular between
X3 them.
Z3 3. Assign the 𝑍𝑍𝑖𝑖 axis pointing along ith joint axis.
Y4(EE)
Y3
θ2 4. Assign the 𝑋𝑋𝑖𝑖 axis pointing along the common
L2 X2 perpendicular.
Y2
Y0 5. Assign the 𝑌𝑌𝑖𝑖 axis to complete a right-hand
Z2 coordinate system.
θ1 Y1 X1 6. Assign {0} to match {1} when the first joint
variable is zero.
X0
Z0 Z1
7. For {N}, choose 𝑋𝑋𝑁𝑁 direction freely.
Modified Denavit – Hartenberg
(D-H).
• 3- DOF manipulator • Determine the Denavit – Hartenberg parameters.

X4(EE)
𝑖𝑖 𝜶𝜶𝒊𝒊−𝟏𝟏 𝒂𝒂𝒊𝒊−𝟏𝟏 𝒅𝒅𝑖𝑖 𝜽𝜽𝒊𝒊
Z4(EE)
1 0 0 0 𝜽𝜽𝟏𝟏
θ3
X3 2 0 𝐿𝐿1 0 𝜽𝜽𝟐𝟐

Y4(EE)
Z3 3 0 𝐿𝐿2 0 𝜽𝜽𝟑𝟑
Y3 4(EE) 0 L3 0 0
θ2
L2 Y2
X2 Where:
Y0
Z2 𝛼𝛼𝑖𝑖−1 = the angle from 𝑍𝑍𝑖𝑖−1 to 𝑍𝑍𝑖𝑖 measured along 𝑋𝑋𝑖𝑖−1
Y1 X1 𝑎𝑎𝑖𝑖−1 = the distance from 𝑍𝑍𝑖𝑖−1 to 𝑍𝑍𝑖𝑖 measured along 𝑋𝑋𝑖𝑖−1 .
θ1
X0 𝑑𝑑𝑖𝑖 = the distance from 𝑋𝑋𝑖𝑖−1 to 𝑋𝑋𝑖𝑖 measured along 𝑍𝑍𝑖𝑖 .
Z0 Z1
𝜃𝜃𝑖𝑖 = the angle from 𝑋𝑋𝑖𝑖−1 to 𝑋𝑋𝑖𝑖 measured about 𝑍𝑍𝑖𝑖
Modified Denavit – Hartenberg
(D-H).
• Determine the Denavit – Hartenberg parameters. • Compute the individual transformations for each link.
𝑐𝑐𝜃𝜃1 −𝑠𝑠𝜃𝜃1 0 0
𝑖𝑖 𝜶𝜶𝒊𝒊−𝟏𝟏 𝒂𝒂𝒊𝒊−𝟏𝟏 𝒅𝒅𝑖𝑖 𝜽𝜽𝒊𝒊 0𝑇𝑇 = 𝑠𝑠𝜃𝜃1 𝑐𝑐𝜃𝜃1 0 0
1
0 0 1 0
1 0 0 0 𝜽𝜽𝟏𝟏 0 0 0 1
2 0 𝐿𝐿1 0 𝜽𝜽𝟐𝟐 𝑐𝑐𝜃𝜃2 −𝑠𝑠𝜃𝜃2 0 𝐿𝐿1
𝑠𝑠𝜃𝜃2 𝑐𝑐𝜃𝜃2 0 0
2𝑇𝑇 =
1
3 0 𝐿𝐿2 0 𝜽𝜽𝟑𝟑 0 0 1 0
0 0 0 1
4(EE) 0 L3 0 0
𝑐𝑐𝜃𝜃3 −𝑠𝑠𝜃𝜃3 0 𝐿𝐿2
The general form of the individual transformation: 𝑠𝑠𝜃𝜃3 𝑐𝑐𝜃𝜃3 0 0
3𝑇𝑇 =
2
0 0 1 0
0 0 0 1
1 0 0 𝐿𝐿3
0 0 0 0
4𝑇𝑇 =
3
0 0 1 0
0 0 0 1
Code MATLAB

syms q1 q2 q3 l1 l2 l3
T01=standardDH(0,pi/2+q1,l1,0)
T12=standardDH(0,-pi/2+q2,l2,0)
T23=standardDH(0,q3,l3,0)
T02=T01*T12
simplify(T02)
T03=simplify(T01*T12*T23)

72
Modified Denavit – Hartenberg
(D-H).
Find the transformation between the frame {4} and frame {0}
0 0 1 2 3
4𝑇𝑇 = 1𝑇𝑇 2𝑇𝑇 3𝑇𝑇 4𝑇𝑇

𝑐𝑐𝜃𝜃1 −𝑠𝑠𝜃𝜃1 0 0 𝑐𝑐𝜃𝜃2 −𝑠𝑠𝜃𝜃2 0 𝐿𝐿1 𝑐𝑐𝜃𝜃3 −𝑠𝑠𝜃𝜃3 0 𝐿𝐿2 1 0 0 𝐿𝐿3


0
𝑇𝑇 =
𝑠𝑠𝜃𝜃1 𝑐𝑐𝜃𝜃1 0 0 𝑠𝑠𝜃𝜃2 𝑐𝑐𝜃𝜃2 0 0 𝑠𝑠𝜃𝜃3 𝑐𝑐𝜃𝜃3 0 0 0 0 0 0
4
0 0 1 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 0 0 0 1

𝑐𝑐𝜃𝜃123 −𝑠𝑠𝜃𝜃123 0 𝐿𝐿3 𝑐𝑐𝜃𝜃123 + 𝐿𝐿2 𝑐𝑐𝜃𝜃12 + 𝐿𝐿1 𝑐𝑐𝜃𝜃1


0 𝑠𝑠𝜃𝜃123 𝑐𝑐𝜃𝜃123 0 𝐿𝐿3 𝑠𝑠𝜃𝜃123 + 𝐿𝐿2 𝑠𝑠𝜃𝜃12 + 𝐿𝐿1 𝑠𝑠𝜃𝜃1
4𝑇𝑇 =
0 0 1 0
0 0 0 1
Outline

1. Introduction

2. Geometric method

3. Denavit-Hartenberg (DH) convention

4. Modified Denavit – Hartenberg (DH)

5. Examples of Denavit-Hartenberg

- Forward Kinematics of Robot Manipulators -


Example 1: DH of a SCARA Robot

Reference frames q3
q2
q1 q4
l2 l3

• Number joint axis


• Base reference frame: z0 along the axis
of joint 1 (arbitrary origin, arbitrary x0)

l4
l1
z0

y0
x0
Example 1: DH of a SCARA Robot

Reference frames q3
q2
q1 q4
l2 l3
z1 x1 • Axis zi: zi along the axis of joint i+1
y1
z2 y2 • Origin of frame {i}:
a) Intersection of zi & zi-1, or
x2 b) Intersection of zi with normal between zi & zi-1
(If zi & zi-1 parallel: arbitrary normal)
z3
y3 l4
• Axis xi: in the direction of zi-1 x zi. If (zi-1 & zi)
l1
z0 are parallel, xi along their common normal
x3
• Axis yi: assign yi to complete the frame
y0
x0 (using the right hand rule)
Example 1: DH of a SCARA Robot

Reference frames q3
q2
q1 q4
l2 l3
z1 x1
y1
• End effector frame {n}:
z2 y2 - xn orthogonal to zn-1, intersecting it (origin at
the end of the chain)
x2
- zn in the direction of zn-1 pointing outwards
- yn completes the frame
z3
y3 l4
l1
z0 x3

y0 x4
x0
y4
z4
Example 1: DH of a SCARA Robot

2. DH parameters q3
q2
q1 q4
l2 l3 Joint i di θi ai αi
z1 x1 1 l1 180+q1 l2 0
y1
z2 2 0 -90+q2 l3 0
y2
3 -l4+q3 0 0 0
x2 4 0 90+q4 0 180

z3
y3 l4
l1
z0 x3 di: distance from {i-1} to [intersection of zi-1
with xi] along zi-1
y0 x4 θi: angle from xi-1 to xi alrededor de zi-1
x0
y4 ai: distance from [intersection of zi-1 wtih xi] to
z4 {i} along xi
αi: angle from zi-1 to zi about xi
Example 1: DH of a SCARA Robot

3. Homogeneous Transformation Matrices


Joint i di θi ai αi
1 l1 180+q1 l2 0
2 0 -90+q2 l3 0
3 -l4+q3 0 0 0
4 0 90+q4 0 180

 − cos q1 sin q1 0 −l2 cos q1  1 0 0 0 


 − sin q − cos q1 0 −l2 sin q1  0 1 0 0 
0
T1 (q1 ) =  1 2
T3 (q3 ) = 
 0 0 1 l1  0 0 1 q3 − l4 
   
 0 0 0 1  0 0 0 1 

 sin q2 cos q2 0 l3 sin q2   − sin q4 cos q4 0 0


 − cos q sin q2 0 −l3 cos q2   cos q sin q4 0 0 
1
T2 (q2 ) =  2 3
T4 (q4 ) =  4
'
 0 0 1 0   0 0 −1 0
   
 0 0 0 1   0 0 0 1
Example 1: DH of a SCARA Robot

3. Homogeneous Transformation Matrices


- End effector with respect to the base:

0
T4 = ( 0 T1 )( 1T2 )( 2 T3 )( 3 T4 ) l2 l3

 −c124 − s124 0 −l3 s12 − l2 c1 


−s c124 0 l3c12 − l2 s1 
=  124 '
 0 0 −1 l1 − l4 + q3 
 
 0 0 0 1  l4
l1
z0
- For the initial configuration (q1 = q2 = q3 = q4 = 0):
y0 x4
x0
 −1 0 0 −l2  y4
0 1 0 l3  z4
0
T4 =  '
0 0 −1 l1 − l4  Robot in the initial configuration
 
0 0 0 1 

Verify by inspection, in the diagram Compare with the result obtained


using the geometric method
Example 1: DH of a SCARA Robot

Note: Alternative representation of the DH parameters


Using a home position

Joint i di θi ai αi Joint i di θi ai αi Home

1 l1 180+q1 l2 0 1 l1 q1 l2 0 180°
2 0 -90+q2 l3 0 2 0 q2 l3 0 -90°
3 -l4+q3 0 0 0 3 q3 0 0 0 -l4
4 0 90+q4 0 180 4 0 q4 0 180 90°

The resulting homogeneous The resulting homogeneous


transformation contains the initial transformation does not contain the
configuration (shown in the figure) for the initial configuration (shown in the figure)
zeroed joints for the zeroed joints

Joints with the “home” value must be


used to obtain the configuration shown
in the figure
Example 1: DH of a SCARA Robot

Note: Alternative representation of the DH parameters


Using a home position

Joint i di θi ai αi Joint i di θi ai αi Home

1 l1 180+q1 l2 0 1 l1 q1 l2 0 180°
2 0 -90+q2 l3 0 2 0 q2 l3 0 -90°
3 -l4+q3 0 0 0 3 q3 0 0 0 -l4
4 0 90+q4 0 180 4 0 q4 0 180 90°

The resulting homogeneous The resulting homogeneous


transformation contains the initial transformation does not contain the
configuration (shown in the figure) for the initial configuration (shown in the figure)
zeroed joints for the zeroed joints

Joints with the “home” value must be


used to obtain the configuration shown
in the figure
Example 1: DH of a SCARA Robot

Reference frames q3
q2
q1 q4
l2 l3

• Number joint axis


• Base reference frame: z0 along the axis
of joint 1 (arbitrary origin, arbitrary x0)

l4
l1
z0

y0
x0
Example 1: DH of a SCARA Robot

Reference frames (Modified DH Method)


q 3
q2
q1 q4
l2 l3
z2 y2 • Axis zi: zi along the axis of joint i
z1 x1 x2 z3 • Origin of frame {i}:
y3
y1 a) Intersection of zi & zi-1, or
b) Intersection of zi with normal between zi & zi-1
x3 (If zi & zi-1 parallel: arbitrary normal)
z4 x4 l 4
• Axis xi: in the direction of zi-1 x zi. If (zi-1 & zi)
l1 y4
z0 are parallel, xi along their common normal
• Axis yi: assign yi to complete the frame
y0
x0 (using the right hand rule)
Example 1: DH of a SCARA Robot

Reference frames q3
q2
q1 q4
l2 l3
z2 y2

z1 x2
• End effector frame {n}:
x1 z3
y3 - xn orthogonal to zn-1, intersecting it (origin at
y1
the end of the chain)
x3
- zn in the direction of zn-1 pointing outwards
- yn completes the frame
z4 x4 l 4
l1 y4
z0

y0
x0
Example 1: DH of a SCARA Robot

2. DH parameters q3
q2
q1 q4
l2 l3 Joint i di θi ai-1 αi-1
z2 y2 1 l1 180+q1 0 0
z1 x2 z3 2 0 -90+q2 l2 0
x1 y3
y1 3 0 0 l3 0
4 l4+q3 90+q4 0 0
x3

z4 x4 l 4
l1 y4 𝛼𝛼𝑖𝑖 : the angle from 𝑍𝑍𝑖𝑖 to 𝑍𝑍𝑖𝑖+1 measured along 𝑋𝑋𝑖𝑖
z0
𝑎𝑎𝑖𝑖 : the distance from 𝑍𝑍𝑖𝑖 to 𝑍𝑍𝑖𝑖+1 measured along 𝑋𝑋𝑖𝑖 .
𝑑𝑑𝑖𝑖 : the distance from 𝑋𝑋𝑖𝑖−1 to 𝑋𝑋𝑖𝑖 measured along 𝑍𝑍𝑖𝑖 .
y0 𝜃𝜃𝑖𝑖 : the angle from 𝑋𝑋𝑖𝑖−1 to 𝑋𝑋𝑖𝑖 measured about 𝑍𝑍𝑖𝑖
x0
Example 1: DH of a SCARA Robot

3. Homogeneous Transformation Matrices

Joint i di θi ai-1 αi-1


1 l1 180+q1 0 0
2 0 -90+q2 l2 0
3 0 0 l3 0
4 l4+q3 90+q4 0 0

 − cos q1 sin q1 0 0  1 0 0 l3 
 − sin q − cos q1 0 0  0 1 0 0 
0
T1 (q1 ) =  1 2
T3 (q3 ) = 
 0 0 1 l1  0 0 1 0
   
 0 0 0 1 0 0 0 1

 sin q2 cos q2 0 l2  cos q4 − sin q4 0 0 


 − cos q sin q2 0 0   sin q cos q4 0 0 
1
T2 (q2 ) =  2 3
T4 (q4 ) =  4

 0 0 1 0  0 0 1 q3 + l4 
   
 0 0 0 1  0 0 0 1 
Example 1: DH of a SCARA Robot

3. Homogeneous Transformation Matrices


- End effector with respect to the base: q3
q2
0
T4 = ( 0 T1 )( 1T2 )( 2 T3 )( 3 T4 ) q1
l2 l3 q4

 − s124 −c124 0 −l3 s12 − l2 c1 


c − s124 0 l3c12 − l2 s1 
=  124
 0 0 1 l1 + l4 + q3 
 
 0 0 0 1 
x4 l 4
l4
z4
l1 y4
- For the initial configuration (q1 = q2 = q3 = q4 = 0): z0

0 −1 0 −l2 
x0 y0
1 0 0 l3 
0
T4 = 
0 0 1 l1 + l4  Robot in the initial configuration
 
0 0 0 1 

Verify by inspection, in the diagram Compare with the result obtained


using the geometric method
Example 1: DH of a SCARA Robot

Verification using the Robotics Toolbox (of P. Corke) for MATLAB

l2 l3

l4
l1
z0

y0 x4
x0
y4
z4
Example 3:

• Set reference frames.


• Determine parameters in the DH table.
• Specify the homogenous transformation
matrix.
• Specify the end-effector position.

104
Example 3:

• DH Table
Joint i di θi ai αi x3 z3
1 0 θ1 L1 90 y3 x2
2 0 θ2 L2 0 y2
3 0 θ3 L3 0 z2
z0 y0 y1
cos θ1 0 sin θ1 L1 cos θ1  cos θ 2 − sin θ 2 0 L2 cos θ 2 
 sin θ 0 − cos θ1 L1 sin θ1  1  sin θ cos θ 2 0 L2 sin θ 2  x0
0
T1 (θ1 ) =  1
T2 (θ 2 ) =  2
 0 1 0 0   0 0 1 0 
z1 x1
   
 0 0 0 1   0 0 0 1 

cos θ3 − sin θ3 0 L3 cos θ3 


 sin θ cos θ3 0 L3 sin θ3 
2
T3 (θ3 ) =  3

 0 0 1 0 
 
 0 0 0 1 
105
Example 3:

• Homogeneous Transformation Matrices


- End effector with respect to the base: x3 z3
0
T4 = ( 0 T1 )( 1T2 )( 2 T3 ) y3 x2
y2
c123 − s123 0 L2 c12 + L1c1 
c z2
s123 0 L2 s12 + L1s1  z0
=  123 y0
 0 0 1 0  y1
 
 0 0 0 1  x0
z1 x1
- For the initial configuration (q1 = q2 = q3 = 0):
1 0 0 L1 + L2 
0 1 0 0 
0
T4 = 
0 0 1 0 
 
0 0 0 1 

106
Example 3:

• DH Table (Modified DH Method)


Joint i di θi ai-1 αi-1 x4 y4
1 0 θ1 0 0
2 0 θ2 L1 0 x3
y3
3 0 θ3 L2 0
4 0 0 0 0 z 0 z1
cos θ1 − sin θ1 0 0 cos θ 2 − sin θ 2 0 L1 
x2
 sin θ 0 0   sin θ 0 0  x1
0
T1 (θ1 ) =  1 cos θ1 1
T2 (θ 2 ) =  2 cos θ 2 y0
 0 0 1 0  0 0 1 0
   
 0 0 0 1  0 0 0 1 y1 x0 y2
cos θ3 − sin θ3 0 L2  1 0 0 0
 sin θ 0 0 
cos θ3 0 0  1 0
2
T3 (θ3 ) =  3 3
T4 (0) = 
 0 0 1 0 0 0 1 0
   
 0 0 0 1 0 0 0 1

107
Example 3:

• Homogeneous Transformation Matrices


- End effector with respect to the base: x4 y4
0
T4 = ( 0 T1 )( 1T2 )( 2 T3 )( 3 T4 )
x3
c123 − s123 0 L2 c12 + L1c1  y3
c s123 0 L2 s12 + L1s1 
=  123 z 0 z1
 0 0 1 0  x2
 
 0 0 0 1  y0 x1
- For the initial configuration (q1 = q2 = q3 = 0): y1 x0 y2
1 0 0 L1 + L2 
0 1 0 0 
0
T4 = 
0 0 1 0 
 
0 0 0 1 

108
Exercise 4

• Set reference frames.


• Determine parameters in the DH table.
• Specify the homogenous
transformation matrix.
• Specify the end-effector position.

109
Exercises

John J. Craig, Introduction to Robotics: Mechanics and Control (3rd Edition),


Chapter 3: Manipulator kinematics
• 3.1, 3.2, 3.3, 3.4, 3.8, 3.9
• MATLAB Exercise 3 (a,b,c)

110
References

• B. Siciliano, L. Sciavicco, L. Villani, y G. Oriolo. Robotics: modelling, planning and control. Springer
Science & Business Media, 2010 (Chapter 2.8-2.9)

• M.W. Spong, S. Hutchinson, y M. Vidyasagar. Robot Modeling and Control. John Wiley & Sons, 2006
(Chapter 3.1-3.2)

• J. J. Craig, Introduction to robotics: mechanics and control, 3rd ed. Upper Saddle River, N.J.:
Pearson/Prentice Hall, 2005.
Thank you for your listening

112

You might also like