Rigid Motion and Homogeneous Transformation PDF

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

Rigid Motion and Homogeneous

Transformation
Bankatesh Kumar
February 2020

1 Introduction
Most part of Robot kinematics is about establishing different coordinate sys-
tems to show the orientations and position of rigid object and transformation
between these coordinate system. In fact, in Robotics systems the geometry
of 3-D space and Rigid motion plays an important role in manipulation of
Robotics.
Homogeneous Transformation is used to combine the rotation and
translation operation into single matrix multiplication. We can move between
different coordinate system with the help of such transformation matrix.

2 Rotation in a plane
In Figure(1) we see two coordinate system. When we rotate o0 x0 y0 coordinate
by θ angle then we get o1 x1 y1 system. We can specify the orientation by
specifying the coordinate vector of frame o1 x1 y1 w.r.t o0 x0 y0 . We can say
that we can build a matrix of form
R10 = [x01 ][y10 ]
The above matrix is called Rotation Matrix. We can compute it in
different dimensions. Like in 2-D we can straightforward compute it and our
entries become
 
0 cosθ −sinθ
R1 =
sinθ cosθ

1
Figure 1: Coordinate frame o1 x1 y1 is oriented at an angle with respect to
o 0 x0 y 0

This is our Rotation matrix. If we multiply any vector in frame 0 by this


Rotation matrix, its frame get changed to frame 1. The columns of R10 gives
us the direction cosine of coordinates of o1 x1 y1 relative to o0 x0 y0 .
Geometrically we can say that orientation of o0 x0 y0 with respect to o1 x1 y1 is
inverse of orientation of o1 x1 y1 with respect to o0 x0 y0 . So algebraically we
can write

(R10 )T = (R10 )−1

Such matrices are called Orthogonal Matrix. It is property of Rotation


Matrix that they are Orthogonal with determinant +1 .
Some of the general properties of n * n Rotation Matrix are given below.

• R  SO(n)

• R−1  SO(n)

• R−1 = RT The columns of R are mutually orthogonal.

• Each column of R is a unit vector.

• det (R) = 1

2
The notation SO(n) stands for Special Orthogonal group of order n. It is
custom to represent all n*n Rotation matrix by symbol SO(n).

3 Rotation in 3-D
In 3-D we project each axis of frame o1 x1 y1 z1 onto frame o0 x0 y0 z0 . Similar
to case of two dimension, matrices in this form are also Orthogonal and their
determinant is 1.
The Rotation matrix is given by
 
x1 · x0 y1 · x0 z1 · x0
R10 =  x1 · y0 y1 · y0 z1 · y0 
x1 · z0 y1 · z0 z1 · z0

Figure 2: Rotation about z0 axis

Suppose in above figure we rotate the frame o1 x1 y1 z1 by an angle θ about


zo -axis and the resultant matrix we are getting is R10 . By convention the
positive sense of angle theta can be given by Right Hand Rule. So we can
say, if we rotate a positive rotation by angle θ degree about z axis then it
would advance a right hand threaded screw along the positive z-axis.

3
3.1 Rotation matrices in 3-D
The basic rotation matrix in 3-D depends on its axis of rotation. We get
different matrix for different axis of rotation. The basic property of rotation
matrix remains the same.
Rotation matrix along z-axis:-
 
cos θ − sin θ 0
Rz,θ =  sin θ cos θ 0
0 0 1

Rotation matrix along y-axis:-


 
cos θ 0 sin θ
Ry,θ = 0 1 0 
− sin θ 0 cos θ
Rotation matrix along x-axis:-
 
1 0 0
Rx,θ = 0 cos θ − sin θ
0 sin θ cos θ

4 Multiple Rotation
When we rotate a vector multiple time subsequently along different axis or
same axis then we call it multiple rotation. In this section we will be finding
the rotation matrix after doing multiple rotation.
Suppose we have vectors of length P 0 , P 1 , P 2 in frame o0 x0 y0 z0 , o1 x1 y1 z1 ,
o2 x2 y2 z2 respectively. Consider rotation of vector P from o0 x0 y0 z0 to o1 x1 y1 z1
to o2 x2 y2 z2 .

P 0 = R10 P 1 (1)
P 1 = R21 P 2 (2)
P 0 = R20 P 2 (3)
We have to find R20 from above equations.
From equation (1) and (2)
P 0 = R10 R21 P 2 (4)

4
Comparing it with equation (3), we can say

R20 = R10 R21 (5)

Let’s take an example of multiple rotation


Suppose we have R which represent rotation by an angle φ about y-axis
followed by a rotation by and angle of θ about z-axis.

Figure 3: Rotation by an angle φ about y-axis

The rotation matrix in 3-D will be


 
cos φ 0 sin φ
Ry,φ =  0 1 0 
− sin φ 0 cos φ

Now we will be rotating it by angle θ along z-axis The rotation matrix for
this particular rotation will be
 
cos θ − sin θ 0
Rz,θ =  sin θ cos θ 0
0 0 1

5
Figure 4: Rotation by an angle θ about z-axis

The final rotation matrix which we will be getting is

R = Ry,φ · Rz,θ
  
cos φ 0 sin φ cos θ − sin θ 0
R= 0 1 0   sin θ cos θ 0
− sin φ 0 cos φ 0 0 1
 
cos θ cos φ − cos φ sin θ sin φ
R= sin θ cos θ 0  (6)
− sin φ cos θ sin φ sin θ cos φ
Now let’s switch the order of rotation i.e We will first rotate by angle θ
0
along z-axis then by angle φ along y-axis. The rotation matrix (R ) which
we will be getting will not be the same as of R.
0
R = Rz,θ · Ry,φ
 
cos θ cos φ − sin θ cos θ sin φ
0
R =  cos φ sin θ cos θ sin φ sin θ  (7)
− sin φ 0 cos φ

6
Here, from equation (6) and (7) we see that Rotation are not commutative
.
0
R 6= R

5 Homogeneous Transformation
Consider the given below Figure 5. Here we have rotated frame oA xA yA by
angle θ to get frame oB xB yB and then we have translated oB xB yB frame by
displacement V~2 to obtain oC xC yC If we know the coordinates of P 3 with re-
spect to frame oC xC yC and we are given the applied rotation and translation
on oC xC yC with respect to oA xA yA , then we can easily find coordinates of
P 3 with respect to oA xA yA . The general form is given by

P 0 = R10 P 1 + d01

The transformation in above given equation defines the Rigid Motion if R is


Orthogonal.

Figure 5: Homogeneous transformation in two dimension

In the given figure (5) we have two Rigid motion i.e

P 1 = R21 P 2 + d12 (8)

and
P 2 = R23 P 3 + d32 (9)

7
By combining the above two equation we can find the third rigid motion

P 1 = R21 R32 P 2 + R21 d23 + d12 (10)


The above general equation becomes very messy if there are multiple
rotation and translation.
A compact and better way of representing rotation and translation is through
Homogeneous Transformation.
 
R d
H=
0 1

For a 3×3 rotation matrix the H matrix would be a 4×4 matrix.


 
R3×3 d3×1
H=
0 11×1 4×4

Now we will be finding transformation matrix for the above given figure

P 1 = H21 P 2 (11)

P 2 = H32 P 3 (12)
From above equation (11) and (12)

P 1 = H21 H32 P 3 (13)

So we can write  1 1  2 2
1 R2 d2 R3 d3
P = P3
0 1 0 1
 1  1 2  
P R2 R3 R21 d23 + d12 P 2
=
1 0 1 1
 1  1 2 2 
P R2 R3 P + R21 d23 + d12
= (14)
1 1
So from equation (10) we can verify that above equation (14) is same as
equation(10)
Hence we can write general equation

P 0 = H10 H21 H32 · · · · · · Hn+1


n
Pn

8
Considering an example, a homogeneous transformation matrix(H) repre-
sents rotation by angle φ along x-axis then translation by a unit along same
axis, then translation by b unit along z-axis and finally rotation by angle θ
about z-axis.
H = Rot x,φ T ransx,a T ransz,b
 Rot
 z,θ   
1 0 0 0 1 0 0 a 1 0 0 0 cos θ − sin θ 0 0
0 cos φ − sin φ 0 0 1 0 0 0 1 0 0  sin θ cos θ 0 0
=  
0 sin φ cos φ 0 0 0 1 0 0 0 1 b   0
 
0 1 0
0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1
finallywe get, 
cos θ − sin θ 0 a
sin φ cos φ cos θ cos φ − sin φ b sin φ 
= sin φ sin θ sin φ cos θ cos φ b cos φ

0 0 0 1

Mostof the generalhomogeneous


 transformation takes the
 form
R3×3 d3×1 Rotation Translation
H= =
f1×3 s1×1 Perspective Scale Factor

You might also like