Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009.

Similar presentations


Presentation on theme: "1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009."— Presentation transcript:

1 1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009

2 2 Contents General Properties of Transform 2D and 3D Rigid Body Transforms DOF (degree of freedom) Representation Computation Conversion … Transforms for Hierarchical Objects

3 3 Kinematic Modeling Two interpretations of transform “ Global ” :  An operator that “ displaces ” a point (or set of points) to desired location “ Local ” :  specify where objects are placed in WCS by moving the local frame Explain these concepts via 2D translation Verify that the same holds for rotation, 3D, …

4 4 Ex: 2D translation (move point) x y p The transform, as an operator, takes p to p ’, thus changing the coordinate of p: Tr(t) p = p ’ p’p’ Tr(t)

5 5 Ex: 2D translation (move frame) p’p’ x y x’x’ y’y’ p The transform moves the xy-frame to x ’ y ’ -frame and the point is placed with the same local coordinate. To determine the corresponding position of p ’ in xy-frame: Tr(t)

6 6 Properties of Transform Transforms are usually not commutable T a T b p  T b T a p (in general) Rigid body transform: the ones preserving the shape Two types:  rotation rot(n,  )  translation tr(t) Rotation axis n passes thru origin

7 7 Rigid Body Transform transforming a point/object rot(n,  ) p; tr(t) p not commutable rot(n,  ) tr(t) p  tr(t) rot(n,  ) p two interpretations (local vs. global axes, see next pages)

8 8 Hierarchical Objects For modeling articulated objects Robots, mechanism, … Goals: Draw it Given the configuration, able to compute the (global) coordinate of every point on body

9 9 Ex: Two-Link Arm (2D) Configuration Link 1: Box (6,1); bend 45 deg Link 2: Box (8,1); bend 30 deg Goals: Draw it find tip position x y x y

10 10 Ex: Two-Link Arm Tr(0,6) Rot(z,45) Rot(z,30) Tip pos:(0,8) Tip Position: T for link1: Rot(z,45) Tr(0,6) Rot(z,30) T for link2: Rot(z,45)

11 11 Ex: Two-Link Arm Rot(z,45) x’x’ y’y’ Tr(0,6 ’ ) x”x” y”y” Rot(z ”,30) Tip pos:(0 ’”,8 ’” ) x ”’ y ’” Thus, two views are equivalent The latter might be easier to visualize.

12 12 2D Kinematics Rigid body transform only consists of Tr(x,y) Rot(z,  ) Computation: 3x3 matrix is sufficient to realize Tr and Rot

13 13 3D Kinematics Consists of two parts 3D rotation 3D translation  The same as 2D 3D rotation is more complicated than 2D rotation (restricted to z- axis) Next, we will discuss the treatment for spatial (3D) rotation

14 14 DOF (degree of freedom) … of a system of moving bodies is the number of independent variables required to specify the configuration … is closely related to kinematic representation (# of independent variables) = (# of total variables) ̶ (# of equality constraints)

15 15 DOF of … A particle in R 2 R 3 A rigid body in R 2 R 3 2 3 3 2 4 (Plucker coordinates) a line in R 2 a line in R 3 a plane in R 3 3 6

16 16 3D Rotation Representations Euler angles Axis-angle 3X3 rotation matrix Unit quaternion Learning Objectives Representation (uniqueness) Perform rotation Composition Interpolation Conversion among representations …

17 17 Euler Angles Roll, pitch, yaw Ref: http://www.fho-emden.de/~hoffmann/gimbal09082002.pdf Gimbal lock: reduced DOF due to overlapping axes

18 Weird Interpolation … 18 Previous [-26, -90, 127] Next [71, 68, -105]

19 19 Axis-Angle Representation Rot(n,  ) n: rotation axis (global)  : rotation angle (rad. or deg.) follow right-handed rule Rot(n,  )=Rot (-n,-  ) Problem with null rotation: rot(n,0), any n Perform rotation Rodrigues formula (next page) Interpolation/Composition: poor Rot(n 2,  2 )Rot(n 1,  1 ) =?= Rot(n 3,  3 )

20 20 Rodrigues Formula v ’ =R v  r v v’v’ References: http://mesh.caltech.edu/ee148/notes/rotations.pdf http://www.cs.berkeley.edu/~ug/slide/pipeline/assignments/as5/rotation.ht ml r : unit vector (axis) This is the “ cross-product matrix ” r  v = r  v This is the “ cross-product matrix ” r  v = r  v

21 21 Rotation Matrix (xy plane) z

22 22 Rotation Matrix About y axis Rodrigues formula About any axis x y,y’ z z’ x’

23 Supplemental (rotation matrix & axis-angle) Rot ( a,  )  Q Q  Rot ( a,  ) Ref: url (local)urllocal

24 24 Rotation Matrix Three columns of R: the transformed bases Perform rotation: x ’ = Rx x y,y’ z z’ x’

25 25 Rotation Matrix (example) x y z y’ z’ x’ x y z y’ z’

26 26 Rotation Matrix (cont) Composition: trivial orthogonalization might be required due to FP errors Interpolation: ?

27 27 Gram-Schmidt Orthogonalization If 3x3 rotation matrix no longer orthonormal, metric properties might change! Verify!

28 28 Transformation Matrices v = Hu Translation Rotation (about principal axes) Scaling

29 29 Translation (math)

30 30 Frame y z x t x y z R Object coordinates Recall how we did the spotlight beam!

31 31 Quaternion A mathematical entity invented by Hamilton Definition i j k

32 32 Quaternion (cont) Operators Addition Multiplication Conjugate Length

33 33 Unit Quaternion Define unit quaternion as follows to represent rotation Example Rot(z,90°)  q and – q represent the same rotation Null rotation: q = [1,0,0,0] Why “ unit ” ? DOF point of view!

34 34 Example x y z x y z Rot (90, 0,0,1) OR Rot (-90,0,0,-1)

35 35 Unit Quaternion (cont) Perform Rotation Composition Interpolation Linear Spherical linear (slerp, more later)

36 36 Example x y,x ’ z,z ’ y’y’ Rot(z,90°) p(2,1,1)

37 37 Example (cont)

38 38 Example x y,x ’ z,z ’ y’y’ x,x ’ y z,y ’ z’z’

39 39 Matrix Conversion

40 40 Matrix Conversion (cont) Find largest q i 2 ; solve the rest

41 41 Spherical Linear Interpolation The computed rotation quaternion rotates about a fixed axis at constant speed References: http://www.gamedev.net/reference/articles/article1095.asp http://www.diku.dk/research-groups/image/teaching/Studentprojects/Quaternion/ http://www.sjbrown.co.uk/quaternions.html http://www.theory.org/software/qfa/writeup/node12.html q r unit sphere in R 4

42 42 Spatial Displacement Any displacement can be decomposed into a rotation followed by a translation Matrix Quaternion


Download ppt "1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009."

Similar presentations


Ads by Google