3D Kinematics Consists of two parts

Slides:



Advertisements
Similar presentations
John C. Hart CS 318 Interactive Computer Graphics
Advertisements

UBI 516 Advanced Computer Graphics
CS B659: Principles of Intelligent Robot Motion Rigid Transformations.
Kinematics Pose (position and orientation) of a Rigid Body
3D Kinematics Eric Whitman 1/24/2010. Rigid Body State: 2D p.
Computer Graphics Recitation 2. 2 The plan today Learn about rotations in 2D and 3D. Representing rotations by quaternions.
Ch. 2: Rigid Body Motions and Homogeneous Transforms
Spatial Descriptions and Transformations Introduction to Motion
3-D Geometry.
3D orientation.
Ch. 3: Forward and Inverse Kinematics
CSCE 689: Computer Animation Rotation Representation and Interpolation
CSCE 441: Computer Graphics Rotation Representation and Interpolation
CSCE 641: Computer Graphics Rotation Representation and Interpolation Jinxiang Chai.
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Technical Background.
CS I400/B659: Intelligent Robotics Rigid Transformations.
CS 450: COMPUTER GRAPHICS 3D TRANSFORMATIONS SPRING 2015 DR. MICHAEL J. REALE.
ME/ECE Professor N. J. Ferrier Forward Kinematics Professor Nicola Ferrier ME Room 2246,
1 Kinematics ( 運動學 ) Primer Jyun-Ming Chen Fall 2009.
Rotations and Translations
Game Physics – Part IV Moving to 3D
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)
CS 480/680 Computer Graphics Representation Dr. Frederick C Harris, Jr. Fall 2012.
CS 450: COMPUTER GRAPHICS QUATERNIONS SPRING 2015 DR. MICHAEL J. REALE.
Computer Graphics Bing-Yu Chen National Taiwan University.
Mathematical Foundations Sections A-1 to A-5 Some of the material in these slides may have been adapted from university of Virginia, MIT and Åbo Akademi.
Rotations and Translations
Rick Parent - CIS681 ORIENTATION Use Quaternions Interpolating rotations is difficult.
1 CS 430/536 Computer Graphics I 3D Transformations World Window to Viewport Transformation Week 2, Lecture 4 David Breen, William Regli and Maxim Peysakhov.
Advanced Computer Graphics Spring 2014
3D Kinematics Consists of two parts
Chapter 2 Rigid Motions and Coordinate Transformations
Kinematics Primer Jyun-Ming Chen. Contents General Properties of Transform 2D and 3D Rigid Body Transforms Representation Computation Conversion … Transforms.
EEE. Dept of HONG KONG University of Science and Technology Introduction to Robotics Page 1 Lecture 2. Rigid Body Motion Main Concepts: Configuration Space.
Rotation and Orientation: Fundamentals Jehee Lee Seoul National University.
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 17, 2015 TRANSFORMATIONS AFFINE TRANSFORMATIONS QUATERNIONS.
Chapter 2: Description of position and orientation Faculty of Engineering - Mechanical Engineering Department ROBOTICS Outline: Introduction. Descriptions:
Comparing Two Motions Jehee Lee Seoul National University.
This Week WeekTopic Week 1 Coordinate Systems, Basic Functions Week 2 Trigonometry and Vectors (Part 1) Week 3 Vectors (Part 2) Week 4 Vectors (Part 3:
Euler Angles This means, that we can represent an orientation with 3 numbers Assuming we limit ourselves to 3 rotations without successive rotations about.
Computer Graphics I, Fall 2010 Transformations.
Week 5 - Monday.  What did we talk about last time?  Lines and planes  Trigonometry  Transforms  Affine transforms  Rotation  Scaling  Shearing.
Sect. 4.5: Cayley-Klein Parameters 3 independent quantities are needed to specify a rigid body orientation. Most often, we choose them to be the Euler.
Robotics Chapter 3 – Forward Kinematics
Objectives Introduce standard transformations Introduce standard transformations Derive homogeneous coordinate transformation matrices Derive homogeneous.
Pose2D [geometry_msgs/Pose2D]: float64 x float64 y float64 theta.
CA 302 Computer Graphics and Visual Programming
Transformations Review 4/18/2018 ©Babu 2009.
Computer Animation Algorithms and Techniques
CPSC 641: Computer Graphics Rotation Representation and Interpolation
CS 445 / 645 Introduction to Computer Graphics
Transformations Objectives
Ch. 2: Rigid Body Motions and Homogeneous Transforms
COMPUTER GRAPHICS CHAPTERS CS 482 – Fall 2017 TRANSFORMATIONS
Homogeneous Coordinates (Projective Space)
ROTATIONS & TRANSLATIONS
Translation, Rotation, and Transformation
CSE4421/5324: Introduction to Robotics
CSC4820/6820 Computer Graphics Algorithms Ying Zhu Georgia State University Transformations.
CHAPTER 2 FORWARD KINEMATIC 1.
Orientation3D in Three.JS
Rotation Representations
UMBC Graphics for Games
CSE 411 Computer Graphics Lecture #2 Mathematical Foundations
CS-378: Game Technology Lecture #2: Transformations Prof. Okan Arikan
Transformations Ed Angel
Geometric Objects and Transformations (II)
Chapter 2 Mathematical Analysis for Kinematics
UNIVERSITY OF ILLINOIS AT URBANA-CHAMPAIGN
Rotation and Orientation: Fundamentals
Presentation transcript:

3D Kinematics Consists of two parts 2D (rigid body) kinematics C.M. translation and rotation 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) Spring 2016

Homogeneous Coordinates (齊次座標) Translate, rotate with matrices Homogeneous Coordinates (齊次座標) Fall 2016

Homogeneous Coordinate Point in 3D: Translate(a,b,c) with homo. coord.: Fall 2016

Rotate a Point about Origin Rotate (z, q) r z Polar Coordinate: P (x, y) = (r cosf, r sinf) Fall 2016

Rotation Matrices v = Hu Fall 2016

Order Matters?! Translate(t1) Translate (t2) = Translate (t2) Translate (t1) Translate(t) Rotate(R) ≠ Rotate (R) Translate (t) Rotate (R1) Rotate (R2) ≠ Rotate (R2) Rotate (R1) Fall 2016

Order Matters! V V Rotate (0,0,1, 30); Translate (10, 0, 0); drawPlant( ); Translate (10, 0, 0); Rotate (0,0,1, 30); drawPlant( ); Fall 2016

兩種詮釋法 Translate (10,5) Rotate (z, 30) draw [transform點座標] V Fall 2016 Also give ways to compute the world pos, given local coord

Case 1: Translate (10, 0, 0); Translate (10, 0, 0); Rotate (0,0,1, 30); drawPlant( ); Translate (10, 0, 0); Rotate (0,0,1, 30); drawPlant( ); y x z Fall 2016

Case 2: Rotate (0,0,1, 30); Rotate (0,0,1, 30); Translate (10, 0, 0); drawPlant( ); Rotate (0,0,1, 30); Translate (10, 0, 0); drawPlant( ); y x z Fall 2016

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

Euler Angles Specify orientation in rotation angles along three axes Usually, refer to local axes Common used: RPY (roll, pitch, yaw) ZYZ (next page) Fall 2014

Euler Angles (ZYZ) a b g Fall 2014

[Euler Angles (ZYZ)] a=0 y’ z’’’ b=90 z’’’ z’’ g=90 y’’ Fall 2014 y’’’

[Performing Rotation with (a, b, g) ] Rot(z”,g) Rot(y’,b) Rot(z,a) = Rot(z,a) Rot(y,b) Rot(z,g) A three-page CAD article (1995) by Lee and Koh talked about this Fall 2014

Euler Angles Roll, pitch, yaw Why gimbal lock a problem? Roll, pitch, yaw Gimbal lock: reduced DOF due to overlapping axes 在目前這個configuration,飛機無法yaw Spring 2016

Loss of DOF in gimbal lock (url) Rotation (a, b, g, ‘XYZ’) When Rotation (0.4, 1.57, 0, ‘XYZ’) = Rotation (0, 1.57, 0.4, ‘XYZ’) Spring 2016

Axis-Angle Representation Rot(r,a) r: rotation axis (unit vector) a: rotation angle (rad. or deg.) follow right-handed rule DOF? 3 Rot(r,a)=Rot (-r,-a) Problem with null rotation: rot(r, 0), any r (many-to-one mapping) 單位向量:長度為1之向量 a r v’ v Fall 2014

Axis Angle (cont) Perform rotation Rodrigues rotation formula (next pages) Fall 2014

Rodrigues Rotation Formula Compute the transformed point v’, after the axis-angle rotation, Rot(r, a) r: rotation axis, unit vector 𝑣 ′ =𝑣 cos 𝛼+ 𝑟×𝑣 sin 𝛼+𝑟 𝑟∙𝑣 1− cos 𝛼 a r v’ v Alternative formula v’=R v

Example (Rodrigues Formula) 𝑣 ′ =𝑣 cos 𝛼+ 𝑟×𝑣 sin 𝛼+𝑟 𝑟∙𝑣 1− cos 𝛼 r v’ v y 𝑅𝑜𝑡 1,0,0 , 𝜋 2 1 1 0 = 1 1 0 cos 𝜋 2 + 1 0 0 × 1 1 0 sin 𝜋 2 + 1 0 0 1 0 0 ∙ 1 1 0 1− cos 𝜋 2 x =0+ 𝑖 𝑗 𝑘 1 0 0 1 1 0 + 1 0 0 = 0 0 1 + 1 0 0 = 1 0 1 z Fall 2014

Axis-Angle Interpolation: poor Composition: poor Rot(n1,q1) & Rot(n2,q2)  Rot(n1.5, q1.5) = ? Composition: poor Rot(n2,q2) Rot(n1,q1) =?= Rot(n3,q3) Fall 2014

[Euler’s Rotation Theorem] in three-dimensional space, any displacement of a rigid body such that a point on the rigid body remains fixed, is equivalent to a single rotation about some axis that runs through the fixed point. Spring 2016

2D Rotation orthogonal basis (after rotation) 𝑥=𝑟 cos ∅ 𝑦=𝑟 sin ∅ q f p 𝑥=𝑟 cos ∅ 𝑦=𝑟 sin ∅ r p’ q p f orthogonal basis (after rotation) Fall 2014

Extend to 3D Rotation Matrices y z x y z x y z 𝑅𝑜𝑡 𝑥,𝜃 = 1 0 0 0 cos 𝜃 − sin 𝜃 0 sin 𝜃 cos 𝜃 𝑅𝑜𝑡 𝑦,𝜃 = cos 𝜃 0 sin 𝜃 0 1 0 − sin 𝜃 0 cos 𝜃 𝑅𝑜𝑡 𝑧,𝜃 = cos 𝜃 −sin 𝜃 0 sin 𝜃 cos 𝜃 0 0 0 1 orthogonal basis Fall 2014

Rotation Matrix Three columns represent the basis Perform rotation: linear algebra Composition: trivial orthogonalization might be required due to FP errors Fall 2014

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

Rotation Matrix DOF? Interpolation: 9 numbers, but with these constraints, leaves 3 Interpolation: R1 & R2  R1.5 = ? Fall 2014

Gram-Schmidt Orthogonalization Given three independent vectors: u1, u2, u3 If 3x3 rotation matrix is no longer orthonormal, metric properties(volume, length, angle) might change! Fall 2014

[Proof (matrix version)] Rotation matrix is an orthogonal matrix [Proof (matrix version)] 1 is an eigenvalue of R x is the corresponding eigenvector (the rotation axis) Spring 2016

Quaternion A mathematical entity invented by Hamilton Definition i k j Fall 2014

Quaternion (cont) Operators Addition Multiplication Conjugate Length Fall 2014

Unit Quaternion as Rotation Define unit quaternion as follows to represent rotation Example Rot(z,90°) q and –q represent the same rotation DOF? 3 Fall 2014

In-class examples Rot(z,90°) Rot(z,-90°) Rot(x,180°) Rot(-z,-90°) Same as rot(z,90) Spring 2016

Important values & equalities Sin(q) Cos(q) 1 p/6 1/2 Sqrt(3)/2 p/4 Sqrt(2)/2 p/3 ½ p/2 Spring 2016

Unit Quaternion: rotating Fall 2014

Unit Quaternion: composition Fall 2014

Slerp (Spherical Linear Interpolation) q r unit sphere in R4 The computed rotation quaternion rotates about a fixed axis at constant speed Fall 2014

Unit Quaternion: slerp Fall 2014

Null Rotation (q = 0) Fall 2014

Ex: q and –q are the same! Fall 2014

q & -q in slerp May want to consider slerp (t, -q, r) instead of slerp (t, q, r), for smoother interpolation Fall 2014

Unit Quaternion Conversion Axis-angle 3x3 matrix Fall 2014

Unit Quaternion & Axis-Angle Axis-angle  quaternion: Quaternion axis-angle First, find axis (unit vector) Then, use both values of sine and cosine to find angle Example Fall 2014

Unit Quaternion3x3 Matrix Example Fall 2014

3x3 MatrixUnit Quaternion Find largest qi2; solve the rest Fall 2014

Exercise x y z Fall 2014

In-class Exercise y x z As we have shown, This corresponds to rot(z,90) (take the positive one) Spring 2016

quaternion→axis-angle Use both values of sine and cosine to determine the angle!! Spring 2016

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

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

Example x y,x’ z,z’ y’ y x,x’ z,y’ z’ Spring 2016

Matrix Conversion Spring 2016

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

Extra’s Spring 2016

From Mason’s book a g b Write a program … Spring 2016

y z x a x’’’ y’’’ z’’’ g b Spring 2016

Spring 2016

From previous page Spring 2016

From Lee and Koh (1995) Euler angles in ASF In v’=Mv convention Spring 2016