Reference Frames and Rotations Basilio Bona DAUIN Politecnico di - - PowerPoint PPT Presentation

reference frames and rotations
SMART_READER_LITE
LIVE PREVIEW

Reference Frames and Rotations Basilio Bona DAUIN Politecnico di - - PowerPoint PPT Presentation

Reference Frames and Rotations Basilio Bona DAUIN Politecnico di Torino Semester 1, 2016-2017 B. Bona (DAUIN) Rotations & Reference Frames Semester 1, 2016-2017 1 / 31 Introduction In robotics we are mainly dealing with ideal rigid


slide-1
SLIDE 1

Reference Frames and Rotations

Basilio Bona

DAUIN – Politecnico di Torino

Semester 1, 2016-2017

  • B. Bona (DAUIN)

Rotations & Reference Frames Semester 1, 2016-2017 1 / 31

slide-2
SLIDE 2

Introduction

In robotics we are mainly dealing with ideal rigid bodies

Rigid Body (purely kinematic definition)

A rigid body is a set of finite or infinite number of points whose mutual distances are invariant in time and space. A rigid body is completely defined by a reference frame Rb(Ob,ib,jb,kb), called “body frame”, attached to the body. Rigid bodies move in space according to rigid motions, that include only two types of motions:

1 rigid translations 2 rigid rotations

These can be combined, obtaining rigid roto-translations.

  • B. Bona (DAUIN)

Rotations & Reference Frames Semester 1, 2016-2017 2 / 31

slide-3
SLIDE 3

Rigid Body

In particular, rigid rotations are related to several concepts

1 the physical action that makes an object rotating around an axis in

space

2 the mathematical representation of this physical action, and its

properties

3 the abstract concept of isometry and its properties

We are also interested in the following questions: if two identical rigid bodies have different orientations in space, what is their relationship? how can we mathematically represent the transformation that acts on a vector and transforms it into another vector of equal norm, i.e., a rigid transformation?

  • B. Bona (DAUIN)

Rotations & Reference Frames Semester 1, 2016-2017 3 / 31

slide-4
SLIDE 4

Orthogonal reference frame

Definition

An Orthogonal Reference Frame (ORF) in 3D space is defined by its

  • rigin O and three mutually orthogonal unit vectors (i,j,k):

R(O,i,j,k) ORF’s may be right-handed or left-handed. Since the cross product obeys the rigth-hand rule: right-hand ORF if i×j = k left-hand ORF if j×i = k We will use only right-hand ORF’s and from now on we will refer to them simply as reference frames RF.

  • B. Bona (DAUIN)

Rotations & Reference Frames Semester 1, 2016-2017 4 / 31

slide-5
SLIDE 5

Orthogonal reference frame

There is a conceptual difference between the term Reference Frame (RF) and the term Coordinate System representing it: indeed, given a unique RF, different coordinate systems may be defined, e.g., cartesian, spherical or cylindrical coordinates, left-hand or right-hand frames, etc.; in the present context, the two terms are used as synonyms.

  • B. Bona (DAUIN)

Rotations & Reference Frames Semester 1, 2016-2017 5 / 31

slide-6
SLIDE 6

Rigid body

Each geometric k-th point of the rigid body B is defined by a geometrical vector pB

k or [pk]B, whose coordinates in RB are

pB

k =

pB

k,1

pB

k,2

pB

k,3

T [pk]B = pk,1 pk,2 pk,3 T

B

In a rigid body the distance between each couple of points remains constant under any rigid transformation or external action on the body.

  • pi −pj
  • = dij ≥ 0;

∀ Pi, Pj ∈ A Therefore, the rigid body B is completely characterized by its associated body frame RB, and when we speak of a rigid body we implicitly associate it with its body frame.

  • B. Bona (DAUIN)

Rotations & Reference Frames Semester 1, 2016-2017 6 / 31

slide-7
SLIDE 7

Two rigid bodies, as those shown in Figure, may be interpreted as two identical objects at the same time instant, or as the same object at two different time instants. In both cases we are interested in studying the mutual relation between their orientations.

Figure: Two rigid bodies with different orientations.

  • B. Bona (DAUIN)

Rotations & Reference Frames Semester 1, 2016-2017 7 / 31

slide-8
SLIDE 8

Relations between reference frames

Given two RFs Ra and Rb, with a common origin O, but with different

  • rientation, their reciprocal relation can be expressed in two ways

how Rb is represented in Ra how Ra is represented in Rb The choice depends on the physical meaning associated to them:

  • ne RF can be fixed, the other moving;
  • ne RF can be given at time t0, the second one at a different time

t1 > t0;

  • ne can be more interesting than the other, etc.
  • B. Bona (DAUIN)

Rotations & Reference Frames Semester 1, 2016-2017 8 / 31

slide-9
SLIDE 9

Figure: Two RF’s Ra e Ra with a common origin but different orientation.

  • B. Bona (DAUIN)

Rotations & Reference Frames Semester 1, 2016-2017 9 / 31

slide-10
SLIDE 10

Rotation matrices

Representation of Rb in Ra: we represent the three unit vectors (ib, jb, kb) in Ra,    ib  

a

 jb  

a

 kb  

a

  = Ra

b

Representation of Ra in Rb: we represent the three unit vectors (ia, ja, ka) in Rb,     ia  

b

 ja  

b

 ka  

b

  = Rb

a

These are rotation matrices satisfying the relation Rb

a = (Ra b)T

Ra

b = (Rb a)T

  • B. Bona (DAUIN)

Rotations & Reference Frames Semester 1, 2016-2017 10 / 31

slide-11
SLIDE 11

Example

Figure: The same vector v represented in two rotated RFs.

  • B. Bona (DAUIN)

Rotations & Reference Frames Semester 1, 2016-2017 11 / 31

slide-12
SLIDE 12

Example

The two previous reference frames RA and RB are rotated one with respect to the other. They are represented by two different rotation matrices: RB represented in RA RA

B =

  1 −1 1   RA represented in RB RA

B =

  1 1 −1   One matrix is the transpose of the other. Observe that RB is obtained rotating RA of α = π/2 around iA and that RA is obtained rotating RB of α = −π/2 around iB.

  • B. Bona (DAUIN)

Rotations & Reference Frames Semester 1, 2016-2017 12 / 31

slide-13
SLIDE 13

Rotation matrices

Rotation matrices, denoted by R, belong to the orthonormal matrix group, i.e., RRT = RTR = I → R−1 = RT det(R) = +1 Given a rotation matrix R =   r11 r12 r13 r21 r22 r23 r31 r32 r33   the following constraints hold r2

11 +r2 12 +r2 13 = 1

r2

21 +r2 22 +r2 23 = 1

r2

31 +r2 32 +r2 33 = 1

r22r33 −r23r32 = r11 r23r31 −r21r33 = r12 r21r32 −r22r31 = r13

  • B. Bona (DAUIN)

Rotations & Reference Frames Semester 1, 2016-2017 13 / 31

slide-14
SLIDE 14

Rotation matrices

Euler’s theorem states that the composition of any number of rotations is equivalent to a single rotation of an angle θ around an axis represented by a unit vector u. The matrix associated to this generic rotation is called an axis-angle representation and is given by Rot(u,θ) =   u2

1 (1−cθ)+cθ

u1u2 (1−cθ)−u3sθ u1u3 (1−cθ)+u2sθ u1u2 (1−cθ)+u3sθ u2

2 (1−cθ)+cθ

u2u3 (1−cθ)−u1sθ u1u3 (1−cθ)−u2sθ u2u3 (1−cθ)+u1sθ u2

3 (1−cθ)+cθ

  where cθ ≡ cosθ sθ ≡ sinθ We can see that this matrix satisfies the previous constraints.

  • B. Bona (DAUIN)

Rotations & Reference Frames Semester 1, 2016-2017 14 / 31

slide-15
SLIDE 15

Elementary rotation matrices

We call elementary rotation matrices the rotations around the unit vectors (i,j,k) of a generic RF. Rot(x,α) = Rot(i,α) =   1 cosα −sinα sinα cosα   =   1 cα −sα sα cα   Rot(y,β) = Rot(j,β) =   cosβ sinβ 1 −sinβ cosβ   =   cβ sβ 1 −sβ cβ   Rot(z,γ) = Rot(k,γ) =   cosγ −sinγ sinγ cosγ 1   =   cγ −sγ sγ cγ 1   Notice the position of 1 on the main diagonals.

  • B. Bona (DAUIN)

Rotations & Reference Frames Semester 1, 2016-2017 15 / 31

slide-16
SLIDE 16

Composition of rotations

Every rotation can be obtained combining these three elementary rotations. Rules are simple: to obtain a generic rotation, composed by a number of elementary rotations, it is necessary to a) define which elementary rotation is applied, i.e., define the rotation axis b) define the rotation angle c) establish if the rotation is performed around fixed or mobile RF d) if the rotation takes place wrt the fixed RF, then it is necessary to pre-multiply the previous rotation matrix by the new rotation e) if the rotation takes place wrt the mobile RF, then it is necessary to post-multiply the previous rotation matrix by the new rotation.

Product rule for the rotation composition

Pre-fixed Post-mobile

The terms “fixed” and “mobile” indicate respectively the RF assumed to be static and the RF resulting from the previous rotation.

  • B. Bona (DAUIN)

Rotations & Reference Frames Semester 1, 2016-2017 16 / 31

slide-17
SLIDE 17

Vector rotation

Let’s assume we have a generic vector vb (both a physical or a geometrical vector) represented in a generic RF Rb and we want to represent it in another RF Ra, whose mutual representation is given by Ra

b (remember,

Rb in Ra). The transformation is a linear application given by va = Ra

bvb,

  • r

vb = Rb

ava

where Rb

a = (Ra b)T

Notice the position of the indexes a and b.

  • B. Bona (DAUIN)

Rotations & Reference Frames Semester 1, 2016-2017 17 / 31

slide-18
SLIDE 18

Rotation matrices

Given a generic rotation matrix Ra

b, the following interpretations hold:

Ra

b = Rot(u,θ) is the generic rotation of an angle θ around an axis

represented by the unit vector u; the value of θ and the components

  • f u do not appear clearly from the elements of Ra

b but they are

computable, as we will see later; Ra

b provides the description of the “mobile” RF Rb wrt the “fixed”

RF Ra Ra

b defines the linear operator that transforms a vector from the

“mobile” RF Rb to the “fixed” RF Ra. The operator Ra

b is linear since it is represented by a matrix that obeys the

following relations Ra

b(λ1x1 +λ2x2) = λ1Ra bx1 +λ2Ra bx2,

λi ∈ R

  • B. Bona (DAUIN)

Rotations & Reference Frames Semester 1, 2016-2017 18 / 31

slide-19
SLIDE 19

Rotation matrices - mathematical properties

A (proper) rotation matrix R has the following modal decomposition R = MΛMH = u v v∗   1 ejθ e−jθ  u v v∗H where j = √−1, M is the modal (eigenvectors) matrix and MH is the Hermitian (conjugate transpose) matrix of M. The first eigenvector u is a unit vector that defines the rotation axis; the

  • ther two unit vectors v and v∗ define the normal plane to u.

The rotation takes place on this plane and is represented by the complex

  • perator ejθ.
  • B. Bona (DAUIN)

Rotations & Reference Frames Semester 1, 2016-2017 19 / 31

slide-20
SLIDE 20

Rotation matrices - mathematical properties

Rotations form non commutative group, called SO(3), for Special Orthogonal group of dimension 3. Given a rotation R(u,θ), the following properties hold: Properties R(u,θ) = R(−u,−θ) R(u,−θ) = R(u,2π −θ) = R(−u,θ) R(u,θ) = R(u,−θ)T R(−u,−θ) = R(−u,θ)T R(u,θ1)R(u,θ2) = R(u,(θ1 +θ2)) Euler formula for the rotation matrix: R = cosθI+(1−cosθ)uuT −sinθS(u) = I−sinθS(u)+(1−cosθ)S(u)2

  • B. Bona (DAUIN)

Rotations & Reference Frames Semester 1, 2016-2017 20 / 31

slide-21
SLIDE 21

Rotation matrices - mathematical properties

If we rotate a body at a constant velocity ˙ θ around the axis u, the velocity

  • f a point p(t) attached to the body is given by the differential equation

˙ p(t) = ω ×p(t) = S(u ˙ θ)p(t) = ˙ θ S(u)p(t) whose integral supports the following statement: a generic rotation matrix R is the exponential of a skew-symmetric matrix (Rodrigues formula): R(u,θ) = eS(u)θ = I+ sinθ u S(u)+ 1−cosθ u2 S2(u) R(u,θ)T = e−S(u)θ = I− sinθ u S(u)+ 1−cosθ u2 S2(u) where S(u) =   −u3 u2 u3 −u1 −u2 u1   S2(u) =   −u2

2 −u2 3

u1u2 u1u3 u1u2 −u2

1 −u2 3

u2u3 u1u3 u2u3 −u2

1 −u2 2

 

  • B. Bona (DAUIN)

Rotations & Reference Frames Semester 1, 2016-2017 21 / 31

slide-22
SLIDE 22

Planar rotations

Planar rotations are a subset of 3D rotations. They are a one-parameter group, called SO(2), whose representation is given by a 2×2 orthogonal matrix R: R =

  • cosθ

−sinθ sinθ cosθ

  • Figure: A planar rotation and its matrix representation.
  • B. Bona (DAUIN)

Rotations & Reference Frames Semester 1, 2016-2017 22 / 31

slide-23
SLIDE 23

Planar rotations can be represented by unit (module= 1) complex numbers c = a+jb = cosθ +jsinθ = ejθ The matrix representation is isomorphic to the 1-sphere S1 (i.e., the unit circle), as shown in the Figure

Figure: The S1 sphere.

  • B. Bona (DAUIN)

Rotations & Reference Frames Semester 1, 2016-2017 23 / 31

slide-24
SLIDE 24

Similarly, the SO(3) group that represents space rotations, is isomorphic to the S2 sphere.

Figure: The S2 sphere.

  • B. Bona (DAUIN)

Rotations & Reference Frames Semester 1, 2016-2017 24 / 31

slide-25
SLIDE 25

Angular Velocity of rigid bodies

We start considering the velocity of a rigid body B performing a pure rotational motion. The body frame attached to B is defined by the rotation matrix R wrt a fixed frame; the rotation matrix changes in time during the motion, i.e., R = R(t). To find the time derivative of R(t), we consider the product R(t)RT(t) = I and derive it, obtaining dR(t) dt RT(t)+R(t)dRT(t) dt = O We indicate dR(t) dt as ˙ R(t), and observe that the product ˙ R(t)RT(t) is skew-symmetric.

  • B. Bona (DAUIN)

Rotations & Reference Frames Semester 1, 2016-2017 25 / 31

slide-26
SLIDE 26

We define the instantaneous spatial angular velocity ωs

ab as the

instantaneous angular velocity of the body/RF b relative to body/RF a represented in the fixed (inertial) RF Ra ˙ R

a b(t)(Ra b(t))T = S(ωa ab) ⇔ ωa ab

while we define the instantaneous body angular velocity ωb

ab as the

instantaneous velocity of body/RF a relative to body/RF b represented in the fixed (inertial) RF Rb (Ra

b(t))T ˙

R

a b(t) = S(ωb ab) ⇔ ωb ab

Hence the relation between them is ωb

ab +ωa ab = 0;

ωb

ab = Ra b(t))Tωa ab;

ωa

ab = Ra b(t)ωb ab

and we recall that Ra

bS(ωb ab)(Ra b)T = S(Ra bωb ab) = S(ωa ab)

  • B. Bona (DAUIN)

Rotations & Reference Frames Semester 1, 2016-2017 26 / 31

slide-27
SLIDE 27

The exact formula for the rotational velocity is ω(t) = ˙ θ(t)u(t)+sinθ(t)˙ u(t)+(1−cosθ(t))S(u(t))˙ u(t) Hence the angular velocity vector is not the formal time derivative of any vector, except the particular case in which the rotation axis u(t) remains constant in time, i.e., u(t) = u, giving ω(t) = ˙ θ(t)u = ˙ u(t) that is the total time derivative of ˙ u(t) = θ(t)u It is possible to obtain ω(t) from R(t) = r g b as ω(t) = 1 2(r × ˙ r +g × ˙ g +b× ˙ b)

  • B. Bona (DAUIN)

Rotations & Reference Frames Semester 1, 2016-2017 27 / 31

slide-28
SLIDE 28

SO(3) and so(3) groups

The vector space of skew-symmetric matrices is denoted by so(3) or so(3) and is related to the special orthogonal group SO(3) by the exponential mapping exp : so(3) → SO(3) i.e., R(u,θ) = eS(ω) = eS(u)θ =

k=0

1 k!Sk(u)θ = I+ sinθ u S(u)+ 1−cosθ u2 S2(u) SO(3) is more than just a group: it is also a topological group, which means that they are topological spaces, and that the product and the inverse operations are continuous (in fact, smooth). They are smooth real

  • manifolds. Such objects are called Lie groups. The real vector space

so(3) is called a Lie algebra, where the algebra structure is given by the Lie bracket or commutator [S1,S2] = S1S2 −S2S1

  • B. Bona (DAUIN)

Rotations & Reference Frames Semester 1, 2016-2017 28 / 31

slide-29
SLIDE 29

Infinitesimal rotations

Assume an infinitesimal rotation given by three (generic) Cardan angles dα = dα1 dα2 dα3 T and call R(dα) the associated rotation matrix. Taking the limits for dθ → 0, we can write R(dα) = I+S(dα)+O(dα2) = I+S(dα) The R(dα) inverse is R−1(dα) = RT(dα) ≃ I−S(dα) = I+S(−dα) ≃ R(−dα) It is possible to demonstrate that dα is a vector in a mathematical sense. For example, the vectorial sum commutes, since R(dα1)R(dα2) = R(dα2)R(dα1) and R(α +dα) = R(dα)R(α) Notice that the right hand side product does not commute.

  • B. Bona (DAUIN)

Rotations & Reference Frames Semester 1, 2016-2017 29 / 31

slide-30
SLIDE 30

Infinitesimal rotation generators

We can build S(ω) as a sum of three terms S(ω) = ∑

i=1,3

ωiMi where Mi are a base for S(ω). They are called infinitesimal rotation generators M1 =   −1 1   M2 =   1 −1   M3 =   −1 1  

  • B. Bona (DAUIN)

Rotations & Reference Frames Semester 1, 2016-2017 30 / 31

slide-31
SLIDE 31

The following property holds [Mi, Mj] := MiMj −MjMi = εijkMk where εijk are the Levi-Civita permutation symbols εijk =    +1 (i,j,k) ∈ {(1,2,3),(2,3,1),(3,1,2)} i = j, j = k, ,k = i −1 (i,j,k) ∈ {(1,3,2),(2,1,3),(3,2,1)} The matrix operator [Mi, Mj] is called commutator, or Lie bracket and defines a Lie algebra on SO(3).

  • B. Bona (DAUIN)

Rotations & Reference Frames Semester 1, 2016-2017 31 / 31