Introduction to RoboticsIntroduction to Robotics
Tutorials 1-3
Technion, cs department, Introduction to Robotics 236927
Winter 2010-2011
1
Denavit-Hartenberg
• Specialized description of articulated
Reminder• Specialized description of articulated
figures
• Each joint has only one degree of
freedom
• rotate around its z-axis• rotate around its z-axis
• translate along its z-axis
http://www.cs.duke.edu/brd/Teaching/Bio/asmb/current/Papers/chap3-forward-kinematics.pdf
http://www.youtube.com/watch?v=rA9tm0gTln8 2
• Link offset di
• The distance between the origins of the coordinate
frames attached to jointi and jointi+1
•
Denavit-Hartenberg
• Measured along the axis of jointi
3
• Link rotation (joint angle) φi (In the movie - θ)
• The angle between the link lenghts αi-1 and αi
• Angle around zi-axis
Denavit-Hartenberg
•
4
Denavit-Hartenberg• Link length ai (In the movie - r)
• The perpendicular distance between the axes of
jointi and jointi+1
5
• Link twist αi
• The angle between the axes of jointi and jointi+1
• Angle around xi-axis
Denavit-Hartenberg
• Angle around xi-axis
6
Denavit-Hartenberg1.Compute the link vector ai and the link length
2.Attach coordinate frames to the joint axes
3.Compute the link twist αi
4.Compute the link offset di
5.Compute the joint angle φi
6.Compute the transformation (i-1)Ti which transforms entities from 6.Compute the transformation Ti which transforms entities from
linki to linki-1
- 2 Special Cases -
7
Denavit-Hartenberg
This transformation is done in several steps :This transformation is done in several steps :
• Rotate the link twist angle αi around the axis xi
•Translate the link length ai along the axis xi
•Translate the link offset di along the axis zi
( ) ( ) ( ) ( ) ( )ixixiziz
i
i iiiiRaTdTRT αϕ=−1
•Rotate the joint angle φi around the axis zi
8
Denavit-Hartenberg( ) ( ) ( ) ( ) ( )ixixiziz
i
i iiiiRaTdTRT αϕ=−1
( )
−
=
1000
0cossin0
0sincos0
0001
ii
ii
ixiR
αααα
α ( )
=
1000
0100
0010
001 i
ix
a
aTi
− ϕϕ
( )
=
1000
100
0010
0001
i
izd
dTi
( )
−
=
1000
0100
00cossin
00sincos
ii
ii
iziR
ϕϕϕϕ
ϕ
9
Denavit-Hartenberg( ) ( ) ( ) ( ) ( )ixixiziz
i
i iiiiRaTdTRT αϕ=−1
Multiplying the matrices :
( )
−
−
=− sinsincoscoscossin
cossinsincossincos
1 iiiiiii
iiiiiii
i
i
a
a
Tαα
ϕαϕαϕϕϕαϕαϕϕ
( ) ( ) ( ) ( )ixixizizi iiiiRaTdTRT αϕ=
In DH only φ and d are allowed to change.
=
1000
cossin0 iii
id
Tαα
10
End effector• End effector - the last coordinate system of figure
•• Located in joint N.
• But usually, we want to specify it in base
coordinates.
11
End effector
A transformation from the link N to the base :
12
End effector
• We can also express it as • We can also express it as
• three rotations (around each of the
coordinate axes)
• followed by a translation
• How can we establish a relation with
the other expression ?
13
End effector
• The origin of a coordinate frame relative • The origin of a coordinate frame relative
to some base coordinate frame is
specified by the translation :
14
End effector• Any 3D orientation relative to
some base coordinate frame
can be specified by :
three rotations, one around
each of the coordinate axes.
We do them in this order : around x, y, z. 15
End effector
16
End effector• Orientation
• The roll, pitch and yaw transformation is • The roll, pitch and yaw transformation is
then expressed :
17
End effector
• Finally, the transformation from a coordinate frame to • Finally, the transformation from a coordinate frame to
the base frame is expressed :
18
End effector
We obtain directly the translation vector :
19
End effector
We can obtain the yaw angle :
Because :
arctan is π-periodic. Let’s use our function
arctan2 to get the right angle.
20
End effector
Knowing the yaw angle, we can obtain
the pitch angle :
Because :
Again, let’s use our function arctan2 :
21
End effector
We can obtain the roll angle :
Because :
Again, let’s use our function arctan2 :
22
End effectorLet’s define the state vector
23
End effectorAs previously shown,
The state vector is composed of elements of this
matrix. It’s also a function of joint parameters :
24
DH Example - 3 revolute joints
Shown in home position
joint 1
Link 1 Link 3
Link 2
joint 1
R
joint 2 joint 3
L1 L2
25
Shown with joints in non-zero positions
DH Example - 3 revolute joints
Z0
Z2θ1
θ2 θ3
x0
x1
x2
z3
x3
Z1
θ1x0
Observe that frame i moves with link i
26
1.Compute the link vector ai and the link length
2. Attach coordinate frames to the joint axes
3.Compute the link twist αi
4.Compute the link offset di
5.Compute the joint angle φi
6.Compute the transformation (i-1)Ti
Link 2
joint 1
R
Link 1 Link 3
joint 2 joint 3
L1 L2 27
1.Compute the link vector ai and the link length
2. Attach coordinate frames to the joint axes
3.Compute the link twist αi
4.Compute the link offset di
5.Compute the joint angle φi
6.Compute the transformation (i-1)Ti
( )
−
−
=− sinsincoscoscossin
cossinsincossincos
1 iiiiiii
iiiiiii
ia
a
Tϕαϕαϕϕϕαϕαϕϕ
( )
−=−
1000
cossin0
sinsincoscoscossin1
iii
iiiiiiii
id
aT
ααϕαϕαϕϕ
28
DH Example
wherewhere
29
Example – the Stanford Arm
30
Example – the Stanford Arm
Z4
Z5
Z6
X7
Z7
Z1
X2
Z2
X3
Z3
X4
X5
X6
i ai di αi θi
1
2
3
d2
d3
X1Y1
3
4
5
6
d1
31
Pinhole Camera
d yθ
dy
x
y
ddx
ddy
θ
θ
tan
tan
=
=
32
Imaging
z
y
x
0
z
• Given a point. What is its image? (dx,dy)
• Solution:
• Convert the point’s coordinates to the • Convert the point’s coordinates to the
camera coordinate system.
• Derive θx and θy
• Calculate dx and dy.
( ) 10
0
−= TT N
N
33
Imaging
Z0
θ θz3
x30
z
y
x
x3
y3
z
y
x
0
3
0
3z
y
x
T
z
y
x
=
Z1
Z2θ1
θ2 θ3
x0
x1
x2
z3z3
x33 z
( ) ( )
( ) ( )3
3
3
3
3
3
3
3
03
tantan
tantan
x
ydddy
x
zdddx
x
y
x
z
zz
yx
yx
====
==
θθ
θθ
34
Imaging Example• Let,
904590 −=== ooo θθθ•
• What is the location of the end effector?
• Draw the image of the box with
1
0100
904590
21
321
=
===
−===
d
LLR
ooo θθθ
• Draw the image of the box with
coordinates
[ ] ( ) [ ] ( )[ ] ( ) [ ] ( )5,18,05,18,5
0,18,50,18,0
0403
0201
==
==
pp
pp
35
Imaging Example
where
0100
904590
21
321
===
−===
LLR
ooo θθθ
36
Imaging Example
( )
−
−
==−
1000
0001
102
2
2
20
02
2
2
20
10
3
3
0TT
1000
37