ECE569 Hw1soln f17
ECE569 Hw1soln f17
These problems are from the textbook by Spong et al.1 , which is the textbook for the ECE580
this Fall 2017 semester. As such, many of the problem statements are taken verbatim from the
text; however, others have been reworded for reasons of efficiency or instruction. Solutions are
mine. Any errors are mine and should be reported to me, [email protected], rather than to the
textbook authors.
2-39 Consider the diagram (Figure 2.14, p. 71). A robot is set up 1 meter from a table. The
table top is 1 meter high and 1 meter square. A frame o1 x1 y1 z1 is fixed to the edge of
the table as shown. A cube measuring 20cm on a side is placed in the center of the table
with frame o2 x2 y2 z2 directly above the center of the block 2 meters above the table top
with frame o3 x3 y3 z3 attached as shown. Find the homogeneous transformations relating
each of these frames to the base frame o0 x0 y0 z0 . Find the homogeneous transformation
relating the frame o2 x2 y2 z2 to the camera frame o3 x3 y3 z3 .
Solution
In the drawing it would appear that the origin of F3 is on the table top; however, in the
description, the origin of F3 is described as being at the center of the cube, thus 10 cm
above the table top. I accepted either interpretation.
We can describe the sequence of frames in words as follows. Frame 1 is obtained from the
fixed frame by translating 1 meter in each of the positive y0 and positive z0 directions.
Frame 2 is obtained from F1 by translating 50 cm in each of the positive y1 and negative
x1 directions and 10 cm in the positive z1 direction.
Frame 3 is obtained from F2 by translating 1.9 m in the positive z2 direction, then rotating
by π2 about the z2 axis and then by π about the y2 axis. Alternatively, it can be obtained
by first rotating by π about the x2 axis and then by π/2 about the z2 axis, or by π about
the y2 axis and then −π/2 about the z2 axis, or . . .
Thus
1 0 0 0
0 1 0 1
H10 =
.
0 0 1 1
0 0 0 1
1 0 0 −1/2
0 1 0 1/2
H21 =
,
0 0 1 1/10
0 0 0 1
so
1 0 0 0 1 0 0 −1/2 1 0 0 −1/2
0 1 0 1 0 1 0 1/2 0 1 0 3/2
H20 = H10 H21 =
= .
0 0 1 1 0 0 1 1/10 0 0 1 11/10
0 0 0 1 0 0 0 1 0 0 0 1
1
Spong, M., S. Hutchinson, and M. Vidyasagar, Robot Modeling and Control, John Wiley & Sons, 2006.
ECE569 Problem Set 1 Solution October 26, 2017 2
0 0 0 1
1 0 0 −1/2 0 1 0 0 0 1 0 −1/2
0 1 0 3/2 1 0 0 0 1 0 0 3/2
H30 = H20 H32 =
= .
0 0 1 11/10 0 0 −1 19/10 0 0 −1 3
0 0 0 1 0 0 0 1 0 0 0 1
Alternatively, we could have directly calculated H30 by summing the displacements and
then applying the rotations. We could then premultiply by (H20 )−1 to obtain H32 . We have
1 0 0 1/2 0 1 0 −1/2 0 1 0 0
0 1 0 −3/2 1 0 0 3/2 1 0 0 0
H32 = (H20 )−1 H30 =
= .
0 0 1 −11/10 0 0 −1 3 0 0 −1 19/10
0 0 0 1 0 0 0 1 0 0 0 1
As noted above, there are many ways to define the rotation from the block frame to the
camera frame. They all have one thing in common. They result in the same transformation
matrix. Here are three examples.
2-40 If the camera in problem 2-39 is rotated 90 degrees about z3 , recompute the transforma-
tions.
Solution
The simplest approach is to define a new camera frame F4 to be the camera frame after
rotation. Then the block to camera transformation H42 is obtained by obtained postmul-
tiplying H32 by H43 = Rotz,π/2 because the rotation is with resepect to the current z3 axis.
Thus
0 1 0 0 0 −1 0 0 1 0 0 0
1 0 0 0 1 0 0 0 0 −1 0 0
H42 = H32 Rotz,π/2 = = .
0 0 −1 19/10 0 0 1 0 0 0 −1 19/10
0 0 0 1 0 0 0 1 0 0 0 1
Interestingly, applying the formula for inverting a homogeneous tranformation we find that
−RT d = d so H42 is its own inverse, and
1 0 0 0
0 −1 0 0
H24 = (H42 )−1 = .
0 0 −1 19/10
0 0 0 1
0 1 0 −1/2 0 −1 0 0 1 0 0 −1/2
1 0 0 3/2 1 0 0 0 0 −1 0 3/2
H40 = H30 Rotz,π/2
= = .
0 0 −1 3 0 0 1 0 0 0 −1 3
0 0 0 1 0 0 0 1 0 0 0 1
ECE569 Problem Set 1 Solution October 26, 2017 4
2-41 If the block in problem 2-39 is rotated π/2 radians about z2 and moved so that its center has
coordinates [0, 0.8, 0.1]T relative to F1 , compute the homogeneous transformation relating
the block frame to the camera frame; the block frame to the base frame.
Solution
In this problem the block is left balancing on the edge of the table – half on and half off.
Since the motion with respect to F1 follows the rotation, which would change the axes, it
must precede the rotation in our composition of transformations. Our new H20 represents
the block frame with respect to the base frame. We have
To get the block frame relative to the camera frame, I first find the base frame with respect
to the camera frame and then follow by the transformation from the base frame to the
block frame. The new H23 (block frame with respect to camera frame) is
0 1 0 −3/2 0 −1 0 0 1 0 0 3/10
= 0 −1
1 0 0 1/2
H23 = H03 H20 = 1 0 0 18/10 0 1/2
.
0 0 −1 3 0 0 1 11/10 0 0 −1 19/10
0 0 0 1 0 0 0 1 0 0 0 1
c 2017 S. Koskie