Professional Documents
Culture Documents
C2 - Forward Kinematics of Robot 1 For AMP - Compatibility Mode
C2 - Forward Kinematics of Robot 1 For AMP - Compatibility Mode
INDUSTRIAL ROBOT
Kinematics
Time to Derive Kinematics Model
of the Robotic Arm
INTRODUCTION
Forward Kinematics:
to determine where the robot’s hand is?
(If all joint variables are known)
Inverse Kinematics:
to calculate what each joint variable is?
(If we desire that the hand be
located at a particular point)
3
1
10/18/2022
INTRODUCTION
What you can find: The angles of each joint needed to obtain
that position
4
INTRODUCTION
Where is my hand?
Direct Kinematics:
HERE!
INTRODUCTION
Objective:
To drive a method to compute the
position and orientation of the
manipulator’s end-effector relative to the
base of the manipulator as a function of
the joint variables.
2
10/18/2022
Degrees of Freedom
The degrees of freedom of a rigid body is defined as
the number of independent movements it has.
The number of :
• Independent position
variables needed to locate all
parts of the mechanism,
• Different ways in which a
robot arm can move,
• Joints
7
In a plane
In space
Degrees of Freedom
3 position
3D Space = 6 DOF
3 orientation
In robotics:
DOF = number of independently driven joints
positioning accuracy
As DOF computational complexity
cost
flexibility
power transmission is
9
more difficult
9
3
10/18/2022
10
Lower Pair
The connection between a pair of bodies
when the relative motion is characterized
by two surfaces sliding over one another
11
11
12
12
4
10/18/2022
Higher Pair
A higher pair joint is one which contact
occurs only at isolated points or along a
line segments
13
13
Robot Joints
Revolute Joint
1 DOF ( Variable - )
14
Robot Specifications
Number of axes
Major axes, (1-3) =>
position the wrist
Minor axes, (4-6) => orient
the tool
Redundant, (7-n) =>
reaching around obstacles,
avoiding undesirable
configuration
15
15
5
10/18/2022
2
3
1 4
16
Note on Joints
Without loss of generality, we will consider
only manipulators which have joints with a
single degree of freedom.
A joint having n degrees of freedom can
be modeled as n joints of one degree of
freedom connected with n-1 links of zero
length.
17
17
Link
A link is considered as a rigid body which
defines the relationship between two
neighboring joint axes of a manipulator.z zn+1n
zn
an n+1
x n+1
n xn
xn
Link n
Joint n+1
Joint n
18
18
6
10/18/2022
19
Link Length
Is measured along a line which is mutually
perpendicular to both axes.
The mutually perpendicular always exists
and is unique except when both axes are
parallel.
20
20
Link twist
Project both axes i-1 and i onto the plane
whose normal is the mutually perpendicular
line, and measure the angle between them
Right-hand sense
21
21
7
10/18/2022
Axis i-1
i-1
22
22
Joint Parameters
A joint axis is established at the connection of two links.
This joint will have two normals connected to it one
for each of the links.
23
23
Axis i-1
i di
i-1 24
24
8
10/18/2022
Link parameters:
an the length of the link.
n the twist angle between the joint axes.
Joint parameters:
n the angle between the links.
dn the distance between the links
25
25
26
27
9
10/18/2022
a0= n=0.0
0= n=0.0
28
28
Special cases:
If joint axes zi-1 and zi intersect, parameter ai
is zero.
If the common perpendicular to zi-1 and zi
intersects zi-1 at the origin of frame Fi-1, then
di-1 is zero.
If joint axes zi-1 and zi are parallel, angle i is
zero.
29
29
30
10
10/18/2022
31
31
Joint n+1
Link n-1
zn
zn+1
zn-1 xn
yn-1
dn n
yn an xn+1
an-1
xn-1 yn+1
32
32
33
33
11
10/18/2022
The Situation:
You have a robotic arm that
starts out aligned with the xo-axis.
You tell the first link to move by 1
and the second link to move by 2.
The Quest:
What is the position of the
end of the robotic arm?
34
34
The Situation:
You have a robotic arm that
starts out aligned with the xo-axis.
You tell the first link to move by 1
and the second link to move by 2.
The Quest:
What is the position of the
end of the robotic arm?
Solution:
1. Geometric Approach
This might be the easiest solution for the simple situation. However,
notice that the angles are measured relative to the direction of the previous
link. (The first link is the exception. The angle is measured relative to it’s
initial position.) For robots with more links and whose arm extends into 3
dimensions the geometry gets much more tedious.
2. Algebraic Approach
Involves coordinate transformations.
35
35
A b x
A B A B cos θ b
θ y
Matrix Representation: B
a x b x
A B b a x b x a y b y
a y y
Unit Vector
Vector in the direction of a chosen vector but whose magnitude is 1.
B
uB
B B
uB
36
36
12
10/18/2022
Matrix Multiplication:
An (m x n) matrix A and an (n x p) matrix B, can be multiplied since
the number of columns of A is equal to the number of rows of B.
Non-Commutative Multiplication
AB is NOT equal to BA
Matrix Addition:
a b e f a e b f
c d g
h c g d h
37
37
Basic Transformations
Moving Between Coordinate Frames
(VN,VO)
VO
P
N
X VN
Px
V X V N Px
Notation: V XY Y V NO O P
V V 0
38
38
Writing V XY in terms of V NO
Y O
VO
P
N
X VN
P V N
V XY X O P V NO
V
39
39
13
10/18/2022
O
Translation along the X-Axis and Y-Axis
VO
N
VN
P
X P XY x
PY
P V N
V XY P V NO X O
PY V
40
40
NO
V N V cosθ V NO cosθ V NO n
V NO O NO NO NO
V V sinθ V cos(90 θ) V o
41
41
Y
Rotation (around the Z-Axis)
Z X
Y
VY
X
VX
V X V N
V XY Y V NO O
V V
42
42
14
10/18/2022
X
VX
X XY NO NO
V V cos α V cos α V x
X N O (Substituting for VNO using the N and O
V (V n V o) x components of the vector)
X
V V (x n ) V O (x o )
N
43
43
Similarly….
Y NO NO NO
V V sin α V cos(90 α) V y
Y N O
V (V n V o) y
V Y V N (y n ) V O (y o )
V N (cos(90 θ)) V O (cos θ )
V N (sin θ ) V O (cos θ )
So….
V X V N (cos θ ) V O (sin θ ) V X
V XY Y
V Y V N (sin θ ) V O (cos θ ) V
Written in Matrix Form
44
Y1
(VN,VO)
Y0
VNO
VXY
P X1
V X Px cos θ sin θ V N
V XY Y
V P y sin θ cos θ V O
(Note : Px, Py are relative to the original coordinate frame. Translation followed by
rotation is different than rotation followed by translation.)
45
45
15
10/18/2022
HOMOGENEOUS REPRESENTATION
Putting it all into a Matrix
X
V cos θ sin θ Px V N
V Y sin θ cos θ Py V O Simplifying into a matrix form
1 0 0 1 1
cos θ sin θ Px
H sin θ cos θ Py Homogenous Matrix for a Translation in
XY plane, followed by a Rotation around
0 0 1 the z-axis
46
46
cos θ 0 sin θ
Ry 0 1 0 Rotation around the Y-Axis
sin θ 0 cos θ
1 0 0
R z 0 cos θ sin θ Rotation around the X-Axis
0 sin θ cos θ
47
47
Homogeneous Matrices in 3D
H is a 4x4 matrix that can describe a translation, rotation, or both in one matrix
O
1 0 0 Px
Y
0 1 0 Py
P
N H
0 0 1 Pz
X A
Translation without rotation 0 0 0 1
Z
Y
n x ox ax 0
n oy ay 0
O
N
H y
n z oz az 0
X 0 0 0 1
Rotation part:
Z Rotation without translation Could be rotation around z-axis,
A x-axis, y-axis or a combination of
the three. 48
48
16
10/18/2022
Homogeneous Continued….
V N
O The (n,o,a) position of a point relative to the
V
V XY H A current coordinate frame you are in.
V
1
n x ox ax Px V N
n
oy ay Py V O V X n x V N o x V O a x V A Px
y
V XY
n z oz az Pz V A
0 0 0 1 1
The rotation and translation part can be combined into a single homogeneous
matrix IF and ONLY IF both are relative to the same coordinate frame.
49
49
Y W N
O
W
A
W
T
P
X
Z
WX WI W N
Y Point relative to the J Point relative to the O Point relative to the
W X-Y-Z frame W I-J-K frame W N-O-A frame
K A
W Z
W W
WI ni oi ai Pi W N
W I Pi n i oi ai W N J
J
a j W O W nj oj aj Pj W O
W Pj n j oj
W K Pk n k W K n k ok ak Pk W A
ok a k W
A
1 0 0 0 1 1
50
50
WN
Y O
W
WA
T
P
X
Z
W X i x jx kx Tx W I
W X Tx i x jx k x WI Y
Y W i y jy ky Ty W J
W Ty i y jy k y W J
W Z i z jz kz Tz W K
W Z Tz i z jz
k z W k
1 0 0 0 1 1
W X i x jx kx Tx n i oi ai Pi W N
WI Y
Substituting for W J W i y jy ky Ty n j oj aj Pj W O
WK W Z i z jz kz Tz n k ok ak Pk W A
1 0 0 0 1 0 0 0 1 1
51
51
17
10/18/2022
W X W N i x jx kx Tx n i oi ai Pi
Y O
W HW
i jy ky Ty n j oj aj Pj
H
y
W Z W A i z jz kz Tz n k ok ak Pk
1 1 0 0 0 1 0 0 0 1
Product of the two matrices
1 0 0 Tx i x jx kx 0 1 0 0 Pi n i oi ai 0
0 1 0 Ty i y jy ky 0 0 1 0 Pj n j oj aj 0
H
0 0 1 Tz i z jz kz 0 0 0 1 Pk n k ok ak 0
0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1
H = (Translation relative to the XYZ frame) * (Rotation relative to the XYZ frame)
* (Translation relative to the IJK frame) * (Rotation relative to the IJK frame)
52
52
WN
Y O
W
A
W
T
P
X
Z
One more variation on finding H:
This method might seem a bit confusing, but it’s actually an easier way to
solve our problem given the information we have. Here is an example…
53
53
54
18
10/18/2022
Where
0
nT is the pose of the end-effector relative to
base;
Ti is the link transform for the ith joint;
and
n is the number of links.
55
55
56
56
Why DH notation
Find the homogeneous transformation
H relating the tool frame to the fixed
base frame
57
57
19
10/18/2022
Why DH notation
A very simple way of modeling robot
links and joints that can be used for any
kind of robot configuration.
58
58
59
DH Techniques
1. Assign a reference frame to each joint
(x-axis and z-axis). The D-H representation
does not use the y-axis at all.
2. Each homogeneous transformation Ai
is represented as a product of four
basic transformations
60
60
20
10/18/2022
Denavit-Hartenberg
Parameters
Axis i
Axis i-1 i
di
i-1 61
61
62
62
63
21
10/18/2022
64
64
Denavit-Hartenberg Convention
• 1. Establish the base coordinate system. Establish a right-handed
orthonormal coordinate system ( X 0 , Y0 , Z 0 ) at the supporting base
with Z 0 axis lying along the axis of motion of joint 1.
• 2. Initialize and loop Steps 3 to 6 for I=1,2,….n-1
• 3. Establish joint axis. Align the Zi with the axis of motion (rotary or
sliding) of joint i+1.
• 4. Establish the origin of the ith coordinate system. Locate the
origin of the ith coordinate at the intersection of the Zi & Zi-1 or at
the intersection of common normal between the Zi & Zi-1 axes and
the Zi axis.
• 5. Establish Xi axis. Establish X i ( Z i 1 Z i ) / Z i 1 Z i or along the
common normal between the Zi-1 & Zi axes when they are parallel.
• 6. Establish Yi axis. Assign Yi ( Z i X i ) / Z i X i to complete the
right-handed coordinate system.
65
65
Denavit-Hartenberg Convention
• 7. Establish the hand coordinate system
• 8. Find the link and joint parameters : d,a,,
0 S i C i di
0 0 0 1
66
22
10/18/2022
Denavit-Hartenberg Convention
Thus, it can be seen that the i + 1 coordinate system
is due to the transformation from the ith coordinate
system. The rotations (R) and translations (T) in
these transformations must be present in the
transformations of the matrix Ai. Kinetic parameters
are also determined based on these transformations.
67
| 68 |
68
Attach the coordinate system to the links as shown in the figure: axes
z0, z1 and z2 perpendicular to the plane containing the robot. The
original base coordinate system is O0x0y0z0, the direction of x0 is from
O0 to O1. The coordinate system O1x1y1z1 has the direction shown in
the figure, O1 is at the center of the joint axis 2. The O2x2y2z2
coordinate system has the origin O2 at the end point of the second.
The DH parameters table:
Khâu i αi ai di
1 1* 0 a1 0
2 2* 0 a2 0
| 69 |
69
23
10/18/2022
| 70 |
70
Choose the direction of x0 from left to right, then α1 =90° (positive counter-
clockwise).
At the same time, the origin O1 has tránslated a
distance d1 along z0 :T (0,0, d1).
| 71 |
71
| 72 |
72
24
10/18/2022
Determination of matrices A:
C1 0 S1 0 C 2 0 S2 0 1 0 0 0
S 0 C1 0 S 0 C2 0 0 1 0 0
A1 1 A2 2 A3
0 1 0 d1 0 1 0 0 0 0 1 d3
0 0 0 1 0 0 0 1 0 0 0 1
73
We have:
2 1
T3 A3 ; T3 A2 2T3
C 2 0 S2 0 1 0 0 0 C 2 0 S2 S2d3
S 0 C2 0 0 1 0 0 S 2 0 C2 C 2 d 3
1
T3 2 .
0 1 0 d 2 0 0 1 d3 0 1 0 0
0 0 0 1 0 0 0 1 0 0 0 1
T3 A1 1T3
C1 0 S1 0 C 2 0 S2 S2d3 C 1C 2 S1 C1 S 2 C1 S 2 d 3
S 0 C1 0 S2 0 C2 C 2d 3 S C C1 S 1S 2 S1 S 2 d 3
T3 1 . 1 2
0 1 0 d1 0 1 0 0 S2 0 C2 C 2d 3 d1
0 0 0 1 0 0 0 1 0 0 0 1
74
nx sx ax px C1C 2 S1 C1 S 2 C1 S 2 d 3
n sy ay py S C C1 S1 S 2 S1 S 2 d 3
TE Tn y T3 1 2
nz sz az pz S2 0 C2 C 2 d 3 d1
0 0 0 1 0 0 0 1
Thus, the kinematic equation is:
n x C1C 2 ; n y S1C 2 ; n z S 2
s x S 1 ; s y C1 ; s z 0
a x C 1 S 2 ; a y S1 S 2 ; a z C 2
p x C1 S 2 d 3 ; p y S1S 2 d 3 ; p z C 2 d 3 d1
75
25
10/18/2022
For the end effector, place O3 at the point between robot fingers and the axis
z3, x3 selected as shown in the figure . Thus, we have translated the origin
along z2 a distance d3 : T(0,0, d3)).
Khâu i αi ai di
1 1* 0 d1
2 2* 0 0
3 0 0 0 d 3*
| 76 |
76
Example 1
Z3
Z0 Z1 Joint 3
Y0 O3 X3
Y1
d2
Joint 1
O0 X0 O1 X1 O2 X2
Joint 2
Y2
a0 a1
A translation along the initial z Joint i i ai di i
axis by d,
A rotation about the initial z axis 1 0 a0 0 0
by ,
A translation along the new x 2 -90 a1 0 1
axis by a, and.
A rotation about the new x axis 3 0 0 d2 2
by . 77
77
Example 1
C i C iS i S iS i a iC i
S C iC i S iC i a i S i
T i
i 1 i
0 S i Ci di
0 0 0 1
78
78
26
10/18/2022
0 0 1 d2
0 0 0 1
79
79
Example 2(3.3):
Link Frame Assignments
80
80
Example 2:
Ci Ci Si Si Si ai Ci
S C C S C a S
T i
i
i 1
i i i i i i
81
27
10/18/2022
Example 2:
82
82
83
83
84
84
28
10/18/2022
Li
Link 2 n
link 1 k
3
Link 4
85
Khâu i αi ai di
1 1* 0 a1 0
2 2* a2 0
3 0 0 0 d 3*
4 4* 0 0 d4
86
Example:
ELBOW ROBOT:
87
29
10/18/2022
88
Khâu αi ai di Khớp
1 1 0 0 R
2 2 0 a2 0 R
3 3 0 a3 0 R
4 4 a4 0 R
5 5 0 0 R
6 6 0 0 0 R
Joint variables
89
Transformation Matrixes:
C1 0 S1 0 C 2 S2 0 C 2a2
S S S 2 a 2
0 C1 0 C2 0
A1 1 A2 2
0 1 0 0 0 0 1 0
0 0 0 1 0 0 0 1
C 3 S3 0 C 3 a3 C 4 0 S4 C4 a4
S C3 0 S 3 a 3 S 0 C4 S 4 a 4
A3 3 A4 4
0 0 1 0 0 1 0 0
0 0 0 1 0 0 0 1
C 5 0 S5 0 C 6 S6 0 0
S 0 S
0 C5 C6 0 0
A5 5 A6 6
0 1 0 0 0 0 1 0
0 0 0 1 0 0 0 1
90
30
10/18/2022
Then:
nx sx ax px
n sy ay p y
0
T6 T6 A1 A2 A3 A4 A5 A6 y
nz sz az pz
0 0 0 1
The kinematic equations:
91
92
92
93
93
31
10/18/2022
94
94
Forearm of a PUMA
d4
x4
x3
a3 z4
y3 x6
x5
y5 z6
Spherical joint
95
95
96
32
10/18/2022
97
97
98
98
Khâu αi ai di Khớp
1 1* 0 0 R
2 2* 0 a2 d2 R
3 3* a3 0 T
4 4* 0 d4 R
5 5* 0 0
6 6* 0 0 d6
* Joint variables
99
33
10/18/2022
100
100
101
101
102
34
10/18/2022
C1 cos 1 ; S1 sin 1
C12 cos 1 2 ; S12 sin 1 2
S 234 sin 2 3 4 ...
103
Khâu i αi ai di
1 1* 0 0
2 2* 0 d2
3 0 0 0 d 3*
*
4 4
0 0
5 5* 0 0
6 6* 0 0 0
104
105
35
10/18/2022
The product of the displacement matrices A for Stanford robot starts from link 6 and
gradually moves back to origin O, we have:
C 6 S6 0 0 C 5 C 6 C5 S 6 S5 0
S C6 0 0 S C S5 S 6 C5 0
5
T6 A6 6 4
T6 A5 A6 5 6
0 0 1 0 S6 C6 0 0
0 0 0 1 0 0 0 1
C 4 C 5C 6 S 4 S 6 C4C5 S 6 S 4C6 C4 S 5 0
S C C C S S 4 C 5 S 6 C 4C 6 S 4 S5 0
T6 A4 A5 A6 4 5 6
3 4 6
S 5C 6 S 5 S6 C5 0
0 0 0 1
106
C 4 C 5C 6 S 4 S 6 C 4C 5 S 6 S 4C 6 C4 S 5 0
S C C C S S 4 C 5 S 6 C 4C 6 S 4 S5 0
2
T6 A3 A4 A5 A6 4 5 6 4 6
S 5C 6 S5 S 6 C5 d3
0 0 0 1
1
T6 A2 A3 A4 A5 A6
C2 C4C5C6 S 4 S6 S2 S5C6 C2 C4C5C6 S4C6 S2 S5 S 6 C2C4 S5 S 2C5 S 2 d3
S C C C S S C S C S2 C4C5C6 S4 S 6 C2 S5 S6 S 2C4 S5 C2C5 C2d 3
2 4 5 6 4 6 2 5 6
S4C5C6 C4 S6 S 4C5 S6 C4 S6 S4 S5 d2
0 0 0 1
nx sx ax px
n sy ay p y
0
T6 A1 T6 A1 A2 A3 A4 A5 A6 y
1
n z sz az pz
0 0 0 1
107
By balancing the elements on the two sides of the equation above, we have the
kinematic equations of the Stanford robot :
n x C1 C 2 C 4 C 5C 6 S 4 S 6 S 2 S 5 C 6 S 1 S 4 C 5C 6 C 4 S 6
n y S1 C 2 C 4 C 5C 6 S 4 S 6 S 2 S 5 C 6 C1 S 4 C 5 C 6 C 4 S 6
n z S 2 C 4 C 5 C 6 S 4 S 6 C 2 S 5 C 6
s x C1 C 2 C 4 C 5 S 6 S 4 C 6 S 2 S 5 S 6 S1 S 4 C 5 S 6 C 4 C 6
s y S 1 C 2 C 4 C 5 S 6 S 4 C 6 S 2 S 5 S 6 C1 S 4 C 5C 6 C 4C 6
s z S 2 C 4 C 5 S 6 S 4 C 6 C 2 S 5 S 6
a x C1 C 2 C 4 S 5 S 2 C 5 S1 S 4 S 5
a y S 1 C 2 C 4 S 5 S 2 C 5 C1 S 4 S 5
a z S 2C 4 S 5 C 2C5
p x C1 S 2 d 3 S1 d 2
p y S 1 S 2 d 3 C1 d 2
pz C2d3
108
36
10/18/2022
109
109
110
HW
Problem 1: ? 0 1 0
? 0 0 1
We have: T6
? 1 0 2
? 0 0 1
Is the matrix representing the direction and position of the end effector.
Problem 2:
111
37
10/18/2022
Problem 3:
Problem 4:
112
Problem 5:
Problem 6:
113
38