mt411 robotic engineering

34
MT411 Robotic Engineering Asian Institution of Technology (AIT) Chapter 3 Coordinate Transform Narong Aphiratsakun, D.Eng

Upload: alyn

Post on 31-Jan-2016

40 views

Category:

Documents


1 download

DESCRIPTION

MT411 Robotic Engineering. Chapter 3 Coordinate Transform. Asian Institution of Technology (AIT). Narong Aphiratsakun, D.Eng. Cartesian Coordinate. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: MT411 Robotic Engineering

MT411Robotic Engineering

Asian Institution of Technology (AIT)

Chapter 3

Coordinate Transform

Narong Aphiratsakun, D.Eng

Page 2: MT411 Robotic Engineering

Cartesian Coordinate

The position of an object in space is described with Cartesian coordinates. Coordinate axes for 2-3 dimensional system (2D and 3D) are normally labeled as shown in the figure below. There is no standard in computer graphics and axis labeling varies from books to books. But consistence of direction is important in the analysis. In this class, we would follow a Roll-Pitch-Yaw axis (R-P-Y).

X

Z

Y

Y

X

X (Roll)

Z (Yaw)

Y (Pitch)

a

b g

Page 3: MT411 Robotic Engineering

Cartesian Coordinate

Here the chosen coordinate frame forms a right hand set vectors. The positive direction of rotation is chosen in accordance with the right hand as illustrated.

Hold your right hand open, with your thumb pointing in the direction of the axis of rotation, and your fingers pointing in the direction of a second axis. Curl your fingers through 90 degree until they point in the direction of the third axis. This is a positive direction.

(for this class)Take CW : -ve and CCW : +ve

Page 4: MT411 Robotic Engineering

Position

Coordinate of point p can be specify with respect to frame 0 or frame 1.

For example0 15 2.8

,6 4.2

p p

Page 5: MT411 Robotic Engineering

Rotation

This notation specify rotation of coordinates vectors for the axes of frame 1 with respect to coordinate frame 0.

01R

11 1201

21 22

a aHOW TOOBTAIN THIS ROTATION MATRIX R

a a

Page 6: MT411 Robotic Engineering

Rotation in the plane

11 1201

21 22

a aR

a a

Page 7: MT411 Robotic Engineering

Rotation in the plane

1 001

1 0

01 1

.cos

sin .

: 0

x xx

x y

x x with referenceto axis

Page 8: MT411 Robotic Engineering

Rotation in the plane

01

01 1

cos

sin

: 0

y

y y with referenceto axis

01

1 001

1 0

cos(90 ) cos90 cos sin 90 sincos

sin sin(90 ) sin 90 cos cos90 sin

.sin

cos .

y

y xy

y y

Page 9: MT411 Robotic Engineering

Rotation in the plane

1 0 1 001

1 0 1 0

. . cos sin

. . sin cos

x x y xR

x y y y

x1relative to frame x0y0.

This notation specify rotation of coordinates vectors for the axes of frame 1 with respect to coordinate frame 0.

01R

Page 10: MT411 Robotic Engineering

Rotation in the plane

0 1 0 110

0 1 0 1

. .

. .

x x y xR

x y y y

x0 relative to frame x1y1.

This notation specify rotation of coordinates vectors for the axes of frame 0 with respect to coordinate frame 1.

10R

Page 11: MT411 Robotic Engineering

Rotation in the plane

dot product is commutative : . .i j j ix y y x

0 1 0 110

0 1 0 1

. .

. .

x x y xR

x y y y

1 0 1 001

1 0 1 0

. .

. .

x x y xR

x y y y

0 11 0

TR R

Page 12: MT411 Robotic Engineering

Rotation in 3D

The projection technique before scale to the 3 dimensional case. The matrix is given as

1 0 1 0 1 0

01 1 0 1 0 1 0

1 0 1 0 1 0

. . .

. . .

. . .

x x y x z x

R x y y y z y

x z y z z z

Page 13: MT411 Robotic Engineering

Rotation in 3D : Rotation about z-axis

,

cos sin 0

sin cos 0

0 0 1zR

0 1

1 0

1 0

1 0

1 0

. 1

. 0

. 0

. 0

. 0

z z

and

x z

y z

z x

z y

Page 14: MT411 Robotic Engineering

Rotation in 3D : Rotation about x-axis and y-axis

,

1 0 0

0 cos sin

0 sin cosxR

,

cos 0 sin

0 1 0

sin 0 cosyR

0 1. 1x x

0 1. 1y y

Page 15: MT411 Robotic Engineering

Rotational Transformation : 2D

Many times, we would like to know the new coordinates from the rotation from old coordinates.

new oldP A P

Page 16: MT411 Robotic Engineering

Rotational Transformation : 2D

If L =1,

By normal convention, we know that

1 3 1,

2 2

T

P

1 230 , 30

2 3 1,

2 2

T

P

Let’s apply the formula: 2 1P A P

12

1 3cos( 60) sin( 60) 2 2sin( 60) cos( 60) 3 1

2 2

A

2

1 3 3 32 2 2 2

1 13 12 22 2

P

Page 17: MT411 Robotic Engineering

Rotational Transformation : 2D

EX: If L =1, 1 3 1,

2 2

T

P

1 2 80

12A

2P

Page 18: MT411 Robotic Engineering

Rotational Transformation : 3D

In a similar way,

1 0 1 0 1 0

01 1 0 1 0 1 0

1 0 1 0 1 0

. . .

. . .

. . .

x x y x z x

A x y y y z y

x z y z z z

new oldP A P

Page 19: MT411 Robotic Engineering

Rotational Transformation : 3D

EX: P0 is at [0 2 0]T position of the reference frame. Compute the vector P1 obtained by rotating this vector about Z-axis by 30 degrees CW.

1 0, 30

, 30

1

0.86 0.5 0

0.5 0.86 0

0 0 1

0.86 0.5 0 0 1

0.5 0.86 0 2 1.73

0 0 1 0 0

z

z

p R p

R

p

Page 20: MT411 Robotic Engineering

Rotational Transformation : 3D

EX: If P0 is at [2 0 0]T position of the reference frame. Compute the vector P1 obtained by rotating this vector about Z-axis by 30 degrees CW.

1 0, 30

, 30

1

z

z

p R p

R

p

Page 21: MT411 Robotic Engineering

Rotational Transformation : 3D

EX: If P0 is at [2 0 0]T position of the reference frame. Compute the vector P1 obtained by rotating this vector about Y-axis by 30 degrees CCW.

1 0,30

,30

1

y

y

p R p

R

p

Page 22: MT411 Robotic Engineering

2-Dimensional Transformations with Translation

1

1

cos( ) sin( )

sin( ) cos( )

0 0 1 11

x q x

y r y

Translation can not be produced by assigning values to the elements of a 2x2 matrix.

1

1

( cos( ) sin( ))

( cos( ) sin( ))

x x y q

y y x r

Translation parameter

Page 23: MT411 Robotic Engineering

3-Dimensional Transformations with Translation

1

1

1

cos( ) sin( ) 0

sin( ) cos( ) 0

0 0 1

0 0 0 1 11

x q x

y r y

s zz

For 3D matrix, rotation and translation about z-axis will produced

Page 24: MT411 Robotic Engineering

Homogenous Transformation

3 3

* *

3 1 0 1

1 * 3 1*1

Rotation TranslationH

Homogenous transformation is a matrix representation of a rigid motions : combine of rotation and translation.

Page 25: MT411 Robotic Engineering

For Rotation Homogeneous transformation

Homogenous Transformation

,

cos sin 0 0

sin cos 0 0

0 0 1 0

0 0 0 1

zR

,

1 0 0 0

0 cos sin 0

0 sin cos 0

0 0 0 1

xR

,

cos 0 sin 0

0 1 0 0

sin 0 cos 0

0 0 0 1

yR

Page 26: MT411 Robotic Engineering

Homogenous Transformation

Translation in 3-D is more simple as there are three translation components for each direction. The general transformation matrix, corresponding to a translation by a vector q,r,s becomes

1 0 0

0 1 0( , , )

0 0 1

0 0 0 1

q

rD x y z

s

Page 27: MT411 Robotic Engineering

For Translation Homogeneous transformation

Homogenous Transformation

1 0 0

0 1 0 0( , )

0 0 1 0

0 0 0 1

q

D x q

1 0 0 0

0 1 0( , )

0 0 1 0

0 0 0 1

rD y r

1 0 0 0

0 1 0 0( , )

0 0 1

0 0 0 1

D z ss

Page 28: MT411 Robotic Engineering

Homogenous Transformation

EX: Let [x,y,z]G be the global frame and [x,y,z]L be the local frame of the system. Here rotate the local frame by 180 degrees CCW about z-axis and translate along y axis by 3 unit. Find the transformation matrix and test the result whether you have obtained the correct result with pold as [1,0,0].

XG

ZG

YG

XL

ZL

YL

3

0 *Gnew L oldP T P

Page 29: MT411 Robotic Engineering

Homogenous Transformation

0

0

[ ][ ] [ ( ,180 )]*[ ( ,3)]

[1 0 0 1]

1 0 0 0 1

0 1 0 3 0*

0 0 1 0 0

0 0 0 0 1

[ 1 3 0 1]

GL

Told

Gnew L old

Tnew

T R D Rot z D y

P

P T P

P

XG

ZG

YG

XL

ZL

YL

3

Page 30: MT411 Robotic Engineering

Homogenous Transformation

EX: Let [x,y,z]G be the global frame and [x,y,z]L be the local frame of the system. Here translate along y axis by 3 unit and rotate frame by 180 degrees CCW about z-axis. Find the transformation matrix and test the result whether you have obtained the correct result with pold as [1,0,0].

0 *Gnew L oldP T P

XG

ZG

YG

3

XL

ZL

YL

Page 31: MT411 Robotic Engineering

Homogenous Transformation

0

0

[ ][ ] [ ( ,3)]*[ ( ,180 )]

[1 0 0 1]

1 0 0 0 1

0 1 0 3 0*

0 0 1 0 0

0 0 0 0 1

[ 1 3 0 1]

GL

Told

Gnew L old

Tnew

T D R D y Rot z

P

P T P

P

XG

ZG

YG

3

XL

ZL

YL

Page 32: MT411 Robotic Engineering

EX: Perform the below transformations with a = 2 and b = 3. Draw the following frames. Frame 0 is shown.

Given p0 = [0,0,0]T, where is p1 wrt frame 0.

Homogenous Transformation

04 ( ,90 ) ( , ) ( ,90 ) ( , )T Rot y Trans z a Rot x Trans y b

X0

Z0

Y0

0 0 1 2 34 1 2 3 4T R D R Dwhere

Page 33: MT411 Robotic Engineering

Homogenous Transformation

04H

Page 34: MT411 Robotic Engineering

Homogenous Transformation

0 0 04 4

04

p H p

p