You are on page 1of 114

Chapter 3 b

Robot Kinematics
continued.
Homogeneous transformation
Representation of Transformation
RPY
Euler Angles
Homogeneous Transformations

5/4/17 2
5/4/17 3
5/4/17 4
Example

5/4/17 5
Example

5/4/17 6
Transformation Rule

5/4/17 7
Example

5/4/17 8
Homogeneous Representation

5/4/17 9
Homogeneous Representation-Translation

5/4/17 10
Homogeneous Transformation Matrices

5/4/17 11
Homogeneous Transformation Matrices
Representation of Transformation

Representation of Pure Translation in Space


5/4/17 13
Representation of Pure Translation

5/4/17 14
Solution

10

F OLD
matrix

Fnew

5/4/17 15
Pure Rotation about an Axis

5/4/17 16
P(l1- l2, l3+l4)

5/4/17 17
5/4/17 18
Cos 90= 0
5/4/17
Sin 90 =1 19
Rotation of a frame relative to the x-axis of a
reference frame, 90 deg CCW

5/4/17 20
Basic Rotation Matrices

5/4/17 21
Representation of Combined Transformation

5/4/17 22
5/4/17 23
5/4/17 24
Solution
The matrix equation representing the transformation
is :

noa

5/4/17 25
Using Matlab in Matrix multiplication

5/4/17 26
Sequence of implementation

5/4/17 27
Inverse of Transformation Matrices

5/4/17 28
5/4/17 29
5/4/17 30
5/4/17 31
Angle is 30
degrees

Solution

5/4/17 32
Forward Kinematics

5/4/17 34
Inverse Kinematics

5/4/17 35
Example

5/4/17 36
Forward kinematics

Let L1=34 cm L2= 32


5/4/17 cm L3=22cm 37
5/4/17 38
Robot Reference Frames

5/4/17 39
5/4/17 40
Dot Product: Properties

5/4/17 41
Coordinate Transformation

5/4/17 42
Basic Rotation

5/4/17 43
Rotation Matrix

5/4/17 44
5/4/17 45
Basic Rotation Matrix

5/4/17 46
Rotation Matrix

5/4/17 47
Example

Note

5/4/17 48
Composite Rotation Matrix

5/4/17 49
5/4/17 50
Coordinate Transformations

5/4/17 51
Coordinate Transformations

5/4/17 52
Forward and Inverse Kinematic
Equations
Forward kinematics includes substituting
the known joint values into the equations
to find the location and orientation
Inverse kinematics includes finding an
equation that results in joint values if the
desired position and orientation are
specified.
Forward and Inverse Kinematics for
Position
Four possibilities are common:
a. Cartesian (gantry, rectangular)
coordinates
b. Cylindrical coordinates
c. Spherical coordinates
d. Articulated (anthropomorphic or all-
revolute) coordinates
Cartesian Coordinates

Three linear motions.


1 0 0 px
0 1 0 p y
Tp Tcart ( px , p y , pz )
R
0 0 1 pz z a

0 0 0 1 o

n
p pz
y

px
py

x
Forward and Inverse Kinematics of a Robot

5/4/17 56
Cylindrical Coordinate

5/4/17 57

rSin
rCos

58
SPHERICAL COORDINATES(2RP)

59
DETAILS

Rotation of along Y axis

60
Product of two rotation matrix about
y and z axis

61
62
Inverse Solution

Use the position equations to find


the joint values.

The application of ATAN2 function


for correct determination of angles.
Inverse Solution

Use the position equations to


determine the joint values.

Check your answers for correct


values.
Forward and Inverse Kinematics for
Orientation
Three possibilities are common:
a. Roll-pitch-yaw (RPY) angles
b. Euler angles
c. Articulated coordinates
RPY Angles
Rotations relative to the current z-,
y-, and x-axes
z z z
a
a a
o a o
o o
n
n
n n

x y x y x y
RPY Angles Matrix

RPY(a , o , n ) Rot ( a, a ) Rot (o, o ) Rot ( n, n )


CaCo Ca So Sn SaCn Ca SoCn Sa Sn 0
S C S S S C C S S C C S 0
a o a o n a n a o n a n
So Co Sn CoCn 0

0 0 0 1
Inverse Solution
Use:
a ATAN 2(n y , nx ) and a ATAN 2(n y , nx )

o ATAN 2[nz , (nxCa ny Sa )]

n ATAN 2[(a y Ca ax Sa ), (oy Ca ox Sa )]


ROLL ,PITCH ,YAW(R,P,Y)

5/4/17 69
ROLL ,PITCH ,YAW(R,P,Y)

Rotation of angle wrt a,


5/4/17 o,n 70
5/4/17 71
5/4/17 72
5/4/17 73
SUMMARY of Formulas for R, P ,Y

5/4/17 74
5/4/17 75
5/4/17 76
5/4/17 77
Cos 35 deg = 0.819
Sin 35 deg=0.5735

Cos 215 deg=-0.819


Sin 215 deg= -0.574

Cos 35 deg = 0.819


Sin 35 deg=0.5735

Cos 215 deg=-0.819


Sin 215 deg= -0.574
5/4/17 78
Summary of Results of Roll , Pitch and
Yaw Angles
Rotations Differ from Translations
Rotations are non-Euclidean
like travelling on a globe vs. a grid

Rotations are not commutative


x-rotate, y-rotate is not equal y-rotate, x-
rotate etc.

Rotations are non-linear


Basic Rotation about Z-axis

cos -sin 0

R sin cos 0
z
0 0 1
Rotation Parameterization
Represent rotation space in Euclidean
3
R
e.g. Euler angles
Pros
three parameters for three DOFs
Cons
singularities, potentially poor interpolation
Euler angles (,,)

An Euler angle is a rotation about a single Cartesian axis

Create multi-DOF rotations by concatenating Eulers

R = R R R

3 DOFs can be obtained by concatenating:


X-Convention

Most commonly used


The rotation given by Euler angles (,,),
where the first rotation is by an angle about
the z-axis, the second is by an angle about
the x-axis, and the third is by an angle about
the z-axis (again).
R = R R R
cos -sin 0 1 0 0
cos -sin 0
R sin cos 0 R cos -sin

0 R sin cos 0
0 0 1 0 sin cos 0 0 1
Yaw-Pitch-Roll Convention

cos -sin 0 cos 0 sin 1 0 0




R sin cos 0

R 0 1 0
R 0
cos -sin

0 0 1 -sin 0 cos 0 sin cos
Singularities
More than one sets of parameters can
create the same rotation matrix.
Gimbal lock - two or more axes align,
results in loss of rotational DOFs
For Yaw-Pitch-Roll Convention
Rotation Axis + Angle
Eulers Rotation Theorem:
all rotations can be expressed as
axis/angle
Euler Angles
Euler Angles
The Euler angles were developed by Leonhard Euler
to describe the orientation of a rigid body (a body in
which the relative position of all its points is constant)
in 3-dimensional Euclidean space.
To give an object a specific orientation it may be
subjected to a sequence of three rotations described
by the Euler angles.
This is equivalent to saying that a rotation matrix can
be decomposed as a product of three elemental
rotations.
Euler Angles
ZXZ Euler Angles
cos cos cos sin sin cos sin cos cos sin sin sin
R sin cos cos sin cos sin sin cos cos cos cos sin
sin sin sin cos cos
Leonhard Euler The Euler angles
(1707 1783)

In order to describe the motion of rigid bodies in the canonical


formulation of mechanics, it is necessary to seek three independent
parameters that specify the orientation of a rigid body

The most common and useful set of such parameters are the Euler angles

The Euler angles correspond to an orthogonal transformation via three


successive rotations performed in a specific sequence

The Euler transformation matrix is proper

A 1
The Euler angles
First, we rotate the system around the z
axis
cos sin 0 x '
0 y '
x' ' Dx' sin cos
0 0 1 z '

Then we rotate the system around the x


axis
1 0 0 x' '
X Cx' ' 0 cos sin y ' '

0 sin cos z ' '
The Euler angles
Finally, we rotate the system around the Z
axis
cos sin 0 X

x BX sin cos 0 Y
0 0 1 Z

The complete transformation can be


expressed as a product of the successive
x BX BCx' ' BCDx' Ax'
matrices

x Ax'
The Euler angles
The explicit form of the resultant
transformation matrix A is
A BCD
cos cos cos sin sin cos sin cos cos sin sin sin
sin cos cos sin cos sin sin cos cos cos cos sin
sin sin sin cos cos

The described sequence is known as


the x-convention (ZXZ)

Overall, there are 12 different


possible conventions in defining the
ZYZ Euler Angles
One method of describing the orientation of a
coordinate frame B relative to another coordinate
frame A is as follows: start with frame B coincident
with frame A. First, rotate the B frame about the z-
axis of frame B (at this time coincident with frame
A) by an angle , then rotate about the (new) y-axis
of frame B by an angle , and then rotate about the
(once again, new) z-axis of frame B by an angle .
This yields a net orientation ARB(, , ) and the
triple of angles (, , ) is used to represent the
rotation. The angles (, , ) are called the ZYZ
Euler angles.
To derive the final orientation of frame B, it is easiest to derive the
formula by viewing the rotation with B considered as the fixed
frame, since then all rotations then occur around fixed axes. The
appropriate sequence of rotations for the frame A, considering the B
frame as fixed, is
Euler Angles
Rotations relative to the current z-, y-, and z-
axes.
Z Z Z
a
a a
o
o o
n n
n

X Y X Y X Y
Euler( , , ) Rot ( a, ) Rot (o, ), Rot ( a, )
C C C S S C C S S C C S 0
S C C C S S C S C C S S 0

S C S S C 0

0 0 0 1
ZYX Euler angles
ZYX Euler Angles
Forward and Inverse Kinematics Equations
for Orientation
Euler Angles Representation
Inverse Solution
Use the Formula
ATAN 2(a y , ax ) or ATAN 2(a y , a x )

ATAN 2[(nx S n y C ), (ox S o y C )]

ATAN 2[(axC a y S ), az )]
5/4/17 106
Figure 1
Figure 2
Figure 3
@ 35
@ 215

@ 35

@ 215
Checke
d

Euler( , , ) Rot ( a, ) Rot (o, ), Rot ( a, )


C C C S S C C S S C C S 0
S C C C S S C S C C S S 0

S C S S C 0

0 0 0 1
phi
sin 35 0.573 cos 35 0.573
sin 215 -0.574 cos 215 0.819

psi
sin 0 0 cos 0 1
sin 180 0 cos 180 -1

theta
sin 50 0.766 cos 50 0.643
sin -50 -0.766 cos -50 0.643