2 Screw Rotations: 2.1 Rotation About An Arbitrary Axis
2 Screw Rotations: 2.1 Rotation About An Arbitrary Axis
Purpose: The purpose of this chapter is to introduce you to screw rotations. The screw rotation allows you to rotate a rigid body (or a frame representing the body pose) about an arbitrary axis in space and then determine the final pose of the body. This chapter also demonstrates that it is possible to move a body from any initial pose to any final pose with a single screw rotation and a proportional lead distance taken along a z unique screw axis in space.
kzkx v + ky s kzky v - kx s kz 2 v +c
(2.1)
and where kx, ky, and kz = direction cosines of k v = 1 - c s= sin c = cos We will not drive (2.1), but show you the typical steps applied to derive (2.1). We arbitrarily select a frame xyz such that its z axis initially aligns with the k unit vector direction. Thus, rotating about the k axis is equivalent to rotating the xyz axes described by C relative to xyz (base frame) around the z axis where C is (versine of )
2-1
ax ay C= az 0
or C= and where a 0
bx by bz 0
cx cy cz 0
0 0 0 1
b 0
c 0
0 1
bx ax cx a a = y , b = by , c = cy = k az cz bz
are the direction cosines of the x, y, and z axes, respectively, with respect to the base coordinates. Next, we rotate about the z axis to the x"y"z" axes - see the following figure:
y y" z, z" x" x
Figure 2-2 This operation can be described by the transformation H (R (z,)) where
cos sin H= 0 0
-sin cos 0 0
0 0 1 0
0 0 0 1
(2.2)
H describes the x"y"z" frame relative to the xyz frame. Now let u be a vector in xyz which has components v in xyz before rotation about z axis. Then u = Cv (2.3)
2-2
Now, rotating about the z axis, vector v rotates to vector w. The components of v in xyz are the same as the components of w in x"y"z". The components of w in the xyz frame are w = Hv To determine the coordinates of w in the xyz coordinates (call this vector r ), r = Cw = CHv but v = C-1 u so therefore r = CHC-1 u (2.7) (2.6) (2.5) (2.4)
Thus rotation about the z axis located by k = c rotates vector u to vector r by the transformation CHC-1. That (2.7) is equivalent to (2.1) can be shown by performing CHC-1 where ax ay az 0 bx by bz 0 = CT = cx cy cz 0 0 0 0 1
C-1
(2.8)
and simplifying using the right hand relationship c = a x b and k = c (see Paul1, pp 2529).
where a, b, c are the direction cosines of the rotated axes with respect to the unrotated or base axes. Equating (2.9) to (2.1), [a b c] = R (k,) (2.10)
2-3
we determine 9 simultaneous equations for the solution of kx, ky, kz and . This only involves 3 unknowns since kx2 + k y2 + k z2 = 1 Following the solution in Paul, pp 30-32, sum the diagonal terms
2 2 ax + by + cz = k2 x + ky + kz v + 3 c = v + 3 c = 1 + 2 c
(2.11) (2.12)
giving
Thus
(2.13)
Note that, at this point, equation (2.13) does not provide a unique . Next, we obtain expressions for kx, ky, kz by differencing pairs of off-diagonal terms in (2.10) ay - bx = 2 kz s cx - az = 2 ky s bz - cy = 2 kx s Squaring and adding, (2.14a) (2.14b) (2.14c)
ay - bx 2 + cx - az 2 + bz - cy 2 = 4sin 2
giving,
sin = 1 2 ay - bx 2 + cx - az 2 + bz - cy 2
(2.15)
(2.15) again specifies a non-unique soln for , but if we require that k and be chosen such that the first solution is such that 0 180o , then sin assumes the positive (+) value in (2.15). k and can always be chosen such that 0 180o ; see the geometric example below (simplified to rotation about the z axis).
> 180o
Equivalent
2-4
y x
k y -z
Figure 2-3 Equivalent screw axis With 0 180o , (2.12) and (2.15) provide a unique solution for since sin and cos identify the correct quadrant
(use atan2)
(2.16)
Given the correct value, the components of k may be determined using (2.14a) - (2.15c). Numerical problems may exist as 0o or 180o . For small 0o , the numerator and denominators in
kx =
ky =
bz - cy 2 s
cx - az 2 s
(2.17a)
(2.17b)
kz =
ay - bx 2 s
(2.17c)
are both 0 and thus ill defined. Paul suggests that k be renormalized to ensure k = 1. If 180o , then s 0. Thus, we will apply a different soln for > 90o . First, we equate the diagonal elements in (2.10) to obtain, k2 x v + c = ax (2.18a)
2-5
k2 y v + c = by
k2 z v + c = cz Expanding v = 1 - cos and solving for kx , ky , kz,
kx = ax - c 1 - c
(2.18b) (2.18c)
(2.19a)
ky =
by - c 1 - c
cz - c 1 - c
(2.19b)
kz =
(2.19c)
Since sin 0 , the proper radical signs for kx , ky , kz can be determined from the sign of bz cy, cx az, and ay bx, respectively, in equations (2.14a) - (2.14c). For accuracy, only the largest k is determined from (2.19) -- Why?. The remaining k are determined by pairs of off-diagonal elements in (2.10) to get
ay + bx = 2 kx ky v bz + cy = 2 ky kz v
az + cx = 2 kzkx v
These equations can be solved for the other k, avoiding the square root calculations of (2.19) and avoiding numerical difficulties at = 180o (v = 2).
Euler angles describe any possible orientation by a sequence of 3 rotations, about z, about y', and about z" as shown in Figure 2-4.
2-6
Figure 2-4 Eulers rotations Now any vector in w in x"y"z" axes can be described in base xyz axes after rotations , , and by the following sequence of operations.
cos -sin 0 v = sin cos 0 w 0 0 1 cos 0 u= -sin 0 sin 1 0 v 0 cos
cos -sin 0 q = sin cos 0 u 0 0 1 Thus, the coordinates q of point w in base xyz axes after rotations , ,and are
cos -sin 0 cos 0 sin q = sin cos 0 0 1 0 0 0 1 -sin 0 cos cos -sin sin cos 0 0 0 0 w 1
c c c -s s q = s c c + c s -s c
-c c s -s c -s c s + c c s s
c s s s w c
(2.21)
2-7
The transformation sequence can be viewed relative to the base coordinates in the sequence , , and and written as q = R(,z) R(,y) R(,z) Roll, Pitch, Yaw (, , ): The usual order is roll about z, pitch about y, and yaw about x x yaw z roll pitch y Figure 2-5 Roll, pitch, yaw rotations The transformation sequence to locate w in base axes as vector q is
c s c + s s s s c - c s w c c
(2.22)
q = s c -s
s s s + c c c s
where n = k if h = kT p > 0 and x is any point in the plane. If h < 0, then let n = -k such that h > 0. Given this normal, "outward" form, the screw translation distance d can be calculated from the projection distance of P onto the defined plane by d = | nT p - h | 2-8 (2.24)
Special cases: If k such that d = 0 then both P and P lie in the plane and no translation is required, i.e., the screw displacement reduces to pure rotation only. If zero but d 0, then the screw displacement reduces to pure translation only. Locating the screw axis requires the frame locations of xyz relative to XYZ -- call this C - and xyz relative to XYZ -- call this C. Given C and C the frame locating xyz relative to xyz is C-1 C. The intersection point of the screw axis S with the orthogonal plane can be determined by the procedures depicted in the following figure.
2-9
S n P p v k p d h q P
Figure 2-7 Determining a point on the screw axis Let q = intersection point of S with plane and v = projection point of P onto plane described by nT x = h where v = p - dn so that v = p - (nT p - h) n (2.25)
Now given p and p, q can be located in global XYZ axes by referring to the following figure, a normal view of the plane of interest
r /2 L/2 a
q /2
q p r eL ea
L/2 v v
Figure 2-8 Determining q by the rotation triangle
2-10
Define L = | v - p | = norm = coord differences 2 If 0 < < 180 then can be located by determining the unit vector normal to the vector v - p and lying in the plane. Call this unit vector ea where a is the minimum distance between q and the line between p and v. .
a = L / tan 2 2
( 0)
ea defined by ea = k x eL = k x (v - p)/L Given ea, q is determined by q = aea + (p + v)/2 For the special case = 180o , q = (p + v)/2. For the special case = 0, q = p. (2.27) (2.26)
2-11