You are on page 1of 6

# ECE470 Homework #1:

## Rigid Motions and Homogeneous Transformations

Tim Bretl
(due at the beginning of class on Thursday, September 20)
1. Be able to write a rotation matrix by inspection. The orientation of frame k written in the
coordinates of frame j is the rotation matrix
R
j
k
=
_
x
j
k
y
j
k
z
j
k
_
.
Express the orientation of each frame shown in the coordinates of the base frame 0. As always,
assume that frames satisfy the right-hand rule.
x
0
y
0
z
1
x
1
x
0
y
0
z
2
y
2
/3
2. Be able to take dot products and cross products using matrix multiplication. The dot product
v w between two vectors v and w can be found by writing the coordinates of both v and w
with respect to the same coordinate frame, for example as v
0
and w
0
, and then taking the
matrix multiplication
v w = (v
0
)
T
w
0
.
Similarly, the cross product v w can be found by taking the matrix multiplication
v w =

(v
0
)w
0
,
where a is the wedge operation on a R
3
dened by
a =
_
_
0 a
3
a
2
a
3
0 a
1
a
2
a
1
0
_
_
.
In this expression, a
1
, a
2
, a
3
are the elements of a. For the frames dened in Problem 1,
compute the following:
1
(a) the dot product z
1
z
2
(b) the cross product z
1
z
2
(c) the value of z
1
(z
1
z
2
) and of z
2
(z
1
z
2
).
3. Be able to check if a matrix is a rotation matrix. The space of all possible rotation matrices
is the subset of R
33
that is given by
SO(3) =
_
R R
33
: R
T
R = RR
T
= I and det R = +1
_
.
So, the inverse of a rotation matrix is given by its transpose:
R
1
= R
T
for any R SO(3). Notice in particular that
R
1
0
=
_
R
0
1
_
T
.
Another direct consequence is that SO(3) is closed under matrix multiplication, so if R
1

SO(3) and R
2
SO(3), then
R
1
R
2
SO(3) and R
2
R
1
SO(3).
(Notice, however, that in general R
1
R
2
= R
2
R
1
, i.e., rotations do not commute.)
Verify by checking the constraints on SO(3) that each of the matrices you found in Problem 1
is, in fact, a rotation matrix. Also give one example of a 3 3 matrix, any one you want,
that is not a rotation matrix, and prove that it is not.
4. Be able to prove that rotations are rigid-body transformations. A map g : R
3
R
3
is called a
rigid-body transformation if it satises the following two properties:
length is preserved, so that g(v) = v for all vectors v R
3
orientation is preserved, so that g(v w) = g(v) g(w) for all vectors v, w R
3
.
Prove that matrix multiplication by any rotation matrix R SO(3) is a rigid-body transfor-
mation, or in other words that the map g(v) = Rv for v R
3
is a rigid-body transformation.
5. Be able to construct a rotation matrix from Euler Angles. Consider the XYZ body-axis Euler
Angle sequence: frame 1 is generated by a rotation
1
0
, frame 2 is generated by a
rotation
2
1
, and the body-xed frame 3 is generated by a rotation
3
2
.
(a) Write R
0
3
in terms of R
x,
1
, R
y,
2
, and R
z,
3
.
(b) Do the matrix multiplication and write R
0
3
in terms of
1
,
2
, and
3
.
(c) What space-axis Euler Angle sequence would have given the exact same results? Prove
(d) Frame 4 is generated by a rotation
4
0
(not a typo!) and frame 5 is generated
by a rotation
5
4
. Write R
0
5
in terms of R
x,
1
, R
y,
2
, R
z,
3
, R
y,
4
, and R
x,
5
.
2
6. Be able to recover Euler Angles from a rotation matrix. Consider again the XYZ body-axis
Euler Angle sequence. Denote the resulting rotation matrix by
R
0
3
= A =
_
_
A
11
A
12
A
13
A
21
A
22
A
23
A
31
A
32
A
33
_
_
.
(a) Find expressions for
1
,
2
, and
3
in terms of the elements of A, just like we did in class
for the ZXZ Euler Angle sequence.
(b) Find the XYZ Euler Angles for the following rotation matrix.
A =
_
_
0.3536 0.6124 0.7071
0.5732 0.7392 0.3536
0.7392 0.2803 0.6124
_
_
7. Be able to construct a rotation matrix from exponential coordinates. Any rotation matrix
R SO(3) can be generated by a single rotation of some angle about some xed axis
a R
3
, where a = 1. Exponential coordinates are one way to do this. First, recall that the
scalar dierential equation
x = bx
has the solution
x(t) = e
bt
x(0).
As you will learn in a course on linear systems, the analogous matrix dierential equation

R = aR
has the solution
R(t) = e
at
R(0),
where
e
at
= I +at +
(at)
2
2!
+
(at)
3
3!
+ . . .
is called the matrix exponential. As we will see when discussing velocity kinematics in a few
weeks, we may interpret rotation by about a as the result after a body that is initially
aligned with the base frame undergoes constant angular velocity a (of unit magnitude) for
time t = , or in other words simply as
R() = e
a
I = e
a
.
It is a remarkable fact that, in this case, the matrix exponential converges to
e
a
= I +a sin +a
2
(1 cos ) . (1)
In particular, you can think of the matrix exponential as a map from skew-symmetric matrices
to rotation matrices:
e
A
: so(3) SO(3),
where
so(3) =
_
A R
33
: A = A
T
_
.
Using Eq. (1), please do the following:
3
(a) Write the rotation matrix that is generated by rotating an angle = 120

a =
1

3
_
_
1
1
1
_
_
.
(b) An eigenvector v R
3
of a square matrix A R
33
is a column vector that satises
Av = v for some real number R, which we call an eigenvalue. It is a fact that
every rotation matrix has some eigenvector with eigenvalue = 1. Find this eigenvector
eigenvector in general?)
8. Be able to recover exponential coordinates from a rotation matrix. Consider an arbitrary
rotation matrix
A =
_
_
A
11
A
12
A
13
A
21
A
22
A
23
A
31
A
32
A
33
_
_
. (2)
By equating Eq. (2) with Eq. (1), it is easy to show that the equivalent angle and axis are
= cos
1
_
A
11
+ A
22
+ A
33
1
2
_
(3)
and
a =
1
2 sin
_
_
A
32
A
23
A
13
A
31
A
21
A
12
_
_
, (4)
respectively. Note the singularity at = 0, for which a can be chosen arbitrarily. Note also
that (a, ) and (a, ) produce exactly the same rotation matrix.
Consider the frames 1 and 2 that were dened in Problem 1. Assume that frame 1 describes
the current orientation of a robot gripper, and that frame 2 describes the desired orientation
of this gripper. About what single axis should the gripper rotate, and by what angle, in order
to move from its current to desired orientation? (If you think there is more than one possible
9. Be able to write the position and orientation of a frame by inspection. We write the position
and orientation of frame k in the coordinates of frame j as the homogeneous transformation
matrix
H
j
k
=
_
R
j
k
o
j
k
0 1
_
,
where. . .
o
j
k
is the vector from the origin of frame j to the origin of frame k, written in the
coordinates of frame j (it is a 3 1 matrix);
R
j
k
is the orientation of frame k, written in the coordinates of frame j (it is the same
3 3 rotation matrix as before).
Consider the frames shown in Figure 1. Express the position and orientation of frames 1 and
2 in the coordinates of frame 0.
4
x
0
y
0
y
1
z
1
z
2
x
2
3
3
1
p
/6
Figure 1: Frames and a point for Problems 9-11.
10. Be able to perform sequential and inverse homogeneous transformations. For any collection
of frames i, j, and k, we have
H
i
k
= H
i
j
H
j
k
sequential transformation
and
(H
j
k
)
1
=
_
(R
j
k
)
T
(R
j
k
)
T
o
j
k
0 1
_
. inverse transformation
For the frames in Figure 1, nd H
1
2
both by inspection and using the formulas given above,
starting with H
0
1
and H
0
2
from Problem 9. (You should get the same answer.)
11. Be able to perform coordinate transformations (rotation and translation). If a point p has
coordinates p
k
in frame k, then it also has coordinates p
j
in frame j, where
_
p
j
1
_
= H
j
k
_
p
k
1
_
.
Consider the point p that is shown in Figure 1.
(a) Find p
0
, p
1
, and p
2
by inspection.
(b) Find p
1
and p
2
by coordinate transformation, given p
0
and the results of Problem 9.
(c) Find p
2
by homogeneous transformation, given p
1
and the results of Problem 10. (Again,
5
Figure 2: A robot, a camera, a table, and a cube for Problem 12 (taken from our textbook).
12. Be able to put it all together. (This problem is taken from our textbook.) Consider the
diagram in Figure 2. The cube has side length 0.2 and is located at the center of the table
(and is aligned with the table). Note that frame 2 has its origin at the bottom center of the
cube. The camera is directly above the center of the cube.
(a) Express the position and orientation of frames 1, 2, and 3 in the coordinates of frame 0.
(b) Use your answer from part (a) to express the position and orientation of frame 2 in the
coordinates of frame 3 (i.e., to say how the cube looks to the camera).
(c) Say the cube is rotated 90