3d kinematics eric whitman 1/24/2010. rigid body state: 2d p

26
3D Kinematics Eric Whitman 1/24/2010

Post on 19-Dec-2015

223 views

Category:

Documents


2 download

TRANSCRIPT

3D Kinematics

Eric Whitman1/24/2010

Rigid Body State: 2D

p

x

y

Rigid Body State: 3D

p

x

y

z

Add a Reference Frame

p'x

'y

'z

x

y

z

Rotation Matrix

• Linear Algebra definition– Orthogonal matrix: R-1 = RT

• square

– det(R) = 1• 2D: 4 numbers• 3D: 9 numbers

Unit Vectors

p

zzyzxzz

zyyyxyy

zxyxxxx

zyx

zyx

zyx

ˆ'ˆ'ˆ''ˆ

ˆ'ˆ'ˆ''ˆ

ˆ'ˆ'ˆ''ˆ

zzz

yyy

xxx

zyx

zyx

zyx

R

'''

'''

'''

'x

'y

'z

x

y

z

Using the Rotation Matrix

p

'x

'y

'z

x

y

z

Aa

aRpA

Pros and Cons

• Rotates Vectors Directly• Easy composition

• 9 numbers• Difficult to enforce

constraints

Simple Rotation Matrices

)cos()sin(

)sin()cos()(

R

2D 3D

)cos()sin(0

)sin()cos(0

001

)(

)cos(0)sin(

010

)sin(0)cos(

)(

100

0)cos()sin(

0)sin()cos(

)(

x

y

z

R

R

R

Degrees of Freedom

• 2D– 2x2 matrix has 4

numbers– Only one DoF

• 3D– 3x3 matrix has 9

numbers– 6 constraints– 3 DoF

Euler Angle Combinations

• Can use body or world coordinates• 2 consecutive angles must be different– Can alternate (3-1-3) or be all different (3-1-2)

• 24 possibilities (12 pairs of equivalent)• For aircraft, 3-2-1 body is common– Yaw, pitch, roll

• For spacecraft, 3-1-3 body is common

Construct a Rotation Matrix

ccsss

sccccssscccs

ssccsscscscc

R ),,(

3-1-3 Body Convention – Common for spacecraft

Recover Euler Angles

ccsss

sccccssscccs

ssccsscscscc

R ),,(

)arctan(

)arctan(

)arccos(

23,13

32,31

33

RR

RR

R

Gimbal Lock

• Physically: two gimbal axes line up, making movement in one direction impossible

• Mathematically describes a singularity in Euler angle systems

• For the 3-1-3 body convention, this occurs when angle 2 equals 0 or pi

• For the 3-1-2 body convention, this occurs when angle 2 +/- pi/2

• Switching helps

Pros and Cons

• Minimal Representation• Human readable

• Gimbal Lock• Must convert to RM to

rotate a vector• No easy composition

Axis Angle (4 numbers)

• A special case of Euler’s Rotation Theorem: any combination of rotations can be represented as a single rotation

• 3 numbers to represent the axis of rotation• 1 number to represent the angle of rotation• Has singularity for small rotations

,a

Rotation Vector (3 numbers)

• The axis can be a unit vector (only 2 DoF)• Multiply axis by angle of rotation• Can easily extract axis angle– Axis = rotation vector• Normalize if desired

– Angle = ||rotation vector||• Same singularity – small rotations

a

Pros and Cons

• Minimal Representation• Human readable (sort

of)

• Singularity for small rotations

• Must convert to RM to rotate a vector

• No easy composition

(Unit) Quaternions

• All schemes with 3 numbers will have a singularity– So says math (topology)

)2/cos(

ˆ)2/sin(

4

3

2

1

4

4

3

2

1

q

a

q

q

q

q

q

q

q

q

q

q

q

Constraint

• Easy to enforce

124

23

22

21 qqqqqq T

Conversion with RM

24

23

22

2114232413

143224

23

22

213412

2431342124

23

22

21

)(2)(2

)(2)(2

)(2)(2

qqqqqqqqqqqq

qqqqqqqqqqqq

qqqqqqqqqqqq

R

)(4

1

)(4

1

)(4

1

12

1

21124

3

13314

2

32234

1

3322114

RRq

q

RRq

q

RRq

q

RRRq

Composition

qq

qqqq

''

''''

44

44

qq

qqqq

Pros and Cons

• No Singularity• Almost minimal

representation• Easy to enforce

constraint• Easy composition• Interpolation possible

• Not quite minimal• Somewhat confusing

Summary of Rotation Representations

• Need rotation matrix to rotate vectors• Often more convenient to use something else

and convert to rotation matrix• Euler angles good for small angular deviations• Quaternions good for free rotation

Homogeneous Transformations10

101

0 pRop

Define:

1

~ pp

10

01

010

1

T

oRA

Composition

nnn pAAAp 11

201

0 ...~