14
Robotics 1 1 Robotics 1 Minimal representations of orientation (Euler and roll-pitch-yaw angles) Homogeneous transformations Prof. Alessandro De Luca

Minimal representations of orientationdeluca/rob1_en/08_EulerRPYHomogeneous.p… · (relative pose = position & orientation) ! transforms the representation of a position vector (applied

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Minimal representations of orientationdeluca/rob1_en/08_EulerRPYHomogeneous.p… · (relative pose = position & orientation) ! transforms the representation of a position vector (applied

Robotics 1 1

Robotics 1

Minimal representations of orientation (Euler and roll-pitch-yaw angles)

Homogeneous transformations

Prof. Alessandro De Luca

Page 2: Minimal representations of orientationdeluca/rob1_en/08_EulerRPYHomogeneous.p… · (relative pose = position & orientation) ! transforms the representation of a position vector (applied

“Minimal” representations

!  rotation matrices: 9 elements - 3 orthogonality relationships - 3 unitary relationships = 3 independent variables

!  sequence of 3 rotations around independent axes !  fixed (ai) or moving/current (a’i) axes

!  generically called Roll-Pitch-Yaw (fixed axes) or Euler (moving axes) angles !  12 + 12 possible different sequences (e.g., XYX) !  actually, only 12 since

{(a1 !1), (a2 !2), (a3 !3)} " { (a’3 !3) , (a’2 !2), (a’1 !1)}

inverse problem

dire

ct p

robl

em

Robotics 1 2

Page 3: Minimal representations of orientationdeluca/rob1_en/08_EulerRPYHomogeneous.p… · (relative pose = position & orientation) ! transforms the representation of a position vector (applied

x’’

y’’

z’’"z’’’

x’’’

y’’’

#

#

cos # $- $sin # $0 sin # $ cos # $0 0 0 1

Rz” (#) =

ZX’Z’’ Euler angles

x

z"z’

y

x’

y’ %

%

cos % $- $sin % $0 sin % $ cos % $0 0 0 1

Rz(%) =

y’ &

&

x’"x’’

y’’

z’ z’’

Rx’(&) =

1 0 0 0 cos & -sin & 0 sin & cos &$

RF RF’

RF”

RF”’

1 2

3

Robotics 1 3

Page 4: Minimal representations of orientationdeluca/rob1_en/08_EulerRPYHomogeneous.p… · (relative pose = position & orientation) ! transforms the representation of a position vector (applied

ZX’Z’’ Euler angles

!  direct problem: given % , & , # ; find R

RZX’Z’’ (%, &, #) = RZ (%) RX’ (&) RZ’’ (#)

!  given a vector v”’= (x”’,y”’,z”’) expressed in RF”’, its expression in the coordinates of RF is

v = RZX’Z’’ (%, &, #) v”’

!  the orientation of RF”’ is the same that would be obtained with the sequence of rotations:

# around z, & around x (fixed), % around z (fixed)

c% c# - s% c& s# - c% s# - s% c& c# s% s& s% c# + c% c& s# - s% s# + c% c& c# - c% s& s& s# s& c# c&

= order of definition in concatenation

Robotics 1 4

Page 5: Minimal representations of orientationdeluca/rob1_en/08_EulerRPYHomogeneous.p… · (relative pose = position & orientation) ! transforms the representation of a position vector (applied

ZX’Z’’ Euler angles

!  inverse problem: given R = {rij}; find % , & , #

!  r132 + r23

2 = s2&, r33 = c& ' & = ATAN2{ ± ( r132 + r23

2, r33 }

!  if r132 + r23

2 ) 0 (i.e., s& ) 0)

r31/s& = s# , r32/s& = c# ' # = ATAN2{ r31/s&, r32/s& }

!  similarly... % = ATAN2{ r13/s&, -r23/s& }

!  there is always a pair of solutions

!  there are always singularities (here & = 0, ± *)

c% c# - s% c& s# - c% s# - s% c& c# s% s& s% c# + c% c& s# - s% s# + c% c& c# - c% s& s& s# s& c# c&

= r11 r12 r13 r21 r22 r23 r31 r32 r33

two values differing just for the sign

Robotics 1 5

Page 6: Minimal representations of orientationdeluca/rob1_en/08_EulerRPYHomogeneous.p… · (relative pose = position & orientation) ! transforms the representation of a position vector (applied

z’’’

x’’’

y’’’

Roll-Pitch-Yaw angles

x"x’

z

y

y’

%

%

cos % $- $ sin % 0 sin % $ cos % 0 0 0 1

with RZ(%) =

&&

y’’ z’’

RX(#) = 1 0 0 0 cos # - sin # 0 sin # cos #

1 2

3

#

# z’

z’

y’ y’

x’ x’’

y

with RY(&) =

cos & 0 sin & 0 1 0 - sin & 0 cos &$

ROLL PITCH

YAW

y’’ z’’

x’’

z

C1RY(&)C1T

C2RZ(%)C2T

Robotics 1 6

Page 7: Minimal representations of orientationdeluca/rob1_en/08_EulerRPYHomogeneous.p… · (relative pose = position & orientation) ! transforms the representation of a position vector (applied

Roll-Pitch-Yaw angles (fixed XYZ)

!  direct problem: given # , & , % ; find R

RRPY (#, &, %) = RZ (%) RY (&) RX (#)

!  inverse problem: given R = {rij}; find # , & , %

!  r322 + r33

2 = c2&, r31 = -s& ' & = ATAN2{-r31, ± ( r322 + r33

2}

!  if r322 + r33

2 ) 0 (i.e., c& ) 0)

r32/c& = s#, r33/c& = c# ' # = ATAN2{r32/c&, r33/c&}

!  similarly ... % = ATAN2{ r21/c&, r11/c& }

!  singularities for & = ± */2

c% c& c% s& s# - s% c# c% s& c# + s% s# s% c& s% s& s# + c% c# s% s& c# - c% s# - s& c& s# c& c#

= order of definition

for r31<0, two symmetric values w.r.t. */2

note the order of products!

Robotics 1 7

Page 8: Minimal representations of orientationdeluca/rob1_en/08_EulerRPYHomogeneous.p… · (relative pose = position & orientation) ! transforms the representation of a position vector (applied

…why this order in the product?

!  need to refer each rotation in the sequence to one of the original fixed axes !  use of the angle/axis technique for each rotation in the

sequence: C R(!) CT, with C being the rotation matrix reverting the previously made rotations (= go back to the original axes)

RRPY (#, &, %) = RZ (%) RY (&) RX (#)

order of definition “reverse” order in the product (pre-multiplication…)

RRPY (#, &, %) = [RX (#)] [RXT(#) RY (&) RX (#)]

[RXT(#) RY

T(&) RZ (%) RY (&) RX (#)] = RZ (%) RY (&) RX (#)

concatenating three rotations: [ ] [ ] [ ] (post-multiplication…)

Robotics 1 8

Page 9: Minimal representations of orientationdeluca/rob1_en/08_EulerRPYHomogeneous.p… · (relative pose = position & orientation) ! transforms the representation of a position vector (applied

Homogeneous transformations

P

OA

OB

Ap Bp

ApAB

RFA

RFB

Ap = ApAB + ARB Bp

‘affine’ relationship

Ap ARB ApAB Bp

= 1 0 0 0 1 1

= ATB Bphom Aphom =

linear relationship

Robotics 1 9

vector in homogeneous coordinates

4x4 matrix of homogeneous transformation

•  “applied” position vector

(with specific origin) ⇔ p0BP “applied” position vector (with specific origin) ⇔ p0AP

“applied” position vector (with specific origin) ⇔ p0A0B

Page 10: Minimal representations of orientationdeluca/rob1_en/08_EulerRPYHomogeneous.p… · (relative pose = position & orientation) ! transforms the representation of a position vector (applied

Properties of T matrix

!  describes the relation between reference frames (relative pose = position & orientation)

!  transforms the representation of a position vector (applied vector starting from the origin of the frame) from a given frame to another frame

!  it is a roto-translation operator on vectors in the three-dimensional space

!  it is always invertible (ATB)-1 = BTA

!  can be composed, i.e., ATC = ATB BTC + note: it does not commute!

Robotics 1 10

Page 11: Minimal representations of orientationdeluca/rob1_en/08_EulerRPYHomogeneous.p… · (relative pose = position & orientation) ! transforms the representation of a position vector (applied

Inverse of a homogeneous transformation

Ap = ApAB + ARB Bp Bp = BpBA + BRA Ap

ARB ApAB

0 0 0 1

ATB

BRA BpBA

0 0 0 1

BTA

ARBT - ARB

T ApAB

0 0 0 1 =

(ATB)-1

Robotics 1 11

= - ARBT ApAB + ARB

T Ap

Page 12: Minimal representations of orientationdeluca/rob1_en/08_EulerRPYHomogeneous.p… · (relative pose = position & orientation) ! transforms the representation of a position vector (applied

Defining a robot task

•  •  •  1

2 3

RFW

RFB

RFE

RFT

WTT = WTB BTE ETT

absolute definition of task

known, once the robot is placed

task definition relative to the robot end-effector

direct kinematics of the robot arm (function of q)

BTE(q) = WTB-1 WTT ETT

-1 = constant

Robotics 1 12

zE

yE

Page 13: Minimal representations of orientationdeluca/rob1_en/08_EulerRPYHomogeneous.p… · (relative pose = position & orientation) ! transforms the representation of a position vector (applied

Example of task definition

•  P

RFW

RFB

RFE

RFT

Robotics 1 13

zE

yE •  the robot carries a depth camera

(e.g., a Kinect) on the end-effector •  the end-effector should go to a pose

above the point P on the table, pointing its approach axis downward and being aligned with the table sides

•  point P is known in the table frame RFT

•  the depth camera proceeds centering point P in its image until it senses a distance h from the table (in RFE)

!

Tp =px

py

0

"

#

$ $

%

&

' '

zT

!

ER T= E x TEy T

EzT( ) =1 0 00 "1 00 0 "1

#

$

% %

&

'

( (

!

Ep =00h

"

#

$ $

%

&

' '

!

E TT-1 = TTE =

TRETpTE

0T 1"

# $

%

& '

!

TRE = ER T( )T= ER T

!

TpTE = Tp " TRE Ep =

px

py

h

#

$

% %

&

'

( (

with

Page 14: Minimal representations of orientationdeluca/rob1_en/08_EulerRPYHomogeneous.p… · (relative pose = position & orientation) ! transforms the representation of a position vector (applied

Final comments on T matrices !  they are the main tool for computing the direct kinematics

of robot manipulators

!  they are used in many application areas (in robotics and beyond)

!  in positioning/orienting a vision camera (matrix bTc with extrinsic parameters of the camera pose)

!  in computer graphics, for the real-time visualization of 3D solid objects when changing the observation point

ARB ApAB

!x !y !z ! ATB =

coefficients of perspective deformation

scaling coefficient

all zero in robotics

always unitary in robotics

Robotics 1 14