Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

mls94-complete[1]

.pdf
Скачиваний:
42
Добавлен:
10.06.2015
Размер:
2.8 Mб
Скачать

q

zzab

xab

y

xyab

Figure 2.1: Rotation of a rigid object about a point. The dotted coordinate frame is attached to the rotating rigid body.

the body by giving the relative orientation between a coordinate frame attached to the body and a fixed or inertial coordinate frame. From now on, all coordinate frames will be right-handed unless stated otherwise. Let A be the inertial frame, B the body frame, and xab, yab, zab R3 the coordinates of the principal axes of B relative to A (see Figure 2.1). Stacking these coordinate vectors next to each other, we define a 3 × 3 matrix:

Rab = xab yab zab .

We call a matrix constructed in this manner a rotation matrix: every rotation of the object relative to the ground corresponds to a matrix of this form.

2.1Properties of rotation matrices

A rotation matrix has two key properties that follow from its construction. Let R R3×3 be a rotation matrix and r1, r2, r3 R3 be its columns. Since the columns of R are mutually orthonormal, it follows

that

(1,

if i = j.

 

i j

 

rT r =

0,

if i 6= j

 

As conditions on the matrix R, these properties can be written as

 

RRT = RT R = I.

(2.1)

From this it follows that

det R = ±1.

To determine the sign of the determinant of R, we recall from linear

algebra that

det R = r1T (r2 × r3).

23

Since the coordinate frame is right-handed, we have that r2 × r3 = r1 so that det R = r1T r1 = 1. Thus, coordinate frames corresponding to righthanded frames are represented by orthogonal matrices with determinant 1. The set of all 3 × 3 matrices which satisfy these two properties is denoted SO(3). The notation SO abbreviates special orthogonal. Special refers to the fact that det R = +1 rather than ±1.

More generally, we may define the space of rotation matrices in Rn×n

by

SO(n) = {R Rn×n : RRT = I, det R = +1}.

(2.2)

We will be primarily interested in n = 3, although the n = 2 case (planar rotations) will also prove useful and is explored in the exercises.

SO(3) R3×3 is a group under the operation of matrix multiplication. A set G together with a binary operation defined on elements of G is called a group if it satisfies the following axioms:

1. Closure: If g1, g2 G, then g1 g2 G.

2. Identity: There exists an identity element, e, such that g e = e g = g for every g G.

3.Inverse: For each g G, there exists a (unique) inverse, g1 G, such that g g1 = g1 g = e.

4.Associativity: If g1, g2, g3 G, then (g1 g2) g3 = g1 (g2 g3). In the instance of SO(3), note that

1. If R1, R2 SO(3), then R1R2 SO(3) since

R1R2(R1R2)T = R1R2R2T R1T = R1R1T = I det(R1R2) = det(R1) det(R2) = +1.

2.The identity matrix is the identity element.

3.By equation (2.1) it follows that the inverse of R SO(3) is RT SO(3).

4.The associativity of the group operation follows from the associativity of matrix multiplication; that is, (R1R2)R3 = R1(R2R3).

Thus, SO(3) is a group using the identity matrix I as the identity element and matrix multiplication as the group operation. We refer to SO(3) as the rotation group of R3.

Every configuration of a rigid body that is free to rotate relative to a fixed frame can be identified with a unique R SO(3). Under this identification, the rotation group SO(3) is referred to as the configuration space of the system and a trajectory of the system is a curve R(t) SO(3)

24

for t [0, T ]. More generally, we shall call a set Q a configuration space for a system if every element x Q corresponds to a valid configuration of the system and each configuration of the system can be identified with a unique element of Q.

A rotation matrix R SO(3) also serves as a transformation, taking coordinates of a point from one frame to another. Consider the point q shown in Figure 2.1. Let qb = (xb, yb, zb) be the coordinates of q relative to frame B. The coordinates of q relative to frame A can be computed as follows: since xb, yb, zb R are projections of q onto the coordinate axes of B, which, in turn, have coordinates xab, yab, zab R3 with respect to A, the coordinates of q relative to frame A are given by

qa = xabxb + yabyb + zabzb.

This can be rewritten as

qa = xab yab

zab

yb

= Rabqb.

 

 

xb

 

zb

 

In other words, Rab, when considered as a map from R3 to R3, rotates the coordinates of a point from frame B to frame A.

The action of a rotation matrix on a point can be used to define the action of the rotation matrix on a vector. Let vb be a vector in the frame B defined as vb = qb pb. Then,

Rab(vb) := Rabqb Rabpb = qa pa = va.

Since matrix multiplication is linear, it may be verified that if vb = qb pb = sb rb then we still have that

Rabsb Rabrb = Rabqb Rabpb = va

and hence the action of Rab on a vector is well defined.

Rotation matrices can be combined to form new rotation matrices using matrix multiplication. If a frame C has orientation Rbc relative to a frame B, and B has orientation Rab relative to another frame A, then the orientation of C relative to A is given by

Rac = RabRbc.

(2.3)

Rac, when considered as a map from R3 to R3, rotates the coordinates of a point from frame C to frame A by first rotating from C to B and then from B to A. Equation (2.3) is the composition rule for rotations.

A rotation matrix represents a rigid body transformation in the sense of the definition of the previous section. This is to say, it preserves distance and orientation. We prove this using some algebraic properties

25

of the cross product operation between two vectors. Recall that the cross product between two vectors a, b R3 is defined as

a2b3 a3b2

a × b = a3b1 a1b3 . a1b2 a2b1

Since the cross product by a is a linear operator, b 7→a × b may be represented using a matrix. Defining

(a) =

a3

0

3

 

a1

,

(2.4)

 

 

 

0

a

 

 

a2

 

 

 

we can write

a2

a1

 

0

 

 

 

×

 

 

 

 

 

 

 

 

a

b = (a) b.

 

 

 

 

(2.5)

 

 

 

 

 

 

We will often use the notation a as a replacement for (a) .

 

Lemma 2.1. Given R SO

(3)

and v, w

R3

, the following properties

 

b

 

 

hold:

 

 

 

 

 

 

 

 

 

 

 

R(v × w) = (Rv) × (Rw)

(2.6)

R(w) RT = (Rw) .

 

 

(2.7)

The first property in the lemma asserts that rotation by the matrix R commutes with the cross product operation; that is, the rotation of the cross product of two vectors is the cross product of the rotation of each of the vectors by R. The second property has an interpretation in terms of rotation of an instantaneous axis of rotation, which will become clear shortly. For now, we will merely use it as an algebraic fact. The proof of the lemma is by calculation.

Proposition 2.2. Rotations are rigid body transformations

A rotation R SO(3) is a rigid body transformation; that is,

1.R preserves distance: kRq Rpk = kq pk for all q, p R3.

2.R preserves orientation: R(v × w) = Rv × Rw for all v, w R3. Proof. Property 1 can be verified by direct calculation:

kRq Rpk2 = (R(q p))T (R(q p)) = (q p)T RT R(q p) = (q p)T (q p) = kq pk2.

Property 2 follows from equation (2.6).

26

ω

q(t)

q(0)

Figure 2.2: Tip point trajectory generated by rotation about the ω-axis.

2.2Exponential coordinates for rotation

A common motion encountered in robotics is the rotation of a body about a given axis by some amount. For example, we might wish to describe the rotation of the link of a robot about a fixed axis, as shown in Figure 2.2. Let ω R3 be a unit vector which specifies the direction of rotation and let θ R be the angle of rotation in radians. Since every rotation of the object corresponds to some R SO(3), we would like to write R as a function of ω and θ.

To motivate our derivation, consider the velocity of a point q attached to the rotating body. If we rotate the body at constant unit velocity about

the axis ω, the velocity of the point, q˙, may be written as

 

q˙(t) = ω × q(t) = ωqb (t).

(2.8)

This is a time-invariant linear di erential equation which may be integrated to give

q(t) = eωtb q(0),

where q(0) is the initial (t = 0) position of the point and eωtb is the matrix exponential

eωt = I + ωt + (ωt)2 +

(ωt)3

+

 

b

b

b

 

· · ·

 

2!

3!

 

 

It follows that if we rotate

about the axis ω at unit velocity for θ units

b

 

 

 

of time, then the net rotation is given by

 

 

 

 

R(ω, θ) = eωθb .

 

(2.9)

From its definition, it is easy to see that the matrix ωb is a skewsymmetric matrix, i.e., it satisfies ωbT = ωb. The vector space of all 3 ×3

27

skew matrices is denoted so(3) and more generally the space of n × n skew-symmetric matrices is

so(n) = {S Rn×n : ST = S}.

(2.10)

(The reason for the notation so(n) will become clear shortly.)

As with

SO(n), the cases we are interested in are n = 2 and n = 3. We concentrate on n = 3 here and explore n = 2 in the exercises.

The set so(3) R3×3 is a vector space over the reals. Thus, the sum of two elements of so(3) is an element of so(3) and the scalar multiple of any element of so(3) is an element of so(3). Furthermore, we can identify so(3) with R3 using the relationship (2.4) and the fact (v + w) = vb + wb.

It will be convenient to represent a skew-symmetric matrix as the product of a unit skew-symmetric matrix and a real number. Given a

matrix ω so(3), kωk = 1, and a real number θ R, we write the exponential of ωθ as

b

b

 

ωθ

 

θ2

 

2

 

θ3

 

3

 

 

 

exp(ωθ) = eb

= I + θω +

 

2!

ω

 

+

 

3!

ω

 

+ . . .

(2.11)

 

 

b

 

b

 

 

b

 

 

 

 

b

 

 

 

Equation (2.11) is an infinite series and, hence, not useful from a computational standpoint. To obtain a closed-form expression for exp(ωθb ), we make use of the following formulas for powers of ba, which are verified by direct calculation.

Lemma 2.3. Given ba so(3), the following relations hold:

 

 

 

 

 

a2 = aaT − kak2I

 

 

 

 

 

 

 

(2.12)

 

 

 

 

 

a3

 

2

 

 

 

 

 

 

 

 

 

(2.13)

 

 

 

 

 

b

= −kak a

 

 

 

 

 

 

 

 

 

 

 

 

be calculated recursively.

 

 

 

and higher powers of a can b

 

 

b

 

 

 

 

 

 

 

 

Utilizing this

lemma with

a = ωθ, kωk = 1, equation (2.11) becomes

 

 

b

+ 5!

 

eωθb = I + θ 3!

 

− · · ·

ω + 2!

4! +

6! − · · ·

ω2

 

 

 

θ3

θ5

 

b

θ2

 

θ4

θ6

b

and hence

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

eωθb

= I + ω sin θ + ω2(1 cos θ)

 

 

 

(2.14)

 

 

 

 

 

 

 

b

 

b

 

 

 

 

 

 

 

 

This formula, commonly referred to as Rodrigues’ formula, gives an e - cient method for computing exp(ωθb ). When kωk 6= 1, it may be verified (see Exercise 12) that

eωθb

 

ω

 

ω2

= I + kωk sin(kωkθ) + kωk2 1 cos(kωkθ) .

 

 

b

 

b

We now verify that exp(ωθb ) is indeed a rotation matrix.

28

Proposition 2.4. Exponentials of skew matrices are orthogonal

Given a skew-symmetric matrix ωb so(3) and θ R,

eωθb SO(3).

Proof. Defining R := exp(ωθb ), we must verify that RT R = I and det R = +1. To verify the first property, we have the following chain of equalities, which can be checked using equation (2.14),

heωθb i1 = eωθb = eωbT θ = heωθb iT .

Thus R1 = RT and consequently RT R = I as desired. From this, it follows that det R = ±1. Using the continuity of the determinant as a function of the entries of a matrix, combined with continuity of the exponential map and the fact that det exp(0) = 1, we conclude that det R = +1.

Proposition 2.4 asserts that the exponential map transforms skewsymmetric matrices into orthogonal matrices. Geometrically, the skewsymmetric matrix corresponds to an axis of rotation (via the mapping ω 7→ωb) and the exponential map generates the rotation corresponding to rotation about the axis by a specified amount θ. This relationship between skew-symmetric matrices and orthogonal matrices explains, in part, the notation so(3). We will now show that every rotation matrix can be represented as the matrix exponential of some skew-symmetric matrix; that is, the map exp : so(3) SO(3) is surjective (onto).

Proposition 2.5. The exponential map is surjective onto SO(3)

Given R SO(3), there exists ω R3, kωk = 1 and θ R such that

R = exp(ωθb ).

Proof. The proof is constructive. We equate terms of R and exp(ωθb ) and solve the corresponding equations. By way of notation, we have the rotation matrix R to be

r11

r12

r13

 

 

r31

r32

r33

 

R = r21

r22

r23

.

(2.15)

Defining vθ = 1 cos θ, cθ = cos θ, and sθ = sin θ, write equation (2.14)

29

as

eωθb = I + ω sin θ + ω2(1 cos θ)

 

 

 

 

 

 

 

 

 

 

 

 

b

 

 

 

b

 

 

 

 

2

2

 

2 3 θ 2

1

2

 

 

1 vθ 22 + ω32)

 

 

 

1

 

3

 

 

 

ω1

23 θ

2 θ

ω2

ω3vθ

+ ω1sθ

 

1 vθ 1 + ω2 )

=

 

ω1

ω2vθ + ω3sθ

1 vθ (ω + ω ) ω ω v ω sθ

 

 

 

 

 

ω v

 

ω s

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ω

v

 

+ c

 

ω

ω2vθ

ω3sθ

ω1ω3vθ + ω2sθ

 

 

 

=

ω1

 

1

 

θ

 

θ

 

1

2

 

 

 

 

ω

ω3 vθ + cθ

 

.

 

ω3vθ

ω2sθ

ω2

ω3vθ

+ ω1sθ

 

 

 

1

 

2

θ

 

3

θ

 

2

θ

 

 

θ

 

2

2

 

 

 

(2.16)

Equating (2.15) with (2.16), we see that

trace(R) = r11 + r22 + r33 = 1 + 2 cos θ.

To verify that this equation has a solution, we recall that the trace of R is equal to the sum of its eigenvalues. Since R preserves lengths and det R = +1, its eigenvalues have magnitude 1 and occur in complex conjugate pairs (see Exercise 3). It follows that 1 trace(R) 3 and

hence we can set

 

R)

1

.

 

 

 

θ = cos1

trace(

 

(2.17)

2

 

 

Note that there is an ambiguity in the value of θ, in the sense that θ ±2πn or θ ± 2πn could be chosen as well.

Now, equating the o -diagonal terms of R and exp(ωθb ), we get

r32 r23 = 2ω1sθ r13 r31 = 2ω2sθ

r21 r12 = 2ω3sθ .

If θ 6= 0, we choose

 

 

r23

 

 

 

1

 

r32

 

 

(2.18)

ω =

 

 

r13

r31

 

.

2s

 

 

 

θ

r21

r12

 

 

Note that if 2π θ had been chosen earlier in equation (2.17), the axis of rotation would have been ω. Indeed, the exponential map is a many- to-one map from R3 onto SO(3). If R = I, then trace(R) = 3 and hence θ = 0 and ω can be chosen arbitrarily. If R 6= I, the above construction shows that there are two distinct ω and θ [0, 2π) such that R = exp(ωθb ).

The components of the vector ωθ R3 given by equations (2.17) and (2.18) are called the exponential coordinates for R. Considering ω R3 to be an axis of rotation with unit magnitude and θ R to be an angle, Propositions 2.4 and 2.5 combine to give the following classic theorem.

30

31

Theorem 2.6 (Euler). Any orientation R SO(3) is equivalent to a rotation about a fixed axis ω R3 through an angle θ [0, 2π).

This method of representing a rotation is also known as the equivalent axis representation. We note from the preceding proof that this representation is not unique since choosing ω= ω and θ= 2π θ gives the same rotation as ω and θ. Furthermore, if we insist that ω have unit magnitude, then ω is arbitrary for R = I (by choosing θ = 0). The former problem is a consequence of the exponential map being many-to-one and the latter is referred to as a singularity of the equivalent axis representation, alluding to the fact that one may lose smooth dependence of the equivalent axis as a function of the orientation R at R = I.

2.3Other representations

The exponential coordinates are called the canonical coordinates of the rotation group. Other coordinates for the rotation group also exist and are briefly described below and in the exercises. We emphasize the connection of these other representations with the exponential coordinates presented above; more classical treatments of these representations can be found in standard kinematics texts.

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 Rab(α, β, γ) and the triple of angles (α, β, γ) is used to represent the rotation.

The angles (α, β, γ) are called the ZYZ Euler angles. Since all rotations are performed about the principal axes of the moving frame, we define the following elementary rotations about the x-, y-, and z-axes:

 

1

0

 

 

 

0

 

Rx(φ) := exφ = 0

cos φ

sin φ ,

b

0

 

 

 

 

 

sin φ

 

cos φ

 

cos β

 

0

 

sin β

Ry(β) := eyβ =

0

 

1

 

0

,

b

sin β

 

0

 

cos β

and

 

 

z

cos α

sin α

0

Rz(α) := e α =

sin α

cos α

0 .

b

 

0

 

0

 

 

1

 

 

 

 

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

Rba = Rz(γ)Ry(β)Rz(α).

Inverting this expression gives the rotation matrix of B relative to A:

Rab = Rz(α)Ry(β)Rz(γ)

 

 

.

 

=

sαcβ cγ + cαsγ

 

sαcβ sγ + cαcγ

sαsβ

(2.19)

 

 

cαcβ cγ sαsγ

cαcβ sγ sαcγ

cαsβ

 

 

sβ cγ

sβ sγ

cβ

 

Here cα, sα are abbreviations for cos α and sin α, respectively, and similarly for the other terms.

It is clear that any matrix of the form in equation (2.19) is an orthogonal matrix (since it is a composition of elementary rotations). As in the case of the exponential map, the converse question of whether the map from (α, β, γ) SO(3) is surjective is an important one. The answer to this question is a rmative: given a rotation R SO(3), the Euler angles can be computed by solving equation (2.19) for α, β, and γ. For example, when sin β 6= 0, the solutions are

β = atan2(q

 

, r33)

 

r312 + r322

(2.20)

α = atan2(r23

/sβ , r13/sβ )

 

γ = atan2(r32

/sβ , r31/sβ ),

 

where atan2(y, x) computes tan1(y/x) but uses the sign of both x and y to determine the quadrant in which the resulting angle lies.

ZYZ Euler angles are an example of a local parameterization of SO(3). As in the case of the equivalent axis representation, singularities in the parameterization (referring to the lack of existence of global, smooth solutions to the inverse problem of determining the Euler angles from the rotation) occur at R = I, the identity rotation. In particular, we note that (α, β, γ) of the form (α, 0, α) yields Rab(α, 0, α) = I. Thus, there are infinitely many representations of the identity rotation in the ZYZ Euler angles parameterization.

Other types of Euler angle parameterizations may be devised by using di erent ordered sets of rotation axes. Common choices include ZYX axes (Fick angles) and YZX axes (Helmholtz angles). The ZYX Euler angles are also referred to as the yaw, pitch, and roll angles, with Rab defined by rotating about the x-axis in the body frame (roll), then the y-axis in the body frame (pitch), and finally the z-axis in the body frame (yaw). Both the ZYX and YZX Euler angle parameterizations have the advantage of

32

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]