Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 2 Rigid Motions and Coordinate Transformations

Similar presentations


Presentation on theme: "Chapter 2 Rigid Motions and Coordinate Transformations"— Presentation transcript:

1 Chapter 2 Rigid Motions and Coordinate Transformations
Dr. Amit Goradia

2 Robot Model

3 Robot Kinematics Mathematical tools needed: Rigid body transformations
Vector and matrix algebra Rigid body transformations Translation Rotation Homogenous Transformations used to represent rigid body transformations

4 Forward Kinematics Given the various joint and link parameters, compute the end-effector (tool) location in task space. Given joint variables End-effector position and orientation, -Formula? Joint Frame World Forward Inverse

5 Inverse Kinematics Given a position in task space, compute the joint angles required to attain it. End effector position and orientation Formula for joint variables Joint Frame World Forward Inverse

6 Example 1

7 Example 2: Three Link Planer Robot
Joint Coordinates Task Coordinates Forward Kinematics Calculate Task Coordinates in terms of Joint Coordinates

8 Linear Algebra Concepts
The set of Real numbers is represented by: The set of positive real numbers is formally defined as: is an Eucledian space of real dimension Geometric Objects Points Vectors Transformations Coordinate frames Lines Rays Planes Normals etc.

9 Points v/s Vectors Points in represented as 3 numbers
Vectors in represented as 3 numbers They are not the same thing!!!! They have different operations and different behaviours

10 1D Example: Time Point in time: class meeting time
class meets at 9:00 am Vector in time: class duration class lasts 2 hours Operations: class at 2PM + class at 3PM ≠ class at 5PM !! 2 hour class + 3 hour class = 5 hours of classes class ends at 11AM – starts at 9AM = 3 hour class class starts at 9AM + lasts 2 hours = ends at 11AM 2 classes at 3PM ≠ one class at 6PM !! 2 classes last 3 hours = 6 hours of classes Class from 2PM to 10PM, half done at

11 “Coordinate Systems” for Time
Knowing just the hour number doesn’t tell you everything… AM vs. PM (or use 8h00 vs 20h00) Time zones: same point, many representations 10 (India) == 4:30 (UK) to remove ambiguity, often use GMT (World frame) If always staying in local time zone, not important if scheduling globally, must be careful. convert from one time zone to another. Also, hours only good within one day need to specify date & time UNIX time: seconds since 01/01/1970, 00h00 GMT Notice: time durations are unaffected by all this!

12 Points and Vectors in Space
Point describes a location in space can subtract points to get a vector can take weighted average of points to get a point Vector describes a displacement in space has a magnitude and direction can add, subtract, scale vectors can add vector to a point to get a point Has a dot product and cross product defined To represent them as three numbers, you must specify which coordinate system

13 Vector Interpretation
Think of a vector as a line in 2D or 3D Think of a matrix as a transformation on a line or set of lines V V’

14 (use the head-to-tail method to combine vectors)
Vectors: Dot Product Interpretation: the dot product measures to what degree two vectors are aligned A A+B = C (use the head-to-tail method to combine vectors) B C B A

15 Vectors: Dot Product Think of the dot product as a matrix multiplication The magnitude is the dot product of a vector with itself The dot product is also related to the angle between the two vectors

16 Vectors: Cross Product
The cross product of vectors A and B is a vector C which is perpendicular to A and B The magnitude of C is proportional to the sine of the angle between A and B The direction of C follows the right hand rule – this why we call it a “right-handed coordinate system”

17 Arithmetic for Points and Vectors

18 Coordinate Frames in 3D Origin point, and 3 orthonormal vectors for x,y,z axes (right-handed) f g h a b x y z O P Q c

19 Coordinates If you have coordinate triples such as:
Then, with frame such as you can construct a point or vector: Same coordinates, different frame  different point or vector Coordinates have no real meaning without a frame vectors don’t depend on the origin of the frame, only the axes

20 Coordinates of a Frame Suppose you have a frame
In world coordinates, might have But in itself always have coordinates:

21 Coordinate equivalences
Given a frame: Can have a point with some coords: Can have a vector with same coords: Formally, we have: Informally, p and look and act about the same People often sloppy, don’t distinguish point from vector Can only get away with it if you stay in same frame! And even then need to be careful… O

22 Coordinate Transformation
Rotation only Point p can be represented in both coordinate frames How to relate the coordinate in these two frames?

23 Rotations Basic Rotation
, , and represent the projections of onto OX, OY, OZ axes, respectively Since

24 Rotations Basic Rotation Matrix Rotation about x-axis by angle

25 Rotations Is it True? Rotation about x axis by angle

26 Basic Rotation Matrices
Rotation about x-axis by angle Rotation about y-axis by angle Rotation about z-axis by angle

27 Properties of Rotation Matrices
Basic Rotation Matrix Obtain the coordinate of from the coordinate of R is an orthogonal matrix (inverse equal to transpose) Dot products are commutative! <== 3X3 identity matrix

28 Properties of Rotation Matrices
Columns of R are unit vectors and are mutually orthogonal Columns of R represent a vector in the UVW frame w.r.t. XYZ frame Rows of r are also unit vectors and represent a basis in XYZ frame wrt UVW Space of all possible rotation matrices is denoted as (special orthogonal group of order 3)

29 Rotation Matrix as a Direction Cosine Matrix
Elements of the rotation matrix are the cosines of the unsigned angles between the moving axes and the fixed axes. is the unsigned angle between x’ and y

30 Example

31 Example 3 A point is attached to a rotating frame, the frame rotates 60 degree about the OZ axis of the reference frame. Find the coordinates of the point relative to the reference frame after the rotation.

32 Example 4 A point is the coordinate w.r.t. the reference coordinate system, find the corresponding point w.r.t. the rotated OU-V-W coordinate system if it has been rotated 60 degree about OZ axis.

33 Composition of Rotations
Consider a point p represented in 3 coordinate frames. Substituting: Which implies:

34 Composite Rotation Matrix
A sequence of finite rotations matrix multiplications do not commute rules: if rotating coordinate O-U-V-W is rotating about principal axis of OXYZ frame, then Pre-multiply the previous (resultant) rotation matrix with an appropriate basic rotation matrix if rotating coordinate OUVW is rotating about its own principal axes, then post-multiply the previous (resultant) rotation matrix with an appropriate basic rotation matrix

35 Example 5 Find the rotation matrix for the following operations:
Pre-multiply if rotate about the OXYZ axes Post-multiply if rotate about the OUVW axes

36 Composite Rotations (Intermediate Reference Frame)
Successive Rotations about Intermediate axes: Post-Multiply successive rotation matrices

37 Composite Rotations (Fixed Reference Frame)
Successive Rotations about fixed reference frames: Pre-multiply successive rotation matrices R is a rotation about the fixed Z axis

38 Orientation Representation Revisited
Rotation matrix representation needs 9 elements to completely describe the orientation of a rotating rigid body. There are only 3 unique quantities in a rotation matrix There are 6 redundant elements!!!!!! Compact method to represent orientation? Euler Angles Representation

39 Orientation Representation
Problems: 6 extra elements need to be specified Long series of computations with inherent numerical errors causes R to loose orthogonal property. Need to orthogonalize from time to time Can calculate a rotation difference but canot smoothly interpolate over a difference. Cannot smoothly rotate from one orientation to another.

40 Orientation Representation
Euler Angles Representation ( , , ) Many different types Description of Euler angle representations Euler Angle I Euler Angle II Roll-Pitch-Yaw Sequence about OZ axis about OZ axis about OX axis of about OU axis about OV axis about OY axis Rotations about OW axis about OW axis about OZ axis X convention Y convention Cardanian

41 Euler Angle I, Animated w'= z w'"= w" f v'" v " v' y u'" u' =u" x

42 Orientation Representation
Euler Angle I

43 Euler Angle I Resultant eulerian rotation matrix:

44 Euler Angle II, Animated
w'= z w"'= w" v"' v' =v" y u"' u" Note the opposite (clockwise) sense of the third rotation, f. u' x

45 Euler Angles → Rotation Matrix
Rotation Matrix with Euler Angle II

46 Rotation Matrix → Euler Angles
What if θ = nπ, n Є Z??

47 Singularity - Gimbal Lock
Two out of three axes are aligned Loss of one degree of freedom Apollo 11 and gimbal lock

48 Orientation Representation
Description of Roll Pitch Yaw Z` Description of Yaw, Pitch, Roll A rotation of about the OX axis ( ) -- yaw A rotation of about the OY axis ( ) -- pitch A rotation of about the OZ axis ( ) -- roll Y X

49 Roll Pitch Yaw Pre-multiply using the basic rotation matrices

50 Valid Rotation Sequences
6 sets of Euler Angles ZXZ, ZYZ, XZX, XYX, YZY, YXY 6 sets of Cardanian angles XYZ, YZX, ZXY, XZY, ZYX, YXZ Euler 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 rotation about a fixed axis through that point.

51 Universality of Euler Angles
Consider Euler 1 notation (X Convention) Remember that: Rotation matrix represents moving frame basis wrt fixed frame basis Columns represent moving axes wrt fixed axes Rows represent fixed axes wrt moving axes

52 Universality of Euler Angles
Show that: Parameterization of R can represent any proper orthonormal matrix Columns of R can be transformed into any arbitrary set of orthonormal vectors Proof: Column 3 : Representation of unit vector with spherical angle coordinates Can be made to coincide with any arbitrary vector by choosing proper angles

53 Universality of Euler Angles
Column 1: Where, Now, u1 , u2 are unit vectors and So u1 and u2 span the plane perpendicular to e3 and we can choose phi to generate any angle in that plane

54 Universality of Euler Angles
With choice of and , we can locate the Z axis of the new coordinate system arbitrarily With the choice of , we can locate the X axis perpendicular to Z and at any desired angle in that plane Choose Y to complete the triad Proof complete

55 Angle Axis Representation
(Rodriguez formula)

56 Angle Axis Representation
Define rotation axis r and an angle of rotation about r Results in a compact but non-minimal representation Procedure Rotate by about axis Z till r is coplaner with axis X Rotate by about axis Y to align r with Z Rotate about Z by Return r to original position by rotating about Y by and about z by Result

57 Angle Axis Representation
Consider following simplification: Now:

58 Angle Axis Representation
Total 4 parameters: 1 vector (3 parameters) A rotation angle about the vector Selected vector is normalized: If , then inverse is not defined. Singularities located at Not unique:

59 Rotation Representation using Quaternions
Quaternions were first introduced for complex number analysis Generalization of complex number representation 4 dimensional quantity One scalar A three tuple representing a vector. Avoid drawbacks of angle axis representation by Distinguish between rotations of different signs Avoid singularity at

60 Quaternions Popularized for use in rigid motion representation in
Invented by Hamilton in 1843: Along the royal canal in Dublin… Popularized for use in rigid motion representation in computer graphics by Shoemake in 80’s Increases computational efficiency as it requires less number of additions and multiplications for computing a given pose of a rigid body

61 Quaternions: Basic Properties
Properties of complex dimensions Consider 2 quaternions: Multiplication Complex Conjugate

62 Quaternions Let’s consider the set of unit quaternions:
This is a four-dimensional hypersphere, i.e. the 3-sphere The identity quaternion is: Consider: Therefore, the inverse of a unit quaternion is:

63 Quaternions Associate a rotation with a unit quaternion as follows:
Given a unit axis, , and an angle, : The associated quaternion is: Therefore, represents the same rotation as Let be the quaternion associated with the vector You can rotate from frame a to b: Composition: Inversion:

64 Example 6 What rotation is this? Rotate by

65 Example 7 Find the difference between these two axis angle rotations:

66 Quaternions: Interpolations
Suppose you’re given two rotations, and How do you calculate intermediate rotations? Do quaternions help? Suprisingly, this actually works Finds a geodesic (shortest path between points in space)

67 Affine Transformations
In Euclidean space, an affine transformation preserves following properties Collinearity of points Distance ratios Affine transformation composed of linear transformations and a translation.

68 Rigid Motions position vector of P in {B} is transformed to position vector of P in {A} description of {B} as seen from an observer in {A} Rigid body motions are Affine transformations Rotation of {B} with respect to {A} Translation of the origin of {B} with respect to origin of {A}

69 Rigid Motions Two Special Cases 1. Translation only
Axes of {B} and {A} are parallel 2. Rotation only Origins of {B} and {A} are coincident

70 Homogeneous Representation
Coordinate transformation from {B} to {A} Homogeneous transformation matrix Rotation matrix Position vector Scaling

71 Homogeneous Transformation
Special cases 1. Translation 2. Rotation

72 Homogeneous Coordinates
Add an extra component. 1 for a point, 0 for a vector: Transform a point: Top 3 rows are the affine transform Bottom row stays 1 Transform a vector Top 3 rows are the linear transform Bottom row stays 0

73 Homogeneous Arithmetic
Legal operations always end in 0 or 1!

74 Example 8 Translation along Z-axis by h: O, O’ O, O’ h

75 Example 9 Rotation about the X-axis by

76 Composite Homogeneous Transformation
Rules: Transformation (rotation/translation) w.r.t (X,Y,Z) (OLD FRAME), using pre-multiplication Transformation (rotation/translation) w.r.t (U,V,W) (NEW FRAME), using post-multiplication

77 Example 10 Find the homogeneous transformation matrix (T) for the following operations:

78 Homogeneous Representation
A frame in space (Geometric Interpretation) (z’) (y’) (X’) Principal axis n w.r.t. the reference coordinate system

79 Homogeneous Transformation
Translation

80 Homogeneous Transformation
Composite Homogeneous Transformation Matrix ? Transformation matrix for adjacent coordinate frames Chain product of successive coordinate transformation matrices

81 Example 11 For the figure shown below, find the 4x4 homogeneous transformation matrices and for i=1, 2, 3, 4, 5 Can you find the answer by observation based on the geometric interpretation of homogeneous transformation matrix?

82 Inverse Homogenous Transformation
Inverse of the rotation submatrix is equivalent to its transpose


Download ppt "Chapter 2 Rigid Motions and Coordinate Transformations"

Similar presentations


Ads by Google