Robot Kinamatics - 1
Robot Kinamatics - 1
AB A B A bx
cos θ θ b y
B
Matrix Representation:
ax bx
AB a xb x a yb y
ay by
Unit Vector
Vector in the direction of a chosen vector but whose magnitude
is 1. B
uB
B B
uB
Quick Matrix Review
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
f ae bg af bh
a b e
c d g
c dg
cf dh
h
e
Matrix Addition:
a b e
f a e b f
c d g
h c g d h
Basic Transformations
Moving Between Coordinate Frames
VO
P
N
X
VN
P
x
Px = distance between the XY and NO coordinate planes
P x
Notation: VX VN
V
XY
V
NO
P
Y O
V V 0
Writing V
XY in terms o fV NO
Y O
VO
P
VN N
X
P V N
XY X P NO
V V
O
V
O
Translation along the X-Axis and Y-
Axis
Y
VO
N
VN
Px
X P
XY
Y
P
PX VN
V
XY P V NO
P V
O
Y
Using Basis
Vectors
Basis vectors are unit vectors that point along a
coordinate
axis
O
n Unit vector along the N-Axis
o Unit vector along the O- Axis
VO
V
NO Magnitude of the VNOvector
o
N
n VN
V NO NO cos θ
VN cos θ V V NO n
NO
cos(90 V
V O NO NO NO
V V o
V θ)
sin θ
Y
Rotation (around the Z-Axis)
Z X
Y
VY
X
V
X
VY
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 nV o)x components of the vector)
X N O
V V (x n) V (x o)
V N (cos θ ) V O (sin θ )
Similarly…
. NO NO NO
V
Y V sin α V cos(90 α) y
V
Y N
O
V (V n V o ) y
Y N O
V V (y n) V (y o)
V N
(sin θ ) V O (cos θ )
X
So….N
V V (cos θ) V
O
(sin θ) VX
V
XY
Y
V
Y
V
N
(sin θ) V
O
(cos θ) V
Written in Matrix
Form
VX cos sin θ V N Rotation Matrix about the
V
XY
θ Y O z-
V
sin θ cos θ V axis
Y1
(VN,VO)
Y0
VNO
VXY
P X1
V X
P x cos θ sin θ V N
XY
V P
Y O
V y sin θ cos θ V
(Note : Px, Py are relative to the original coordinate frame. Translation followed by
rotation is different than rotation followed by translation.)
V X
Px
cos θ sin θ 0V
N
Padding with 0’s and 1’s
V Y
P sin θ cos θ 0
O
V
y
1 1
0 1 1
0
V X
sin θ Px V N
cos θ
cos θ P V
O Simplifying into a matrix form
V Y sin
θ y
1 0
0 1
1
H
sin θ
Homogenous Matrix for a Translation in
cos θ P y
XY plane, followed by a Rotation
0 1 around the z-axis
0
Rotation Matrices in 3D – OK,lets return from
homogenous repn
cos θ sin θ 0 Rotation around the Z-
Axis
R z sin θ cos θ 0 0
0 1
cos θ 0 sin θ
R Rotation around the
y 0 0
1 Y-
sin θ cos θ Axis
0
0 0
1
Rotation around the X-
Rz 0 cos θ
Axis
0 sin θ cos θ
sin θ
Homogeneous Matrices in 3D
H is a 4x4 matrix that can describe a translation, rotation, or both in
matrix
one O
Y 1 0 0
Px
N
P
z
X A 1P 0
y
Translation without
Z rotation
0 0 1
Y nx ox Pa 0
x
O 0y oy 0a y 00
n
N H 1
n z
oz az 0
X
0 0 0
1
Rotation part:
Z Rotation without Could be rotation around z-
A axis, x-axis, y-axis or a
translation 97
combination of the three.
Homogeneous Continued….
VN
O
V The (n,o,a) position of a point relative to the
current coordinate frame you are in.
H
XY
V
VA
1
n x ox ax Px V N
O
P V V
X n xVN o xVO a xVA P
n y
oy ay x
V
XY
y
n Pz A
z
oz az
V
1
0 0 0 1
Y W
N
O
W
W A
T
P
X
Z
I N
W W
W
X
Point relative to the
J
Point relative to the O Point relative to the
Y
X-Y-Z frame W
I-J-K frame W N-O-A frame
W W K
W A
Z
W
N
Pi W
I
I W n i oi ai
W Pi i n i o i
W
N
J O
W P W
a n j o j a j
W
J j W O
j
j j
W P n o Pk
K
a W A
W K n k ok a k W
A
j Pk n k k
k
1 0 0 0 1
o a 1 99
Y
N
W
O
W
W
A
T
P
X
W X ix jx kx Tx W I
W
X kx W
I J
Tx ix jx Y
W iy W
W T y i y
Y J j ky Ty y
j y ky W
WZ W Z j i z z W K
kz Tz
T z i z k z W
k
j z
1
0 0 0 1 1
N
W X Tx oi ai Pi W
i x jx k x n i
W I
Y
O
Substituting iy jy ky Ty nj oj aj Pj W
J
W W
for W K
W Z jz k Tz n ok ak Pk
iz W
A
z k
1 1
0 0 0 1 0 0 0 1
W
X
W N Tx oi ai Pi
i x jx kx n i
Y
O H iy jy ky Ty n j
oj aj Pj
iz jz Tkz n ok ak Pk
W H z k
1 1
W
0 0 0 1 0
W Z W A Product of0the two 0 1
matrices
Notice that H can also be written
as:
1 0 0 Tx i x jx kx 01 0 0 Pi n i
oj oi ai
10 0 T y
i y y y 0 0 j
n j j 0
H a 0
z i z z z k n k k k
0 0 1 T o
1 0 j a k
0 0 0
1 0
Y
N
W
O
W
W A
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.
HOMOGENEOUS COORDINATES
For vectors in Cartesian coordinates, the basis is a set of unit vectors
directed along the orthogonal x, y, and z axes used to represent the
space. Thus, a vector v can be written as
where the unit vectors {i, j, k} have been weighted by the appropriate
constants
Another way of representing a three-dimensional vector is by
using homogeneous coordinates. In this representation a fourth
component which acts as a scaling factor is added.
Where ,
Homogeneous representations:
where s, the scaling factor, can be any number other than zero. We will
usually use scaling factors of 1 for our work. Thus the null vector will also use
a scan factor of 1. Physically, the null vector represents the origin of a
coordinate reference frame. A vector is undefined if all the entries are zero.
DOT PRODUCT EQUATIONS
Obtain the Cartesian and homogeneous representations for the dot product
of the two vectors x and y.
Then,
Homogeneous representation:
The same vectors represented in homogeneous coordinate are
given by
where:
Defines the dot product in terms
of all the column entries by:
CROSS-PRODUCT FORMULAS
Obtain the Cartesian and homogeneous representations for the cross product
of the two vectors x and y
Homogeneous representation:
where:
Matrix Operators: Transformations
Translational transformations
That can be considered a point 10 units from the origin along the
radial line at 45°. we obtain the expression for translated point p'
The Quest:
What is the position of
Solution:
the end of the robotic arm?
1. Geometric
This might be the easiest solution for the simple situation.
Approach
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.
Example Problem:
You are have a three link arm that starts out aligned in the x- axis.
Each link has lengths l1, l2, l3, respectively. You tell the first one to
move by 1 , and so on as the diagram suggests. Find the
Homogeneous matrix to get the position of the yellow dot in the X0Y0
frame. Y 3
3
2 X3
3
Y2 2
X2
Y0
i.e. Rotating by 1 will put you in the X1Y1 frame.
1
Translate in the along the X1 axis by l1.
1
Rotating by 2 will put you in the X2Y2 frame.
X0
and so on until you are in the X3Y3 frame.
The position of the yellow dot relative to the X3Y3 frame is (l1,
0). Multiplying H by that position vector will give you th
coordinates of the yellow point relative the the X0Y0 frame
Slight variation on the last solution:
Make the yellow dot the origin of a new coordinate X4Y4 frame
Y3
Y4
3
2 X3
3
Y2 2
X2
X4
Denavit - Hartenberg
Parameters
Denavit-Hartenberg Notation
Frame Assignment
Denavit-Hartenberg Notation
Z(i - 1)
Yi Zi
Y(i -1)
Xi ai
a(i - 1 ) di
X(i -1)
i
( i - 1)
THE , a , d,
PARAMETERS/VARIABLES:
The Parameters
You can
Z(i - 1) align the
Yi two axis just
Y(i -1) Zi
using the 4
Xi ai parameter s
a(i - 1 ) di
X(i -1)
i
( i - 1)
1) a(i-1)
Technical Definition: a(i-1) is the length of the perpendicular between the
joint axes. The joint axes is the axes around which revolution takes place
which are the Z(i-1) and Z(i) axes. These two axes can be viewed as lines
in space. The common perpendicular is the shortest line between the
two axis-lines and is perpendicular to both axis-lines.
a(i-1) cont...
Visual Approach - “A way to visualize the link parameter a(i-1) is to imagine
an expanding cylinder whose axis is the Z (i-1) axis - when the cylinder just
touches the joint axis i the radius of the cylinder is equal to a(i-1).” (Manipulator
Kinematics)
Yi Zi
Y(i -1)
Xi ai
a(i - 1 ) di
X(i -1)
i
( i - 1)
2) (i-1)
Technical Definition: Amount of rotation around the common
perpendicular
so that the joint axes are parallel.
i.e. How much you have to rotate around the X(i-1) axis so that the Z(i-1) is
pointing in the same direction as the Zi axis. Positive rotation follows
the right hand rule.
3) d(i-1)
Technical Definition: The displacement Z(i - 1)
along the Zi axis needed to align the a(i-1) Y(i -1)
Yi Zi
common perpendicular to the ai common Xi ai
a(i - 1 ) di
perpendicular. X(i -1)
In other words, displacement along ( i - i
the 1)
cos θ i sin θ 0
i a (i 1)
cos θ cos α sin α sin α d
sin θ icos α (i 1) i (i 1) (i 1)
(i 1) i
sin θ sin
i α (i 1)
cos θ i sin α (i 1) cos α (i 1)
cos α (i 1) d i
0 0 0 1
Yi
1)
Y(i -1) Xi
di ai
Xa
(i -(i1)
-1)
Yi
3 Revolute Joints Y2
Z0 Z1
X2
d2
X0 X1
Y0 Y1
Denavit-Hartenberg Link
a0 Parameter Table
i di i
(i- 1) a (i- 1)
a1
0 0 0 0 0
Notice that the
table has two
1 0 a0 0 1
uses:
1) To describe
2 - 90 a1 d2 2
the robot with its
variables and
Y2
i a (i- 1)
di i
(i- 1)
Z0 Z1
0 0 0 0 0
X2
d2
X0 X1 1 0 a0 0 1
Y0 Y1
2 - 90 a1 d2 2
a0 a1
X2
V
V Y 2
T ( T)( 0 T)( 1
T)
X 0Y 0Z 0 1 2 0
V T Z 2
V
1 Note: T is the D-H matrix with (i-1) = 0 and i =1.
i di i
(i- 1) a (i- 1) sin θ
cos 0 0 0 0
θ
cos θ
0 0 0 0 0 T sin θ
0 0 0 0
0
0 0
1 0
1 0 a0 0 1 0 0
0 1
This is just a rotation around the Z0
2 - 90 a1 d2 2 axis
Revolute and
Finding :
Prismatic Joints
y
Combined θ arctan( )
(x , y)
More x
Specifically: y arctan2() specifies that it’s in the
θ arctan 2 ) first quadrant
(
Y x
S
1 Finding S:
X
S (x 2 y 2 )
Inverse Kinematics of a Two Link
Manipulator
(x , Given: l1, l2 , x , y
y)
2 Find: 1 , 2
l2 Redundancy:
A unique solution to this problem
does not exist. Notice, that using
the “givens” two solutions are
l1
1 possible.
Sometimes no solution is possible.
(x , y)
The Geometric
Solution l2 (x , Using the Law of Cosines:
θ2
y)
c 2 a 2 b 2 2 ab cos C
2 2
( x 2 y 2) l l 2 l l cos( 180 θ
)
1 2 1 2
2
cos( 180 2
θ 2
)
l1 cos( θ x
2 y l 2
l2)
1
cos(
2
θ 2) 2
2 l1 l 2
θ1
2
x 2 y2 l l
2
θ2 arccos
1 2
2 l1 2
Using the Law of Cosines: l
Redundant since 2 could be in the
sin B sin C
first or fourth quadrant.
b c
sin θ sin(180
1
2 θ ) sin(
2 θ )
Redundancy caused since 2 has two
l2 x y
2 2
x y
2 2
possible values
θ 1 θ 1 l sin( θ ) y
α θ 1 arcsin 2 2
arctan 2
y x 2 y 2 x
α arctan 2
x
The Algebraic Solution
l2 (x , y)
θ2
c 1 cos θ 1
cos( θ θ )
c 12 2 1
l1 (1) x l c l c
1 1 2 12
(2) y l s l sin
1 1 2 12
θ1
(3) θ θ 1
θ 2
2 2 2 2
(1) (2) x y
c 1 (c 1 2 ) l s l (sin
l 2
c
2
l
2
(c )
2 2
1
1
2
2
2
12 )
2
2 l l s (sin )
22l l l
1 l 1
2
2ll 2 1 c2 (c ) s (sin
12
1 2 1 12
1 1 22 1 12 1 12 )
2 2
l1 l2 2 l1 2 c 2 Only
Note :
l Unknown
2 2 2 2 cos( a b ) (cos a )(cos b ) (sin a )(sin
y l l b)
x
θ arccos sin( a b ) (cos a )(sin b ) (cos b )
1 2
2
2 l1 2 (1sin a )
l
xl c l c Note :
1 1 2 12
l c l c 1 c 2 l 2 s1 s 2
cos( a b ) (cos a )(cos b ) (sin a )(sin
1 1 2 b)
c ( l1 l c 2 ) s1 ( l 2 s 2 ) sin( a b ) (cos a )(sin
1 2
b ) (cos b )(sin a)
y l1 s 1 l 2 sin 12
We know what 2 is from the
l s s 1c 2 l 2 s 2c 1 previous slide. We need to solve
l
1
c
1
( l12 s
2
)s
2 1
(l l
1 2
c 2
) for 1 . Now we have two
equations and two unknowns (sin
c1
x s1 ( l 2 s 2 ) 1 and cos 1 )
( l1 l 2 c 2 )
1
x l s s (l 2
l 2 2l l c ) Notice this is the law of
( l1 l 2
c 2
)
2 2 1 1 2
1 2 2
cosines and can be replaced
by x2+ y2
y ( l1 l 2 c 2 ) x l 2 s 2
y ( l1 l 2 c 2 ) x l 2 s 2
s1 θ 1 arcsin
2 2 2 2
x y x y