26
2.1.5 Rotations in 3D: Rotation axis 2D: •Angle •Center of rotation In 3 dimensions, we need to specify angle and axis

2.1.5 Rotations in 3D: Rotation axis 2D: Angle Center of rotation In 3 dimensions, we need to specify angle and axis

Embed Size (px)

Citation preview

Page 1: 2.1.5 Rotations in 3D: Rotation axis 2D: Angle Center of rotation In 3 dimensions, we need to specify angle and axis

2.1.5 Rotations in 3D: Rotation axis

2D:

•Angle

•Center of rotation

In 3 dimensions, we need to specify angle and axis

Page 2: 2.1.5 Rotations in 3D: Rotation axis 2D: Angle Center of rotation In 3 dimensions, we need to specify angle and axis

Rotations around axes as direction cosines

y1

x 2

y 2

x1z1= z2

Page 3: 2.1.5 Rotations in 3D: Rotation axis 2D: Angle Center of rotation In 3 dimensions, we need to specify angle and axis

Rotation around x,y,z

Page 4: 2.1.5 Rotations in 3D: Rotation axis 2D: Angle Center of rotation In 3 dimensions, we need to specify angle and axis

Exercice 6

a): rotation by 90° around z, then rotation by 90° around y

b): rotation by 90° around y, then rotation by 90° around z

Page 5: 2.1.5 Rotations in 3D: Rotation axis 2D: Angle Center of rotation In 3 dimensions, we need to specify angle and axis

Solution by matrix multiplication

6a

6b

Page 6: 2.1.5 Rotations in 3D: Rotation axis 2D: Angle Center of rotation In 3 dimensions, we need to specify angle and axis

Problem 7a: Solution by an isometric drawing:

x y

z z axis 90°

y axis 90°

corresponds to 120° rotation around. [1,1,1]’ axis!

z axis 90°

y axis 90°

7b

Page 7: 2.1.5 Rotations in 3D: Rotation axis 2D: Angle Center of rotation In 3 dimensions, we need to specify angle and axis

Rotation autour d’axes liés au corps

7c

z axis 90° y’ axis 90°

y’

« Body frame »

Page 8: 2.1.5 Rotations in 3D: Rotation axis 2D: Angle Center of rotation In 3 dimensions, we need to specify angle and axis

Rotation autour d’axes lié au corps

7d

y axis 90° z’ axis 90°

Body frame

z’

Page 9: 2.1.5 Rotations in 3D: Rotation axis 2D: Angle Center of rotation In 3 dimensions, we need to specify angle and axis

Ex. 8

Fig. 4

Page 10: 2.1.5 Rotations in 3D: Rotation axis 2D: Angle Center of rotation In 3 dimensions, we need to specify angle and axis

Passage Axe/Angle => Matrice de cos. dir.

(10)

rotation d'un angle J autour de l'axe [x,y,z]T avec || [x,y,z]T|| = 1

Benjamin Olinde Rodrigues1795 – 1851

Page 11: 2.1.5 Rotations in 3D: Rotation axis 2D: Angle Center of rotation In 3 dimensions, we need to specify angle and axis

Ex. 8

2. solution:

1. solution: Formule (10)

Page 12: 2.1.5 Rotations in 3D: Rotation axis 2D: Angle Center of rotation In 3 dimensions, we need to specify angle and axis

Passage Matrice de cos. dir. => Axe/Angle

(11)

From direction cosines to axis/angle:

axisdirection:

Page 13: 2.1.5 Rotations in 3D: Rotation axis 2D: Angle Center of rotation In 3 dimensions, we need to specify angle and axis

Application de (11) à l’ex. 6

ex. 6a)

ex. 6b)

Page 14: 2.1.5 Rotations in 3D: Rotation axis 2D: Angle Center of rotation In 3 dimensions, we need to specify angle and axis

Problèmes de (11)

En pratique, il y aura une mauvaise conditionnumérique pour tout angle proche de 0 ou de 180°et une erreur pour ces deux cas!

L’expression axe/angle de l'équation (11) présente deux défauts majeurs pour le traitement à l'ordinateur:

1.) La solution n'est pas unique (racine pos. ou neg.)

2.) sin()=0 mène à une singularité (axe non-défini)

Page 15: 2.1.5 Rotations in 3D: Rotation axis 2D: Angle Center of rotation In 3 dimensions, we need to specify angle and axis

Solution: Quaternions!

Ces deux inconvénients disparaissent de façon élégante en employant les paramètres d'Euler*) ou quaternions ou paramètres de Rodrigues. Les quaternions sont employés en robotique industrielle.

*) A ne pas confondre avec les angles d'Euler

Page 16: 2.1.5 Rotations in 3D: Rotation axis 2D: Angle Center of rotation In 3 dimensions, we need to specify angle and axis

Les quaternions sont une généralisation des nombres complexes.

Après de longs et infructueux essais d'étendre l'interpre-

tation géométrique des nb. complexes dans le plan (Argand,

1768-1822, mathématicien genevois) aux 3 dimensions,

Hamilton (1843) a trouvé les deux astuces nécessaires:

1. Il n'y aura pas deux, mais trois parties imaginaires, en plus de la partie réelle.

2. Il faut abandonner la commutativité de la multiplication.

Page 17: 2.1.5 Rotations in 3D: Rotation axis 2D: Angle Center of rotation In 3 dimensions, we need to specify angle and axis

Partie réelle, parties imaginaires

Ces nouveaux nombres "hypercomplexes",

contiennent une partie réelle scalaire 0

et trois parties imaginaires [1 2, 3]T

qui sont interprétées comme partie vectorielle .

le quaternion Q est donc le quadruple

Q = { 0 , 1 2, 3} = { 0 , } (11a)

Page 18: 2.1.5 Rotations in 3D: Rotation axis 2D: Angle Center of rotation In 3 dimensions, we need to specify angle and axis

Parties imaginaires: Généralisation de i = √(–1)

Q = { 0 , 1 2, 3} = 0 + i 1+ j 2 + k 3

i2 = j2 = k2 = ijk = –1 (11e)

ij = k = –ji Non-Commutativité!

jk = i = –kj

ki = j = –ik (11f)

(11d)

Page 19: 2.1.5 Rotations in 3D: Rotation axis 2D: Angle Center of rotation In 3 dimensions, we need to specify angle and axis

Comment la rotation est-elle exprimée dans le quaternion?

• L’axe de rotation est donnée par la partie vectorielle

= [1 2, 3]T

Q = { 0 , 1 2, 3} ={ 0 , }

Page 20: 2.1.5 Rotations in 3D: Rotation axis 2D: Angle Center of rotation In 3 dimensions, we need to specify angle and axis

Angle de rotation :

0 = cos(/2)

|| = sin(/2)

L’axe de rotation disparaît pourangles de rotation 0°, 360°, 720°…

(11b)

Page 21: 2.1.5 Rotations in 3D: Rotation axis 2D: Angle Center of rotation In 3 dimensions, we need to specify angle and axis

Donc tous les quaternions de rotation sontunitaires:

0 = cos(/2)

|| = sin(/2)

02 + 1

2+ 22+

2 = 1

(11b)

(11c)

a.k.a. Euler Parameters, Rodrigues Parameters

Page 22: 2.1.5 Rotations in 3D: Rotation axis 2D: Angle Center of rotation In 3 dimensions, we need to specify angle and axis

Les règles mènent au produit

QMQL = { 0 , } { 0 , } =

(11g)

i2 = j2 = k2 = –1

ij = k = –ji

jk = i = –kj

ki = j = –ik

{ 00 – T00

}

Ce produit définit l'enchaînement des rotations QL puis QM

Exercice 8b): Exercice 7 avec des quaternions.

Page 23: 2.1.5 Rotations in 3D: Rotation axis 2D: Angle Center of rotation In 3 dimensions, we need to specify angle and axis

Passage entre quaternions et matrice des cosinus directeurs

= cos(/2) ≥ 0

Page 24: 2.1.5 Rotations in 3D: Rotation axis 2D: Angle Center of rotation In 3 dimensions, we need to specify angle and axis

Effort de calcul Composition de rotations

Mul. Add. & soustr. total

Matrices de rot. 27 18 45Quaternions 16 12 28

Pour la rotation de vecteurs, il faut utiliser les matrices

Page 25: 2.1.5 Rotations in 3D: Rotation axis 2D: Angle Center of rotation In 3 dimensions, we need to specify angle and axis

2.1.6 Matrices homogènes 3DHomogenous Matrices in 3D

Une rotation autour d'un axe ne passant pas par l'origine se compose de la même façon que dans le cas 2D:

A rotation around an axis NOT through the origin is done as in 2D:

(12)

(13)

avec le vecteur p de l'origine O à un point quelconque sur l'axe de rotation

with vector p from origin O to any point on the rotation axis.

Page 26: 2.1.5 Rotations in 3D: Rotation axis 2D: Angle Center of rotation In 3 dimensions, we need to specify angle and axis

Rappel: Mouvement général 3D: Vis (screw, Schraube)

Recall from earlier lecture: The most general motion in 3D is a screw

Différence avec le cas 2D:

Le mouvement général en 3D est équivalent à une rotation autour d'un axe plus une translation en direction de cet axe.

Exercice 8c: Trouver matrice de transformation menant les points

A=[1 0 0]T , B=[0 0 0]T et C=[0 1 0]T

vers A'=[1 0 1]T , B'=[1 –1 1]T et C’=[0 –1 1]T

Axe, l'angle de rotation, la translation en direction de l'axe?

(Hint: A drawing is much easier than trying to solve the equations)

A screw is a rotation around an axis plus a translationalong this axis.