chapter 2: description of position and orientation faculty of engineering - mechanical engineering...

38
Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: • Introduction. • Descriptions: positions, orientations and frames. • Mappings: changing description from frame to frame • Operators: translations, rotations, and transformations 1

Upload: kelly-black

Post on 29-Jan-2016

226 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:

Chapter 2: Description of position and orientation

1

Faculty of Engineering - Mechanical Engineering Department

ROBOTICSOutline:

• Introduction.• Descriptions: positions, orientations and frames.• Mappings: changing description from frame to frame• Operators: translations, rotations, and transformations

Page 2: Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:

Chapter 2: Description of position and orientation

2

Faculty of Engineering - Mechanical Engineering Department

ROBOTICSIntroduction:

• Location of an object in 3D space?

• Robot links• Robot tool• Parts in the Workspace (WS )• Environment (obstacles, walls…)

• Position & orientation

Attach frame (coordinate system) to each object rigidly.

How to represent these quantities mathematically?

Find the transformation between these frames

Page 3: Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:

Chapter 2: Description of position and orientation

3

Faculty of Engineering - Mechanical Engineering Department

ROBOTICSIntroduction

• Frames attachment. Don’t forget to define the universe frame

Mapping between these frames

Page 4: Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:

Chapter 2: Description of position and orientation

4

Faculty of Engineering - Mechanical Engineering Department

ROBOTICSDescriptions: positions, orientations and frames

• Position {A} ≡ frame A

≡ the 3D position vector of point P calculated in {A}

,

xAOA P y

z

P

P P

P

,

AOA PP

,AOA PP

OA

P

Page 5: Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:

Chapter 2: Description of position and orientation

5

Faculty of Engineering - Mechanical Engineering Department

ROBOTICSDescriptions: positions, orientations and frames

• Orientation?– Position in 3D-space is not enough,

the orientation must be also described.How to describe the orientation of {B} relative to {A}?

– One possible solution:Decompose the unit vector directions of {B} ( ) in {A}, as follows:

similarly for and

Page 6: Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:

Chapter 2: Description of position and orientation

6

Faculty of Engineering - Mechanical Engineering Department

ROBOTICSDescriptions: positions, orientations and frames

• Orientation?if we put in one matrix

= 3x3 Rotation matrix between{A} and {B}, {B} expressedin {A}

complete description:{B} =

,{ , }A AB OA BR P

Page 7: Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:

Chapter 2: Description of position and orientation

7

Faculty of Engineering - Mechanical Engineering Department

ROBOTICSDescriptions: positions, orientations and frames

• Orientation?Note that,

and is the dot-product which is equivalent to the cosine of the angle between these two vectors. Also,

Hence,

Page 8: Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:

Chapter 2: Description of position and orientation

8

Faculty of Engineering - Mechanical Engineering Department

ROBOTICSDescriptions: positions, orientations and frames

• Rotation matrix characteristics:– All columns have unit magnitude – And they are orthogonal Orthonormal matrix

ˆ 1ABX

ˆ ˆ ˆ ...A A AB B BX Y Z

1

Recall that

TA AB B

TA BB A

R R

R R

Page 9: Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:

Chapter 2: Description of position and orientation

9

Faculty of Engineering - Mechanical Engineering Department

ROBOTICSMapping (changing description from frame to frame)

• Translation without rotationAssume {A} and {B}, and . What is if {A} and {B} have the same orientation?

,BOB PP

,AOA PP

,BOB PP

,AOA PP

,AOA OBP

, , ,

, , ,

A A AOA P OA OB OB P

A A BOA P OA OB OB P

P P P

P P P

Page 10: Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:

Chapter 2: Description of position and orientation

10

Faculty of Engineering - Mechanical Engineering Department

ROBOTICSMapping (changing description from frame to frame)

• Rotation without translation ≡ Rotation matrix between {A} and {B}Note that

In matrix form

ABR

,BOB PP

,

,

,

ˆ

ˆ

ˆ

A B Bx A O P

A B By A O P

A B Bz A O P

P X P

P Y P

P Z P

O

, ,

ˆ

ˆ

ˆ

TB

AAx

TA A B BO P y A O P

ATz B

A

XP

P P Y P

PZ

, ,

1

, , ,

, ,

Or,

A A BO P B O P

TB A A A AO P B O P B O P

B B AO P A O P

P R P

P R P R P

P R P

Page 11: Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:

Chapter 2: Description of position and orientation

11

Faculty of Engineering - Mechanical Engineering Department

ROBOTICSMapping (changing description from frame to frame)

, ,

0

Given, 2 , What is ?

0

B AOB P OA PP P

Page 12: Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:

Chapter 2: Description of position and orientation

12

Faculty of Engineering - Mechanical Engineering Department

ROBOTICSMapping (changing description from frame to frame)

, ,

0

Given, 2 , What is ?

0

B AOB P OA PP P

Solution

Note that the vector P is not changing in space, but we are calculating its description in different frame

Page 13: Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:

Chapter 2: Description of position and orientation

13

Faculty of Engineering - Mechanical Engineering Department

ROBOTICSMapping (changing description from frame to frame)

• Translation and rotation In more compact form

• Or,

,AOA OBP

,BOB PP

, , ,

, , ,

A A AOA P OA OB OB P

A A A BOA P OA OB B OB P

P P P

P P R P

, , ,

1 0 0 0 1 1

A A A BOA P B OA OB OB PP R P P

, ,A A BOA P B OB PP T P

(4x1) vectors

,AOA PP

Page 14: Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:

Chapter 2: Description of position and orientation

14

Faculty of Engineering - Mechanical Engineering Department

ROBOTICSMapping (changing description from frame to frame)

• Translation and rotation In more compact form

• Or,

,AOA OBP

,BOB PP

, , ,

, , ,

A A AOA P OA OB OB P

A A A BOA P OA OB B OB P

P P P

P P R P

, , ,

1 0 0 0 1 1

A A A BOA P B OA OB OB PP R P P

, ,A A BOA P B OB PP T P

(4x1) vectors

ABT Homogeneous transform ≡ trans.+rot. in a single matrix

,AOA PP

≡ Complete description of {B} relative to {A}

More computations (disadvantage)

Page 15: Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:

Chapter 2: Description of position and orientation

15

Faculty of Engineering - Mechanical Engineering Department

ROBOTICSMapping (changing description from frame to frame)

,Find .AOA PP

Page 16: Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:

Chapter 2: Description of position and orientation

16

Faculty of Engineering - Mechanical Engineering Department

ROBOTICS

, ,

,

9.1

12.6

0

1

9.1

12.6

0

A A BOA P B OB P

AOA P

P T P

P

Mapping (changing description from frame to frame)

Solution ,Find .A

OA PP

Page 17: Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:

Chapter 2: Description of position and orientation

17

Faculty of Engineering - Mechanical Engineering Department

ROBOTICSTransformation operations: (Multiplication and inversion)

• Multiplication (Compound transformation)

, ,

, ,

, ,

, ,

, ,It can be proven that0 0 0 1

B B COB P C OC P

A A BOA P B OB P

A A B COA P B C OC P

A A COA P C OC P

A A BC B C

A B A A BA B C OA OB B OB OCC

P T P

P T P

P T T P

P T P

T T T

R R P R PT

AC R ,

AOA OCP

Page 18: Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:

Chapter 2: Description of position and orientation

18

Faculty of Engineering - Mechanical Engineering Department

ROBOTICSTransformation operations: (Multiplication and inversion)

• Inverse

1

,

,

, , , ,

Given , what is ?

From we can extract both and .

Recall that 0 0 0 1

Also recall that ,

and,

A B AB A B

A A AB B OA OB

B BB A OB OAA

TB AA B

T TB B A A A A AOB OA A OB OA B OB OA B OA OB

B AA B

T T T

T R P

R PT

R R

P R P R P R P

T

1 ,

0 0 0 1

T TA A AB B OA OBR R P

T

Page 19: Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:

Chapter 2: Description of position and orientation

19

Faculty of Engineering - Mechanical Engineering Department

ROBOTICSTransformation operations: (Multiplication and inversion)

• Inverse (example 2.5)– Given

– Find BAT

Page 20: Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:

Chapter 2: Description of position and orientation

20

Faculty of Engineering - Mechanical Engineering Department

ROBOTICSGraphical Representation of the Transform

• Arrow directions indicate transformation between frames:

• i.e.: {A} is defined in {U}, {D} in {A},{C} in {B}… etc.

• Arrow direction:– Same direction

{U} to {A} – Opposite direction

{U} to {A}

UAT

1UAT

Page 21: Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:

Chapter 2: Description of position and orientation

21

Faculty of Engineering - Mechanical Engineering Department

ROBOTICSGraphical Representation of the Transform

• From the figure

• Suppose is unknownfind it!

BCT

Page 22: Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:

Chapter 2: Description of position and orientation

22

Faculty of Engineering - Mechanical Engineering Department

ROBOTICSGraphical Representation of the Transform

• From the figure

• Suppose is unknownfind it!

BCT

Page 23: Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:

Chapter 2: Description of position and orientation

23

Faculty of Engineering - Mechanical Engineering Department

ROBOTICSGraphical Representation of the Transform

Page 24: Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:

Chapter 2: Description of position and orientation

24

Faculty of Engineering - Mechanical Engineering Department

ROBOTICSMore on Representation of Orientation

• Orientation Variables:

9 variables: Note that in 3D-space 3 independent variables are required to describe the orientation.

9 variables + 6 constraint equations 3 independent variablesConstraint equations:

– Remark: generally, rotations are not commute,

11 12 13

21 22 23

31 32 33

ˆ ˆ ˆA A A AB B B B

r r r

R X Y Z r r r

r r r

ˆ ˆ ˆ1, 1, 1,

ˆ ˆ ˆ ˆ ˆ ˆ0, 0, 0,

A A AB B B

A A A A A AB B B B B B

X Y Z

X Y Y Z X Z

A B B AB C C BR R R R

Describe the orientation using 3 parameters would be simpler

Page 25: Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:

Chapter 2: Description of position and orientation

25

Faculty of Engineering - Mechanical Engineering Department

ROBOTICSMore on Representation of Orientation

• Example:0.866 0.5 0

ˆ( ,30) 0.5 0.866 0 ,

0 0 1zR Rot z

1 0 0

ˆ( ,30) 0 0.866 0.5 ,

0 0.5 0.866xR Rot x

0.87 0.43 0.25 0.87 0.5 0

0.5 0.75 0.43 0.43 0.75 0.5

0 0.5 0.87 0 0.43 0.87z x x zR R R R

Page 26: Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:

Chapter 2: Description of position and orientation

26

Faculty of Engineering - Mechanical Engineering Department

ROBOTICSOrientation description using 3 angular parameters:

• Roll, Pitch, Yaw angles (rotation about fixed axes XYZ){A} and {B} are initially coincident (have the same orientation)– Rotate {B} about by an angle γ– Rotate {B} about by an angle β– Rotate {B} about by an angle α(γ, β, α) ≡ (roll, pitch, yaw) angles

Page 27: Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:

Chapter 2: Description of position and orientation

27

Faculty of Engineering - Mechanical Engineering Department

ROBOTICSOrientation description using 3 angular parameters:

• Roll, Pitch, Yaw angles (rotation about fixed axes XYZ)(,γ), (,β), (, α)

Page 28: Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:

Chapter 2: Description of position and orientation

28

Faculty of Engineering - Mechanical Engineering Department

ROBOTICSOrientation description using 3 angular parameters:

• Roll, Pitch, Yaw angles (rotation about fixed axes XYZ)(,γ), (,β), (, α)

Page 29: Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:

Chapter 2: Description of position and orientation

29

Faculty of Engineering - Mechanical Engineering Department

ROBOTICSOrientation description using 3 angular parameters:

• Roll, Pitch, Yaw angles (rotation about fixed axes XYZ)(,γ), (,β), (, α)

The order is a must!cα = cos(α), cβ = cos(β), c γ = cos(γ),

Page 30: Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:

Chapter 2: Description of position and orientation

30

Faculty of Engineering - Mechanical Engineering Department

ROBOTICSOrientation description using 3 angular parameters:

• Roll, Pitch, Yaw angles (rotation about fixed axes XYZ)

– Given , determine (α, β, γ)? (Inverse problem)

Solution: If cβ ≠ 0, Atan2(y,x)?

11 12 13

21 22 23

31 32 33

AB

r r r

R r r r

r r r

Page 31: Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:

Chapter 2: Description of position and orientation

31

Faculty of Engineering - Mechanical Engineering Department

ROBOTICSOrientation description using 3 angular parameters:

• Z-Y-X Euler Angles: Rotation about moving axes{A} and {B} are initially coincident (have the same orientation)– Rotate {B} about by an angle α– Rotate {B} about by an angle β– Rotate {B} about by an angle γ

Page 32: Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:

Chapter 2: Description of position and orientation

32

Faculty of Engineering - Mechanical Engineering Department

ROBOTICSOrientation description using 3 angular parameters:

• Z-Y-X Euler Angles: Rotation about moving axes{A} and {B} are initially coincident (have the same

orientation)– Rotate {B} about by an angle γ– Rotate {B} about by an angle β– Rotate {B} about by an angle α(γ, β, α) ≡ (roll, pitch, yaw) angles

Page 33: Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:

Chapter 2: Description of position and orientation

33

Faculty of Engineering - Mechanical Engineering Department

ROBOTICSOrientation description using 3 angular parameters:

• Z-Y-X Euler Angles: Rotation about moving axes

Page 34: Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:

Chapter 2: Description of position and orientation

34

Faculty of Engineering - Mechanical Engineering Department

ROBOTICSOrientation description using 3 angular parameters:

• Z-Y-X Euler Angles: Rotation about moving axes{A} and {B} are initially coincident (have the same orientation)– Rotate {B} about by an angle α– Rotate {B} about by an angle β– Rotate {B} about by an angle γ

( , )AB R Rot z

( , )BB R Rot y

( , )B BB BR R Rot x

( , ) ( , ) ( , )A A B BB B B BR R R R Rot z Rot y Rot x

The same as obtained before, however in fixed axes rotations, rotations have opposite order!

Page 35: Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:

Chapter 2: Description of position and orientation

35

Faculty of Engineering - Mechanical Engineering Department

ROBOTICSOrientation description using 3 angular parameters:

• Z-Y-Z Euler Angles:The same as Z-Y-X procedure, however the last rotation is around

Page 36: Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:

Chapter 2: Description of position and orientation

36

Faculty of Engineering - Mechanical Engineering Department

ROBOTICSEquivalent Angle-Axis Representation:

• Any relative orientation can be described by a rotation by an angle θ around a given axis (direction)

Angle + direction vector ≡ 3 independent variables

ˆx

y

z

k

K k

k

Axis of rotation Only 2 are independent

2 2 2 1x y zk k k

θ

Page 37: Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:

Chapter 2: Description of position and orientation

37

Faculty of Engineering - Mechanical Engineering Department

ROBOTICSEquivalent Angle-Axis Representation:

• Given θ and , find R

• Given R, find θ and

Page 38: Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:

Chapter 2: Description of position and orientation

38

Faculty of Engineering - Mechanical Engineering Department

ROBOTICSEquivalent Angle-Axis Representation: