ECE5463: Introduction to Robotics Lecture Note 3...

30
ECE5463: Introduction to Robotics Lecture Note 3: Rotational Motion Prof. Wei Zhang Department of Electrical and Computer Engineering Ohio State University Columbus, Ohio, USA Spring 2018 Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 1 / 30

Transcript of ECE5463: Introduction to Robotics Lecture Note 3...

Page 1: ECE5463: Introduction to Robotics Lecture Note 3 ...zhang/RoboticsClass/docs/LN3_RotationalMotion.pdf · ECE5463: Introduction to Robotics Lecture Note 3: Rotational Motion Prof.

ECE5463: Introduction to Robotics

Lecture Note 3: Rotational Motion

Prof. Wei Zhang

Department of Electrical and Computer EngineeringOhio State UniversityColumbus, Ohio, USA

Spring 2018

Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 1 / 30

Page 2: ECE5463: Introduction to Robotics Lecture Note 3 ...zhang/RoboticsClass/docs/LN3_RotationalMotion.pdf · ECE5463: Introduction to Robotics Lecture Note 3: Rotational Motion Prof.

Outline

• Mathematics of Rigid Body Transformation

• Rotation Matrix and SO(3)

• Euler Angles and Euler-Like Parameterizations

• Exponential Coordinate of SO(3)

• Quaternion Representation of Rotation

Outline Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 2 / 30

Page 3: ECE5463: Introduction to Robotics Lecture Note 3 ...zhang/RoboticsClass/docs/LN3_RotationalMotion.pdf · ECE5463: Introduction to Robotics Lecture Note 3: Rotational Motion Prof.

Rigid Body Transformation

• Object (Body) in R3: a collection of points, represented by a subset O ⊂ R3

• Transformation of a body: A single mapping g : O → R3 which maps thecoordinates of points in the body from their initial to final configurations.

• Transformation on points induce an action on vectors in a natural way. Givena transformation g : O → R3, define

g(v) , g(q)− g(p), where v = q − p

- Note: g has a different domain than g

Rigid Body Transformation Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 3 / 30

Page 4: ECE5463: Introduction to Robotics Lecture Note 3 ...zhang/RoboticsClass/docs/LN3_RotationalMotion.pdf · ECE5463: Introduction to Robotics Lecture Note 3: Rotational Motion Prof.

Rigid Body Transformation

• Rigid Body Transformation: A mapping g : R3 → R3 is called a rigid bodytransformation if it satisfies the following two properties

1. Length preserved: ‖g(q)− g(p)‖ = ‖q − p‖, for all p, q ∈ R3

2. Cross product is preserved: g(v × w) = g(v)× g(w), for all v, w ∈ R3.

• Implications:

- Inner product is preserved:

g(v)T g(w) = vTw, for all v, w ∈ R3

- Angles between vectors are preserved

- Orthogonal vectors are transformed to orthogonal vectors

- Right-handed coordinate frames are transformed to right-handed coordinateframes

Rigid Body Transformation Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 4 / 30

Page 5: ECE5463: Introduction to Robotics Lecture Note 3 ...zhang/RoboticsClass/docs/LN3_RotationalMotion.pdf · ECE5463: Introduction to Robotics Lecture Note 3: Rotational Motion Prof.

Outline

• Mathematics of Rigid Body Transformation

• Rotation Matrix and SO(3)

• Euler Angles and Euler-Like Parameterizations

• Exponential Coordinate of SO(3)

• Quaternion Representation of Rotation

Rotation Matrix and SO(3) Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 5 / 30

Page 6: ECE5463: Introduction to Robotics Lecture Note 3 ...zhang/RoboticsClass/docs/LN3_RotationalMotion.pdf · ECE5463: Introduction to Robotics Lecture Note 3: Rotational Motion Prof.

Representation of Orientation68 3.2. Rotations and Angular Velocities

xs

ys

zs

p

xb

yb

zb

Figure 3.6: Mathematical description of position and orientation.

representation of rotations is provided by the exponential coordinates, whichdefine an axis of rotation and the angle rotated about that axis. We leaveother popular representations of orientations (the three-parameter Euler an-gles and the roll–pitch–yaw angles, the Cayley–Rodrigues parameters,and the unit quaternions, which use four variables subject to one constraint)to Appendix B.

We then examine the six-parameter exponential coordinates for the config-uration of a rigid body that arise from integrating a six-dimensional twist con-sisting of the body’s angular and linear velocities. This representation followsfrom the Chasles–Mozzi theorem which states that every rigid-body displace-ment can be obtained by a finite rotation and translation about a fixed screwaxis.

We conclude with a discussion of forces and moments. Rather than treatthese as separate three-dimensional quantities, we merge the moment and forcevectors into a six-dimensional wrench. The twist and wrench, and rules formanipulating them, form the basis for the kinematic and dynamic analyses insubsequent chapters.

3.2 Rotations and Angular Velocities

3.2.1 Rotation Matrices

We argued earlier that, of the nine entries in the rotation matrix R, only threecan be chosen independently. We begin by expressing a set of six explicit con-straints on the entries of R. Recall that the three columns of R correspond to

May 2017 preprint of Modern Robotics, Lynch and Park, Cambridge U. Press, 2017. http://modernrobotics.org

• Basic Reference Frames:

- Fixed (or Space) Frame: {s} = {xs, ys, zs}- Body Frame:{b} ={xb, yb, zb}

• Let xsb, ysb and zsb be the coordinate of xb, yb, zb in frame {s}

Rotation Matrix and SO(3) Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 6 / 30

Page 7: ECE5463: Introduction to Robotics Lecture Note 3 ...zhang/RoboticsClass/docs/LN3_RotationalMotion.pdf · ECE5463: Introduction to Robotics Lecture Note 3: Rotational Motion Prof.

Rotation Matrix

• Let Rsb =[xsb ysb zsb

]

• Rsb constructed above is called a rotation matrix. We know:

- RTsbRsb = I

- det(Rsb) = 1

Rotation Matrix and SO(3) Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 7 / 30

Page 8: ECE5463: Introduction to Robotics Lecture Note 3 ...zhang/RoboticsClass/docs/LN3_RotationalMotion.pdf · ECE5463: Introduction to Robotics Lecture Note 3: Rotational Motion Prof.

Special Orthogonal Group

• Special Orthogonal Group: Space of Rotation Matrices in Rn is defined as

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

• SO(n) is a group. We are primarily interested in SO(3) and SO(2), rotationgroups of R3 and R2, respectively.

• Group is a set G, together with an operation •, satisfying the followinggroup axioms:

- Closure: a ∈ G, b ∈ G⇒ a • b ∈ G

- Associativity: (a • b) • c = a • (b • c), ∀a, b, c ∈ G

- Identity element: ∃e ∈ G such that e • a = a, for all a ∈ G.

- Inverse element: For each a ∈ G, there is a b ∈ G such that a • b = b • a = e,where e is the identity element.

Rotation Matrix and SO(3) Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 8 / 30

Page 9: ECE5463: Introduction to Robotics Lecture Note 3 ...zhang/RoboticsClass/docs/LN3_RotationalMotion.pdf · ECE5463: Introduction to Robotics Lecture Note 3: Rotational Motion Prof.

Use of Rotation Matrix

• Representing an orientation: Rab =[xab yab zab

]

• Changing the reference frame:

- pa = Rabpb

- Rac = RabRbc

• Rotating a vector or a frame:

- Theorem (Euler):Any orientation R ∈ SO(3) is equivalent to a rotation about afixed axis ω ∈ R3 through an angle θ ∈ [0, 2π)

R = Rot(ω, θ)

Rotation Matrix and SO(3) Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 9 / 30

Page 10: ECE5463: Introduction to Robotics Lecture Note 3 ...zhang/RoboticsClass/docs/LN3_RotationalMotion.pdf · ECE5463: Introduction to Robotics Lecture Note 3: Rotational Motion Prof.

Pre-multiplication vs. Post-multiplication

• Given R ∈ SO(3), we can always find ω and θ such that R = Rot(ω, θ).

• Premultiplying by R yields a rotation about an axis ω considered in the fixedframe;

• Postmultiplying by R yields a rotation about ω considered in the body frameChapter 3. Rigid-Body Motions 75

xy

z90◦

90◦

90◦

R = Rot(z, 90◦)

x

yz

{s}xs ys

zs

{b}

xb

yb

zb

zs

zb

Rsb = RRsb

Rsb = RsbR

{b }

xb

yb

zb

{b }

xb

ybzb

fixed framerotation

body framerotation

Figure 3.9: (Top) The rotation operator R = Rot(z, 90◦) gives the orientation ofthe right-hand frame in the left-hand frame. (Bottom) On the left are shown a fixedframe {s} and a body frame {b}, which can be expressed as Rsb. The quantity RRsbrotates {b} by 90◦ about the fixed-frame axis zs to {b′}. The quantity RsbR rotates{b} by 90◦ about the body-frame axis zb to {b′′}.

frame after a rotation by θ about ωb = ω (the rotation axis ω is considered to bein the body frame {b}), representations of these new frames can be calculatedas

Rsb′ = rotate by R in {s} frame (Rsb) = RRsb (3.23)

Rsb′′ = rotate by R in {b} frame (Rsb) = RsbR. (3.24)

In other words, premultiplying by R = Rot(ω, θ) yields a rotation about anaxis ω considered to be in the fixed frame, and postmultiplying by R yields arotation about ω considered as being in the body frame.

Rotation by R in the {s} frame and in the {b} frame is illustrated in Fig-ure 3.9.

To rotate a vector v, note that there is only one frame involved, the frame

May 2017 preprint of Modern Robotics, Lynch and Park, Cambridge U. Press, 2017. http://modernrobotics.org

Rotation Matrix and SO(3) Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 10 / 30

Page 11: ECE5463: Introduction to Robotics Lecture Note 3 ...zhang/RoboticsClass/docs/LN3_RotationalMotion.pdf · ECE5463: Introduction to Robotics Lecture Note 3: Rotational Motion Prof.

Coordinate System for SO(3)

• How to parameterize the elements in SO(3)?

• The definition of SO(3) corresponds to implicit representation:

R ∈ R3×3, RRT = I, det(R) = 1

.

- 6 independent equations with 9 unknowns

- Dimension of SO(3) is 3.

Rotation Matrix and SO(3) Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 11 / 30

Page 12: ECE5463: Introduction to Robotics Lecture Note 3 ...zhang/RoboticsClass/docs/LN3_RotationalMotion.pdf · ECE5463: Introduction to Robotics Lecture Note 3: Rotational Motion Prof.

Outline

• Mathematics of Rigid Body Transformation

• Rotation Matrix and SO(3)

• Euler Angles and Euler-Like Parameterizations

• Exponential Coordinate of SO(3)

• Quaternion Representation of Rotation

Euler Angles Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 12 / 30

Page 13: ECE5463: Introduction to Robotics Lecture Note 3 ...zhang/RoboticsClass/docs/LN3_RotationalMotion.pdf · ECE5463: Introduction to Robotics Lecture Note 3: Rotational Motion Prof.

Euler Angle Representation of RotationPARAMETERIZATIONS OF ROTATIONS 47

ya ya, yb

x0

φ

zb

θy0

za

yb

x1

y1

ψzb, z1

xa

z0, za

xa

xb

(2)(1) (3)

xb

Fig. 2.11 Euler angle representation.

degrees-of-freedom and thus at most three quantities are required to specify itsorientation. This can be easily seen by examining the constraints that governthe matrices in SO(3):

i

r2ij = 1, j ∈ {1, 2, 3} (2.25)

r1ir1j + r2ir2j + r3ir3j = 0, i 6= j (2.26)

Equation (2.25) follows from the fact the the columns of a rotation matrixare unit vectors, and Equation (2.26) follows from the fact that columns of arotation matrix are mutually orthogonal. Together, these constraints define sixindependent equations with nine unknowns, which implies that there are threefree variables.

In this section we derive three ways in which an arbitrary rotation can berepresented using only three independent quantities: the Euler Angle repre-sentation, the roll-pitch-yaw representation, and the axis/angle representa-tion.

2.5.1 Euler Angles

A common method of specifying a rotation matrix in terms of three independentquantities is to use the so-called Euler Angles. Consider the fixed coordinateframe o0x0y0z0 and the rotated frame o1x1y1z1 shown in Figure 2.11. We canspecify the orientation of the frame o1x1y1z1 relative to the frame o0x0y0z0 bythree angles (φ, θ, ψ), known as Euler Angles, and obtained by three successiverotations as follows: First rotate about the z-axis by the angle φ. Next rotateabout the current y-axis by the angle θ. Finally rotate about the current z-axisby the angle ψ. In Figure 2.11, frame oaxayaza represents the new coordinateframe after the rotation by φ, frame obxbybzb represents the new coordinateframe after the rotation by θ, and frame o1x1y1z1 represents the final frame,after the rotation by ψ. Frames oaxayaza and obxbybzb are shown in the figureonly to help you visualize the rotations.

• Euler angle representation:

- Start with {b} coincident with {s}

- Rotate {b} about zb by an angle α, then rotate about the (new) yb axis by β,and then rotate about the (new) zb axis by γ. This yields a net orientationRsb(α, β, γ) parameterized by the ZYZ angles (α, β, γ)

- Rsb(α, β, γ) = Rz(α)Ry(β)Rz(γ)

Euler Angles Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 13 / 30

Page 14: ECE5463: Introduction to Robotics Lecture Note 3 ...zhang/RoboticsClass/docs/LN3_RotationalMotion.pdf · ECE5463: Introduction to Robotics Lecture Note 3: Rotational Motion Prof.

Other Euler-Like Parameterizations

• Other types of Euler angle parameterization can be devised using differentordered sets of rotation axes

• Common choices include:

- ZYX Euler angles: also called Fick angles or yaw, pitch and roll angles

- YZX Euler angles (Helmholtz angles)50 RIGID MOTIONS AND HOMOGENEOUS TRANSFORMATIONS

x0

Yaw

Roll

y0

z0

Pitch

Fig. 2.12 Roll, pitch, and yaw angles.

the fixed frame, the resulting transformation matrix is given by

RXY Z = Rz,φRy,θRx,ψ

=

cφ −sφ 0sφ cφ 00 0 1

cθ 0 sθ0 1 0−sθ 0 cθ

1 0 00 cψ −sψ0 sψ cψ

=

cφcθ −sφcψ + cφsθsψ sφsψ + cφsθcψsφcθ cφcψ + sφsθsψ −cφsψ + sφsθcψ−sθ cθsψ cθcψ

(2.39)

Of course, instead of yaw-pitch-roll relative to the fixed frames we could alsointerpret the above transformation as roll-pitch-yaw, in that order, each takenwith respect to the current frame. The end result is the same matrix as inEquation (2.39).

The three angles, φ, θ, ψ, can be obtained for a given rotation matrix using amethod that is similar to that used to derive the Euler angles above. We leavethis as an exercise for the reader.

2.5.3 Axis/Angle Representation

Rotations are not always performed about the principal coordinate axes. Weare often interested in a rotation about an arbitrary axis in space. This pro-vides both a convenient way to describe rotations, and an alternative parame-terization for rotation matrices. Let k = (kx, ky, kz)

T , expressed in the frameo0x0y0z0, be a unit vector defining an axis. We wish to derive the rotationmatrix Rk,θ representing a rotation of θ about this axis.

There are several ways in which the matrix Rk,θ can be derived. Perhaps the

simplest way is to note that the axis define by the vector k is along the z-axisfollowing the rotational transformation R0

1 = Rz,αRy,β . Therefore, a rotation

Euler Angles Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 14 / 30

Page 15: ECE5463: Introduction to Robotics Lecture Note 3 ...zhang/RoboticsClass/docs/LN3_RotationalMotion.pdf · ECE5463: Introduction to Robotics Lecture Note 3: Rotational Motion Prof.

Examples of Euler-Like Representations

Euler Angles Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 15 / 30

Page 16: ECE5463: Introduction to Robotics Lecture Note 3 ...zhang/RoboticsClass/docs/LN3_RotationalMotion.pdf · ECE5463: Introduction to Robotics Lecture Note 3: Rotational Motion Prof.

Outline

• Mathematics of Rigid Body Transformation

• Rotation Matrix and SO(3)

• Euler Angles and Euler-Like Parameterizations

• Exponential Coordinate of SO(3)

• Quaternion Representation of Rotation

Exponential Coordinate Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 16 / 30

Page 17: ECE5463: Introduction to Robotics Lecture Note 3 ...zhang/RoboticsClass/docs/LN3_RotationalMotion.pdf · ECE5463: Introduction to Robotics Lecture Note 3: Rotational Motion Prof.

Towards Exponential Coordinate of SO(3)

• Recall the polar coordinate system of the complex plane:

- Every complex number z = x+ jy = ρejφ

- Cartesian coordinate (x, y)↔ polar coorindate (ρ, φ)

- For some applications, the polar coordinate is preferred due to its geometricmeaning.

• For any rotation matrix R ∈ SO(3), it turned out R = e[ω]θ

- ω: unit vector representing the axis of rotation

- θ: the degree of rotation

- ωθ is called the exponential coordinate for SO(3).

Exponential Coordinate Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 17 / 30

Page 18: ECE5463: Introduction to Robotics Lecture Note 3 ...zhang/RoboticsClass/docs/LN3_RotationalMotion.pdf · ECE5463: Introduction to Robotics Lecture Note 3: Rotational Motion Prof.

Skew Symmetric Matrices

• Recall that cross product is a special linear transformation.

• For any ω ∈ Rn, there is a matrix [ω] ∈ Rn×n such that ω × p = [ω]p

ω =

ω1

ω2

ω3

↔ [ω] =

0 −ω3 ω2

ω3 0 −ω1

−ω2 ω1 0

• Note that [ω] = −[ω]T ← skew symmetric

• [ω] is called a skew-symmetric matrix representation of the vector ω

• The set of skew-symmetric matrices in: so(n) , {S ∈ Rn×n : ST = −S}

• We are interested in case n = 2, 3

Exponential Coordinate Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 18 / 30

Page 19: ECE5463: Introduction to Robotics Lecture Note 3 ...zhang/RoboticsClass/docs/LN3_RotationalMotion.pdf · ECE5463: Introduction to Robotics Lecture Note 3: Rotational Motion Prof.

Find Rotation Rot(ω, θ) via Differential Equation

• Consider a point p with coordinate p0 at time t = 0

• Rotate the point with constant unit velocity around fixed axis ω. The motionis described by

p(t) = ω × p(t) = [ω]p(t), with p(0) = p0

• This is a linear ODE with solution: p(t) = e[ω]tp0

• Note p(θ) = Rot(ω, θ)p0, therefore

Rot(ω, θ) = e[ω]θ

Exponential Coordinate Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 19 / 30

Page 20: ECE5463: Introduction to Robotics Lecture Note 3 ...zhang/RoboticsClass/docs/LN3_RotationalMotion.pdf · ECE5463: Introduction to Robotics Lecture Note 3: Rotational Motion Prof.

Find Rotation Rot(ω, θ) via Differential Equation

• Exponential Map: By definition

e[ω]θ = I + θ[ω] +θ2

2![ω]2 +

θ3

3![ω]3 + · · ·

• Rodrigues’ Formula: Given any [ω] ∈ so(3), we have

e[ω]θ = I + [ω] sin(θ) + [ω]2(1− cos(θ))

Exponential Coordinate Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 20 / 30

Page 21: ECE5463: Introduction to Robotics Lecture Note 3 ...zhang/RoboticsClass/docs/LN3_RotationalMotion.pdf · ECE5463: Introduction to Robotics Lecture Note 3: Rotational Motion Prof.

Find Rotation Rot(ω, θ) via Differential Equation

• Proposition: For any unit vector [ω] ∈ so(3) and any θ ∈ R,

e[ω]θ ∈ SO(3)

Exponential Coordinate Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 21 / 30

Page 22: ECE5463: Introduction to Robotics Lecture Note 3 ...zhang/RoboticsClass/docs/LN3_RotationalMotion.pdf · ECE5463: Introduction to Robotics Lecture Note 3: Rotational Motion Prof.

Examples of Forward Exponential Map

• Rotation matrix Rx(θ) (corresponding to xθ)

• Rotation matrix corresponding to (1, 0, 1)T

Exponential Coordinate Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 22 / 30

Page 23: ECE5463: Introduction to Robotics Lecture Note 3 ...zhang/RoboticsClass/docs/LN3_RotationalMotion.pdf · ECE5463: Introduction to Robotics Lecture Note 3: Rotational Motion Prof.

Logarithm of Rotations

• Proposition: For any R ∈ SO(3), there exists ω ∈ R3 with ‖ω‖ = 1 andθ ∈ R such that R = e[ω]θ

- If R = I, then θ = 0 and ω is undefined.

- If tr(R) = −1, then θ = π and set ω equal to one of the following

1√2(1 + r33)

r13r23

1 + r33

,1√

2(1 + r22)

r121 + r22r32

,1√

2(1 + r11)

1 + r11r21r31

- Otherwise, θ = cos−1(12(tr(R)− 1)

)∈ [0, π) and [ω] = 1

2 sin(θ)(R−RT )

Exponential Coordinate Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 23 / 30

Page 24: ECE5463: Introduction to Robotics Lecture Note 3 ...zhang/RoboticsClass/docs/LN3_RotationalMotion.pdf · ECE5463: Introduction to Robotics Lecture Note 3: Rotational Motion Prof.

Exponential Coordinate of SO(3)

exp: [ω]θ ∈ so(3) → R ∈ SO(3)

log: R ∈ SO(3) → [ω]θ ∈ so(3)

• The vector ωθ is called the exponential coordinate for R

• The exponential coordinates are also called the canonical coordinates of therotation group SO(3)

Exponential Coordinate Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 24 / 30

Page 25: ECE5463: Introduction to Robotics Lecture Note 3 ...zhang/RoboticsClass/docs/LN3_RotationalMotion.pdf · ECE5463: Introduction to Robotics Lecture Note 3: Rotational Motion Prof.

Outline

• Mathematics of Rigid Body Transformation

• Rotation Matrix and SO(3)

• Euler Angles and Euler-Like Parameterizations

• Exponential Coordinate of SO(3)

• Quaternion Representation of Rotation

Quaternions Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 25 / 30

Page 26: ECE5463: Introduction to Robotics Lecture Note 3 ...zhang/RoboticsClass/docs/LN3_RotationalMotion.pdf · ECE5463: Introduction to Robotics Lecture Note 3: Rotational Motion Prof.

Quaternions

• Quaternions generalize complex numbers and can be used to effectivelyrepresent rotations in R3.

• A quaternion is a vector quantity of the following form:

q = q0 + q1i + q2j + q3k

where q0 is the scalar (“real”) component and ~q = (q1, q2, q3) is the vector(“imaginary”) component.

• Addition and multiplication operations:

- p+ q = (p0 + q0) + (p1 + q1)i+ (p2 + q2)j + (p3 + q3)k- i2 = j2 = k2 = ijk = −1- ij = k = −ji, jk = i = −kj, ki = j = −ik

• In scalar-vector form, product of p = (p0, ~p) and q = (q0, ~q) is given by

pq =(p0q0 − ~pT ~q, p0~q + q0~p+ ~p× ~q

)

Quaternions Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 26 / 30

Page 27: ECE5463: Introduction to Robotics Lecture Note 3 ...zhang/RoboticsClass/docs/LN3_RotationalMotion.pdf · ECE5463: Introduction to Robotics Lecture Note 3: Rotational Motion Prof.

Conjugate, Norm, and Inverse

• Given a quaternion q = (q0, ~q):

- Conjugate: q∗ = (q0,−~q)

- Norm: ‖q‖2 = qq∗ = q∗q = q20 + q21 + q22 + q23

- Inverse: q−1 , q∗‖q‖2

Quaternions Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 27 / 30

Page 28: ECE5463: Introduction to Robotics Lecture Note 3 ...zhang/RoboticsClass/docs/LN3_RotationalMotion.pdf · ECE5463: Introduction to Robotics Lecture Note 3: Rotational Motion Prof.

Quaternion Representation of Rotation

• For ~v ∈ R3, we can associate it with a 0 scalar component to construct apurely imaginary quaternion:

v = (0, ~v)

• Each quaternion q = (q0, ~q) defines an operation on a vector ~v ∈ R3:

Lq(~v) = Im(qvq∗) = (q20 − ‖~q‖2)~v + 2(~qT~v)~q + 2q0(~q × ~v)

Quaternions Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 28 / 30

Page 29: ECE5463: Introduction to Robotics Lecture Note 3 ...zhang/RoboticsClass/docs/LN3_RotationalMotion.pdf · ECE5463: Introduction to Robotics Lecture Note 3: Rotational Motion Prof.

Quaternion Representation of Rotation

• Unit quaternion: If ‖q‖ = 1, we can always find θ ∈ [0, 2π) and unit vectorω ∈ R3 such that:

q =(cos(θ2

), ω sin

(θ2

))

In this case, Lq(~v) is the vector obtained by rotating ~v ∈ R3 about the axis ωfor θ degree.

• Given a unit quaternion q = (q0, ~q), we can extract the rotation axis/angle by:

θ = 2 cos−1(q0), ω =

{~q

sin(θ/2) if θ 6= 0

0 otherwise

• Lq∗(~v) rotates ~v about ω for −θ degree.

• Quaternion provides global parameterization of SO(3), which does not sufferfrom singularities

Quaternions Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 29 / 30

Page 30: ECE5463: Introduction to Robotics Lecture Note 3 ...zhang/RoboticsClass/docs/LN3_RotationalMotion.pdf · ECE5463: Introduction to Robotics Lecture Note 3: Rotational Motion Prof.

Examples of Quaternions

Quaternions Lecture 3 (ECE5463 Sp18) Wei Zhang(OSU) 30 / 30