Transformation Matrices - TU Chemnitz
Transcript of Transformation Matrices - TU Chemnitz
Transformation Matrices
Dr.-Ing. John Nassour
Artificial Intelligence & Neuro Cognitive Systems FakultΓ€t fΓΌr Informatik
π¦0
π§0
π¦1
π₯1
π§1 π
π§2
π¦2
π₯2 π§π
π¦π π₯π
Suggested literature
β’ Robot Modeling and Control β’ Robotics: Modelling, Planning and Control
14.10.2014 J.Nassour 2
14.10.2014 J.Nassour 3
Motivation
A large part of robot kinematics is concerned with the establishment of various coordinate systems to represent the positions and orientations of rigid objects, and with transformations among these coordinate systems. Indeed, the geometry of three-dimensional space and of rigid motions plays a central role in all aspects of robotic manipulation. A rigid motion is the action of taking an object and moving it to a different location without altering its shape or size
14.10.2014 J.Nassour 4
Transformation
The operations of ROTATION and TRANSLATION. Introduce the notion of HOMOGENEOUS TRANSFORMATIONS (combining the operations of rotation and translation into a single matrix multiplication).
14.10.2014 J.Nassour 5
Representing Positions
The coordinate vectors that represent the location of the point π in space with respect to coordinate frames ππ ππ ππ and ππ ππ ππ, respectively are:
14.10.2014 J.Nassour 6
Representing Positions
Lets assign coordinates that represent the position of the origin of one coordinate system (frame) with respect to another.
14.10.2014 J.Nassour 7
Representing Positions
What is a difference between the geometric entity called π and any particular coordinate vector π that is assigned to represent π?
π is independent of the choice of coordinate systems. π depends on the choice of coordinate frames.
14.10.2014 J.Nassour 8
Representing Positions
A point corresponds to a specific location in space. A vector specifies a direction and a magnitude (e.g. displacements or forces). The point π is not equivalent to the vector ππ, the displacement from the origin ππ to the point π is given by the vector ππ.
We will use the term vector to refer to what are sometimes called free vectors, i.e., vectors that are not constrained to be located at a particular point in space.
14.10.2014 J.Nassour 9
Representing Positions When assigning coordinates to vectors, we use the same notational convention that we used when assigning coordinates to points. Thus, ππ and ππ are geometric entities that are invariant with respect to the choice of coordinate systems, but the representation by coordinates of these vectors depends directly on the choice of reference coordinate frame.
14.10.2014 J.Nassour 10
Coordinate Convention
In order to perform algebraic manipulations using coordinates, it is essential that all coordinate vectors be defined with respect to the same coordinate frame. In the case of free vectors, it is enough that they be defined with respect to parallel coordinate frames.
14.10.2014 J.Nassour 11
Coordinate Convention
An expression of the form: is not defined since the frames ππ ππ ππ and ππ ππ ππ are not parallel.
14.10.2014 J.Nassour 12
Coordinate Convention
An expression of the form: is not defined since the frames ππ ππ ππ and ππ ππ ππ are not parallel.
Thus, we see a clear need, not only for a representation system that allows points to be expressed with respect to various coordinate systems, but also for a mechanism that allows us to transform the coordinates of points that are expressed in one coordinate system into the appropriate coordinates with respect to some other coordinate frame.
14.10.2014 J.Nassour 13
Representing Rotations
In order to represent the relative position and orientation of one rigid body with respect to another, we will rigidly attach coordinate frames to each body, and then specify the geometric relationships between these coordinate frames.
14.10.2014 J.Nassour 14
Representing Rotations
In order to represent the relative position and orientation of one rigid body with respect to another, we will rigidly attach coordinate frames to each body, and then specify the geometric relationships between these coordinate frames.
14.10.2014 J.Nassour 15
Representing Rotations
In order to represent the relative position and orientation of one rigid body with respect to another, we will rigidly attach coordinate frames to each body, and then specify the geometric relationships between these coordinate frames.
How to describe the orientation of one coordinate frame relative to another frame?
14.10.2014 J.Nassour 16
Rotation In The Plane
14.10.2014 J.Nassour 17
Rotation In The Plane
Fram ππ ππ ππ is obtained by rotating frame ππ ππ ππ by an angle π½. The coordinate vectors for the axes of frame ππ ππ ππ with respect to coordinate frame ππ ππ ππ are described by a rotation matrix:
whereπ ππ and π π
π are the coordinates in frame ππ ππ ππ of unit vectors π π and π π , respectively.
14.10.2014 J.Nassour 18
Rotation In The Plane
πΉ ππ is a matrix whose column vectors are the coordinates of the (unit vectors along the)
axes of frame ππ ππ ππ expressed relative to frame ππ ππ ππ.
14.10.2014 J.Nassour 19
Rotation In The Plane
πΉ ππ describes the orientation of frame ππ ππ ππ with respect to the frame ππ ππ ππ.
The dot product of two unit vectors gives the projection of one onto the other
πΉ ππ =?
14.10.2014 J.Nassour 20
Rotation In The Plane
The dot product of two unit vectors gives the projection of one onto the other
The orientation of frame ππ ππ ππ with respect to the frame ππ ππ ππ.
Since the inner product is commutative
14.10.2014 J.Nassour 21
Rotations In Three Dimensions
Each axis of the frame ππππππππ is projected onto coordinate frame ππππππππ. The resulting rotation matrix is given by:
14.10.2014 J.Nassour 22
Rotation About ππ By An Angle π½
14.10.2014 J.Nassour 23
Rotation About ππ By An Angle π½
Called a basic rotation matrix (about the z-axis) πΉ π,π½
14.10.2014 J.Nassour 24
Basic Rotation Matrix About The Z-axis
14.10.2014 J.Nassour 25
Basic Rotation Matrix About The X-axis
πΉ π,π½
14.10.2014 J.Nassour 26
Basic Rotation Matrix About The Y-axis
πΉ π,π½
14.10.2014 J.Nassour 27
Example Find the description of frame ππππππππ with respect to the frame ππππππππ.
14.10.2014 J.Nassour 28
Example
The coordinates of ππare
The coordinates of ππare
The coordinates of ππ are
Find the description of frame ππππππππ with respect to the frame ππππππππ.
14.10.2014 J.Nassour 29
Example Find the description of frame ππππππππ with respect to the frame ππππππππ.
The coordinates of ππare
The coordinates of ππare
The coordinates of ππ are
14.10.2014 J.Nassour 30
Rotational Transformations
πΊ is a rigid object to which a coordinate πππππ π is attached. Given ππ of the point π, determine the coordinates of π relative to a fixed reference πππππ π.
The projection of the point π onto the coordinate axes of the πππππ π:
14.10.2014 J.Nassour 31
Rotational Transformations
14.10.2014 J.Nassour 32
Rotational Transformations
Thus, the rotation matrix πΉ ππ can be used not
only to represent the orientation of coordinate frame ππ ππ ππ ππ with respect to frame ππ ππ ππ ππ , but also to transform the coordinates of a point from one frame to another. If a given point is expressed relative to
ππ ππ ππ ππ by coordinates ππ , then πΉ ππ ππ
represents the same point expressed relative to the frame ππ ππ ππ ππ.
14.10.2014 J.Nassour 33
Rotational Transformations
It is possible to derive the coordinates for ππ given only the coordinates for ππ and the rotation matrix that corresponds to the rotation about ππ. Suppose that a coordinate frame ππ ππ ππ ππ is rigidly attached to the block. After the rotation by π , the blockβs coordinate frame, which is rigidly attached to the block, is also rotated by π .
Rotation matrices to represent rigid motions
14.10.2014 J.Nassour 34
Rotational Transformations
The coordinates of ππ with respect to the reference frame ππ ππ ππ ππ :
Rotation matrices to represent rigid motions
14.10.2014 J.Nassour 35
Rotational Transformations Rotation matrices to represent vector rotation with respect to a coordinate frame.
Reminder:
14.10.2014 J.Nassour 36
Summary: Rotation Matrix
1.It represents a coordinate transformation relating the coordinates of a point p in two different frames.
2. It gives the orientation of a transformed coordinate frame with respect to a fixed coordinate frame. 3. It is an operator taking a vector and rotating it to a new vector in the same coordinate system.
14.10.2014 J.Nassour 37
Similarity Transformations The matrix representation of a general linear transformation is transformed from one frame to another using a so-called similarity transformation. For example, if π¨ is the matrix representation of a given linear transformation in ππ ππ ππ ππ and π© is the representation of the same linear transformation in ππ ππ ππ ππ then π¨ and π© are related as:
where πΉ ππ is the coordinate transformation between frames ππ ππ ππ ππ and
ππ ππ ππ ππ . In particular, if π¨ itself is a rotation, then so is π©, and thus the use of similarity transformations allows us to express the same rotation easily with respect to different frames.
14.10.2014 J.Nassour 38
Example
Suppose frames ππ ππ ππ ππ and ππ ππ ππ ππ are related by the rotation
If π¨ = πΉπrelative to the frame ππ ππ ππ ππ, then, relative to frame ππ ππ ππ ππ we have
π© is a rotation about the ππ β ππππ but expressed relative to the frame ππ ππ ππ ππ .
14.10.2014 J.Nassour 39
Rotation With Respect To The Current Frame
The matrix πΉ ππ represents a rotational transformation between the frames ππ ππ ππ ππ
and ππ ππ ππ ππ. Suppose we now add a third coordinate frame ππ ππ ππ ππ related to the frames ππ ππ ππ ππ and ππ ππ ππ ππ by rotational transformations. A given point π can then be represented by coordinates specified with respect to any of these three frames: ππ, ππ and ππ. The relationship among these representations of π is:
where eachπΉ ππ is a rotation matrix
14.10.2014 J.Nassour 40
In order to transform the coordinates of a point π from its representation ππ in the frame ππ ππ ππ ππ to its representation ππ in the frame ππ ππ ππ ππ , we may first transform to its
coordinates ππ in the frame ππ ππ ππ ππ using πΉ ππ and then
transform ππ to ππ using πΉ ππ .
Composition Law for Rotational Transformations
14.10.2014 J.Nassour 41
Composition Law for Rotational Transformations
Coincident: lie exactly on top of each other
Suppose initially that all three of the coordinate frames are coincide. We first rotate the frame ππ ππ ππ ππ relative to ππ ππ ππ ππ according to the
transformation πΉ ππ .
Then, with the frames ππ ππ ππ ππ and ππ ππ ππ ππ coincident, we rotate ππ ππ ππ ππ
relative to ππ ππ ππ ππ according to the transformation πΉ ππ .
In each case we call the frame relative to which the rotation occurs the current frame.
14.10.2014 J.Nassour 42
Example Suppose a rotation matrix R represents β’ a rotation of angle π about the current π β ππππ followed by β’ a rotation of angle π about the current π β ππππ.
14.10.2014 J.Nassour 43
Example Suppose a rotation matrix R represents β’ a rotation of angle π about the current π β ππππ followed by β’ a rotation of angle π about the current π β ππππ.
14.10.2014 J.Nassour 44
Example Suppose a rotation matrix R represents β’ a rotation of angle π about the current π β ππππ followed by β’ a rotation of angle π about the current π β ππππ.
14.10.2014 J.Nassour 45
Example Suppose a rotation matrix R represents β’ a rotation of angle π about the current π β ππππ followed by β’ a rotation of angle π about the current π β ππππ.
14.10.2014 J.Nassour 46
Example Suppose a rotation matrix R represents β’ a rotation of angle π about the current π β ππππ followed by β’ a rotation of angle π about the current π β ππππ
14.10.2014 J.Nassour 47
Example Suppose a rotation matrix R represents β’ a rotation of angle π about the current π β ππππ followed by β’ a rotation of angle π about the current π β ππππ
14.10.2014 J.Nassour 48
Example Suppose a rotation matrix R represents β’ a rotation of angle π about the current π β ππππ followed by β’ a rotation of angle π about the current π β ππππ
Rotational transformations do not commute
14.10.2014 J.Nassour 49
Rotation With Respect To The Fixed Frame
Performing a sequence of rotations, each about a given fixed coordinate frame, rather than about successive current frames. For example we may wish to perform a rotation about ππ followed by a rotation about ππ (and not ππ!). We will refer to ππ ππ ππ ππ as the fixed frame. In this case the composition law given before is not valid.
The composition law is obtained by multiplying the successive rotation matrices in the reverse order from that given by
14.10.2014 J.Nassour 50
Rotation with Respect to the Fixed Frame
Suppose we have two frames ππ ππ ππ ππ and
ππ ππ ππ ππ related by the rotational transformation πΉ ππ .
If πΉ represents a rotation relative to ππ ππ ππ ππ, the representation for πΉ in the current frame ππ ππ ππ ππ is given by:
Similarity Transformations
With applying the composition law for rotations about the current axis:
composition law for rotations about the current axis
Reminder:
14.10.2014 J.Nassour 51
Example Suppose a rotation matrix R represents β’ a rotation of angle π about ππ β ππππ followed by β’ a rotation of angleπabout the fixed ππβππππ
Similarity Transformations
Reminder:
composition law for rotations about the current axis
composition law for rotations about the fixed axis
The second rotation about the fixed axis is given by
which is the basic rotation about the z-axis expressed relative to the frame ππ ππ ππ ππ using a similarity transformation.
14.10.2014 J.Nassour 52
Example Suppose a rotation matrix R represents β’ a rotation of angle π about ππ β ππππ followed by β’ a rotation of angleπabout the fixed ππβππππ
Similarity Transformations
Reminder:
composition law for rotations about the current axis
composition law for rotations about the fixed axis
Therefore, the composition rule for rotational transformations
14.10.2014 J.Nassour 53
Example Suppose a rotation matrix R represents β’ a rotation of angle π about ππ β ππππ followed by β’ a rotation of angleπabout the fixed ππβππππ
14.10.2014 J.Nassour 54
Example Suppose a rotation matrix R represents β’ a rotation of angle π about ππ β ππππ followed by β’ a rotation of angleπabout the fixed ππβππππ
Suppose a rotation matrix R represents β’ a rotation of angle π about the current π β ππππ followed by β’ a rotation of angle π about the current π β ππππ.
14.10.2014 J.Nassour 55
Summary To note that we obtain the same basic rotation matrices, but in the reverse order.
Rotation with Respect to the Fixed Frame
Rotation with Respect to the Current Frame
14.10.2014 J.Nassour 56
Rules for Composition of Rotational Transformations
We can summarize the rule of composition of rotational transformations by: Given a fixed frame ππ ππ ππ ππ a current frame ππ ππ ππ ππ, together with rotation
matrix πΉ ππ relating them, if a third frame ππ ππ ππ ππ is obtained by a rotation πΉ
performed relative to the current frame then post-multiply πΉ ππ by πΉ = πΉ π
π to obtain
In each case πΉ ππ represents the transformation between the frames ππ ππ ππ ππ and
ππ ππ ππ ππ.
If the second rotation is to be performed relative to the fixed frame then it is both
confusing and inappropriate to use the notation πΉ ππ to represent this rotation. Therefore,
if we represent the rotation by πΉ, we pre-multiply πΉ ππ by πΉ to obtain
14.10.2014 J.Nassour 57
Example
Find R for the following sequence of basic rotations: 1. A rotation of Ο΄ about the current x-axis 2. A rotation of Ο about the current z-axis 3. A rotation of Ξ± about the fixed z-axis 4. A rotation of Ξ² about the current y-axis 5. A rotation of Ξ΄ about the fixed x-axis
Rotation with Respect to the Fixed Frame
Rotation with Respect to the Current Frame
Reminder:
14.10.2014 J.Nassour 58
Example
Find R for the following sequence of basic rotations: 1. A rotation of Ο΄ about the current x-axis 2. A rotation of Ο about the current z-axis 3. A rotation of Ξ± about the fixed z-axis 4. A rotation of Ξ² about the current y-axis 5. A rotation of Ξ΄ about the fixed x-axis
Rotation with Respect to the Fixed Frame
Rotation with Respect to the Current Frame
Reminder:
14.10.2014 J.Nassour 59
Example
Find R for the following sequence of basic rotations: 1. A rotation of Ο΄ about the current x-axis 2. A rotation of Ο about the current z-axis 3. A rotation of Ξ± about the fixed z-axis 4. A rotation of Ξ² about the current y-axis 5. A rotation of Ξ΄ about the fixed x-axis
Rotation with Respect to the Fixed Frame
Rotation with Respect to the Current Frame
Reminder:
14.10.2014 J.Nassour 60
Example
Find R for the following sequence of basic rotations: 1. A rotation of Ο΄ about the current x-axis 2. A rotation of Ο about the current z-axis 3. A rotation of Ξ± about the fixed z-axis 4. A rotation of Ξ² about the current y-axis 5. A rotation of Ξ΄ about the fixed x-axis
Rotation with Respect to the Fixed Frame
Rotation with Respect to the Current Frame
Reminder:
14.10.2014 J.Nassour 61
Example
Find R for the following sequence of basic rotations: 1. A rotation of Ο΄ about the current x-axis 2. A rotation of Ο about the current z-axis 3. A rotation of Ξ± about the fixed z-axis 4. A rotation of Ξ² about the current y-axis 5. A rotation of Ξ΄ about the fixed x-axis
Rotation with Respect to the Fixed Frame
Rotation with Respect to the Current Frame
Reminder:
14.10.2014 J.Nassour 62
Example
Find R for the following sequence of basic rotations: 1. A rotation of Ο΄ about the current x-axis 2. A rotation of Ο about the current z-axis 3. A rotation of Ξ± about the fixed z-axis 4. A rotation of Ξ² about the current y-axis 5. A rotation of Ξ΄ about the fixed x-axis
Rotation with Respect to the Fixed Frame
Rotation with Respect to the Current Frame
Reminder:
14.10.2014 J.Nassour 63
Example
Find R for the following sequence of basic rotations: 1. A rotation of Ξ΄ about the fixed x-axis 2. A rotation of Ξ² about the current y-axis 3. A rotation of Ξ± about the fixed z-axis 4. A rotation of Ο about the current z-axis 5. A rotation of Ο΄ about the current x-axis
Rotation with Respect to the Fixed Frame
Rotation with Respect to the Current Frame
Reminder:
14.10.2014 J.Nassour 64
Rotations in Three Dimensions
Each axis of the frame ππ ππ ππ ππ is projected onto the coordinate frame ππ ππ ππ ππ. The resulting rotation matrix is given by
Reminder:
The nine elements πππ in a general rotational transformation R are not independent
quantities. πΉπ πΊπΆ π
Where πΊπΆ(n) denotes the Special Orthogonal group of order n.
14.10.2014 J.Nassour 65
Rotations In Three Dimensions
For any π π ππ π The following properties hold β’ π π = π β1 π ππ π β’ The columns and the rows of π are mutually orthogonal β’ Each column and each row of π are is a unit vector β’ det π = 1 (the determinant) Where ππ(n) denotes the Special Orthogonal group of order n.
Example for πΉπ» = πΉβπ π πΊπΆ π :
14.10.2014 J.Nassour 66
Parameterizations Of Rotations
As each column of π are is a unit vector, then we can write:
As the columns of π are mutually orthogonal, then we can write:
Together, these constraints define six independent equations with nine unknowns, which implies that there are three free variables.
The nine elements πππ in a general rotational transformation R are not independent
quantities. π π ππ 3
Where ππ(n) denotes the Special Orthogonal group of order n.
14.10.2014 J.Nassour 67
We present three ways in which an arbitrary rotation can be represented using only three independent quantities: β’ Euler Angles representation β’ Roll-Pitch-Yaw representation β’ Axis/Angle representation
Parameterizations of Rotations
14.10.2014 J.Nassour 68
Euler Angles Representation
We can specify the orientation of the frame ππ ππ ππ ππ relative to the frameππ ππ ππ ππ by three angles (π, π½, π), known as Euler Angles, and obtained by three successive rotations as follows: 1. rotation about the z-axis by the angle π 2. rotation about the current yβaxis by the angle π½ 3. rotation about the current zβaxis by the angle π
14.10.2014 J.Nassour 69
Euler Angles Representation
14.10.2014 J.Nassour 70
14.10.2014 J.Nassour 71
Trigonometry (Atan vs. Atan2) Reminder:
Trigonometry (Atan vs. Atan2) Reminder:
14.10.2014 J.Nassour 72
14.10.2014 J.Nassour 73
Trigonometry (Atan vs. Atan2) Reminder:
tan(angle) = opposite/adjacent
atan(opposite/adjacent) = angle
14.10.2014 J.Nassour 74
Euler Angles Representation Given a matrix π π ππ 3 Determine a set of Euler angles π, π½, and π so that πΉ = πΉπππ
If πππ β π and πππ β π, it follow that: π=Atan2(πππ, πππ) where the function π΄π‘ππ2(π¦, π₯) computes the arctangent of the ration π¦/π₯. Then squaring the summing of the elements (1,3) and (2,3) and using the element (3,3) yields:
π½=Atan2(+ ππππ + πππ
π, πππ) or π½=Atan2(β ππππ + πππ
π, πππ) If we consider the first choice then πππ (π½) > π then: π=Atan2(πππ, βπππ) If we consider the second choice then ππ π π½ < π then: π=Atan2(β πππ, πππ) and π=Atan2(βπππ,βπππ)
14.10.2014 J.Nassour 75
Euler Angles Representation Given a matrix π π ππ 3 Determine a set of Euler angles π, π½, and π so that πΉ = πΉπππ
If πππ = πππ = π, then the fact that R is orthogonal implies that πππ = Β±π and that πππ = πππ = π thus R has the form: If πππ = +π then ππ = 1 and π π = 0, so thatπ = 0. Thus, the sum π + π can be determined as π + π = Atan2(πππ, πππ) = Atan2(β πππ, πππ) There is infinity of solutions.
14.10.2014 J.Nassour 76
Euler Angles Representation Given a matrix π π ππ 3 Determine a set of Euler angles π, π½, and π so that πΉ = πΉπππ
If πππ = πππ = π, then the fact that R is orthogonal implies that πππ = Β±π and that πππ = πππ = π thus R has the form: If πππ = βπ then ππ = β1 and π π = 0, so thatπ = Ο. Thus, the π β π can be determined as π β π = Atan2(βπππ, βπππ) = Atan2( πππ, πππ) As before there is infinity of solutions.
14.10.2014 J.Nassour 77
Roll-Pitch-Yaw Representation A rotation matrix πΉ can also be described as a product of successive rotations about the principal coordinate axes ππ ππ ππ ππ taken in a specific order. These rotations define the roll, pitch, and yaw angles, which we shall also denote (π, π½, π)
We specify the order in three successive rotations as follows: 1. Yaw rotation about ππ βaxis by the angle π 2. Pitch rotation about ππ β axis by the angle π½ 3. Roll rotation about ππ β axis by the angle π
Since the successive rotations are relative to the fixed frame, the resulting transformation matrix is given by:
14.10.2014 J.Nassour 78
Roll-Pitch-Yaw Representation A rotation matrix πΉ can also be described as a product of successive rotations about the principal coordinate axes ππ ππ ππ ππ taken in a specific order. These rotations define the roll, pitch, and yaw angles, which we shall also denote (π, π½, π)
We specify the order in three successive rotations as follows: 1. Yaw rotation about ππ βaxis by the angle π 2. Pitch rotation about ππ β axis by the angle π½ 3. Roll rotation about ππ β axis by the angle π
Since the successive rotations are relative to the fixed frame, the resulting transformation matrix is given by:
14.10.2014 J.Nassour 79
Roll-Pitch-Yaw Representation A rotation matrix πΉ can also be described as a product of successive rotations about the principal coordinate axes ππ ππ ππ ππ taken in a specific order. These rotations define the roll, pitch, and yaw angles, which we shall also denote (π, π½, π)
We specify the order in three successive rotations as follows: 1. Yaw rotation about ππ βaxis by the angle π 2. Pitch rotation about ππ β axis by the angle π½ 3. Roll rotation about ππ β axis by the angle π
Since the successive rotations are relative to the fixed frame, the resulting transformation matrix is given by:
14.10.2014 J.Nassour 80
Roll-Pitch-Yaw Representation A rotation matrix πΉ can also be described as a product of successive rotations about the principal coordinate axes ππ ππ ππ ππ taken in a specific order. These rotations define the roll, pitch, and yaw angles, which we shall also denote (π, π½, π)
We specify the order in three successive rotations as follows: 1. Yaw rotation about ππ βaxis by the angle π 2. Pitch rotation about ππ β axis by the angle π½ 3. Roll rotation about ππ β axis by the angle π
Since the successive rotations are relative to the fixed frame, the resulting transformation matrix is given by:
14.10.2014 J.Nassour 81
Roll-Pitch-Yaw Representation A rotation matrix πΉ can also be described as a product of successive rotations about the principal coordinate axes ππ ππ ππ ππ taken in a specific order. These rotations define the roll, pitch, and yaw angles, which we shall also denote (π, π½, π)
We specify the order in three successive rotations as follows: 1. Yaw rotation about ππ βaxis by the angle π 2. Pitch rotation about ππ β axis by the angle π½ 3. Roll rotation about ππ β axis by the angle π
Since the successive rotations are relative to the fixed frame, the resulting transformation matrix is given by:
14.10.2014 J.Nassour 82
Roll-Pitch-Yaw Representation A rotation matrix πΉ can also be described as a product of successive rotations about the principal coordinate axes ππ ππ ππ ππ taken in a specific order. These rotations define the roll, pitch, and yaw angles, which we shall also denote (π, π½, π)
We specify the order in three successive rotations as follows: 1. Yaw rotation about ππ βaxis by the angle π 2. Pitch rotation about ππ β axis by the angle π½ 3. Roll rotation about ππ β axis by the angle π
Since the successive rotations are relative to the fixed frame, the resulting transformation matrix is given by:
Instead of yaw-pitch-roll relative to the fixed frames we could also interpret the above transformation as roll-pitch-yaw, in that order, each taken with respect to the current frame. The end result is the same matrix.
π
π½
π
14.10.2014 J.Nassour 83
Roll-Pitch-Yaw Representation Find the inverse solution to a given rotation matrix R.
Determine a set of Roll-Pitch-Yaw angles π, π½, and π so that πΉ = πΉπΏππ
π
π½
π
14.10.2014 J.Nassour 84
Axis/Angle Representation Rotations are not always performed about the principal coordinate axes. We are often interested in a rotation about an arbitrary axis in space. This provides both a convenient way to describe rotations, and an alternative parameterization for rotation matrices.
Let π = [ππ, ππ, ππ]π», expressed in the frame ππ ππ ππ ππ, be
a unit vector defining an axis. We wish to derive the rotation matrix πΉπ,π½ representing a rotation of π½ about this axis. A possible solution is to rotate first π by the angles necessary to align it with π, then to rotate by π½ about π, and finally to rotate by the angels necessary to align the unit vector with the initial direction.
14.10.2014 J.Nassour 85
Axis/Angle Representation Rotations are not always performed about the principal coordinate axes. We are often interested in a rotation about an arbitrary axis in space. This provides both a convenient way to describe rotations, and an alternative parameterization for rotation matrices.
Let π = [ππ, ππ, ππ]π», expressed in the frame ππ ππ ππ ππ, be
a unit vector defining an axis. We wish to derive the rotation matrix πΉπ,π½representing a rotation of π½ about this axis. The sequence of rotations to be made with respect to axes of fixed frame is the following: β’ Align π with π (which is obtained as the sequence of a
rotation by βπΆ about π and a rotation of βπ· about π). β’ Rotate by π½ about π. β’ Realign with the initial direction of π, which is obtained as
the sequence of a rotation by π· about π and a rotation by πΆ about π.
πΉπ,π½ = πΉπ,πΆ πΉπ,π·πΉπ,π½πΉπ,βπ·πΉπ,βπΆ
14.10.2014 J.Nassour 86
Axis/Angle Representation
πΉπ,π½ = πΉπ,πΆ πΉπ,π·πΉπ,π½πΉπ,βπ·πΉπ,βπΆ
14.10.2014 J.Nassour 87
Axis/Angle Representation Rotations are not always performed about the principal coordinate axes. We are often interested in a rotation about an arbitrary axis in space. This provides both a convenient way to describe rotations, and an alternative parameterization for rotation matrices.
πΉπ,π½ = πΉπ,πΆ πΉπ,π·πΉπ,π½πΉπ,βπ·πΉπ,βπΆ
14.10.2014 J.Nassour 88
Axis/Angle Representation
Any rotation matrix π π ππ 3 can be represented by a single rotation about a suitable axis in space by a suitable angle.
πΉ = πΉπ,π½ where π is a unit vector defining the axis of rotation, and π½ is the angle of rotation about π. The matrix πΉπ,π½ is called the axis/angle representation of πΉ. Given πΉ find π½ and π:
Reminder:
14.10.2014 J.Nassour 89
Axis/Angle Representation
The axis/angle representation is not unique since a rotation of βπ½ about βπ is the same as a rotation of π½ about π.
πΉπ,π½ = πΉβπ,βπ½ If π½ = π then πΉ is the identity matrix and the axis of rotation is undefined.
14.10.2014 J.Nassour 90
Example Suppose πΉ is generated by a rotation of 90Β°about π§0 followed by a rotation of 30Β° about π¦0 followed by a rotation of 60Β° about π¦0. Find the axis/angle representation of πΉ
Reminder: The axis/angle representation of πΉ
14.10.2014 J.Nassour 91
Example Suppose πΉ is generated by a rotation of 90Β°about π§0 followed by a rotation of 30Β° about π¦0 followed by a rotation of 60Β° about π¦0. Find the axis/angle representation of πΉ
Reminder: The axis/angle representation of πΉ
14.10.2014 J.Nassour 92
Example Suppose πΉ is generated by a rotation of 90Β°about π§0 followed by a rotation of 30Β° about π¦0 followed by a rotation of 60Β° about π¦0. Find the axis/angle representation of πΉ
Reminder: The axis/angle representation of πΉ
14.10.2014 J.Nassour 93
Example Suppose πΉ is generated by a rotation of 90Β°about π§0 followed by a rotation of 30Β° about π¦0 followed by a rotation of 60Β° about π¦0. Find the axis/angle representation of πΉ
Reminder: The axis/angle representation of πΉ
14.10.2014 J.Nassour 94
Example Suppose πΉ is generated by a rotation of 90Β°about π§0 followed by a rotation of 30Β° about π¦0 followed by a rotation of 60Β° about π¦0. Find the axis/angle representation of πΉ
Reminder: The axis/angle representation of πΉ
14.10.2014 J.Nassour 95
Axis/Angle Representation The above axis/angle representation characterizes a given rotation by four quantities, namely the three components of the equivalent axis π and the equivalent angle π½. However, since the equivalent axis π is given as a unit vector only two of its components are independent. The third is constrained by the condition that π is of unit length. Therefore, only three independent quantities are required in this representation of a rotation πΉ. We can represent the equivalent axis/angle by a single vector π as: since π is a unit vector, the length of the vector π is the equivalent angle π½ and the direction of π is the equivalent axis π.
14.10.2014 J.Nassour 96
Rigid Motions
A rigid motion is a pure translation together with a pure rotation. A rigid motion is an ordered pair (π , πΉ) where π β βπ and πΉ β πΊπΆ π . The group of all rigid motions is known as the Special Euclidean Group and is denoted by πΊπ¬ π . We see then that πΊπ¬ π = βπ Γ πΊπΆ π .
14.10.2014 J.Nassour 97
One Rigid Motion If frame ππ ππ ππ ππ is obtained from frame ππ ππ ππ ππ by first applying a rotation
specified by πΉ ππ followed by a translation given (with respect to ππ ππ ππ ππ) by π π
π , then the coordinates ππ are given by:
ππ = πΉ ππ ππ + π π
π
π₯0
π¦0
π§0
π¦1
π₯1
π§1
π ππ
πΉ ππ
π
π₯0
π¦0
π§0
π¦1
π₯1
π§1
ππ
ππ
14.10.2014 J.Nassour 98
Two Rigid Motions If frame ππ ππ ππ ππ is obtained from frame ππ ππ ππ ππ by first applying a rotation
specified by πΉ ππ followed by a translation given (with respect to ππ ππ ππ ππ) by π π
π . If frame ππ ππ ππ ππ is obtained from frame ππ ππ ππ ππ by first applying a rotation
specified by πΉ ππ followed by a translation given (with respect to ππ ππ ππ ππ) by π π
π , find the coordinates ππ.
π₯0
π¦0
π§0
π¦1
π₯1
π§1
π
π§2
π¦2
π₯2
For the first rigid motion:
ππ = πΉ ππ ππ + π π
π For the second rigid motion:
ππ = πΉ ππ ππ + π π
π Both rigid motions can be described as one rigid motion:
ππ = πΉ ππ ππ + π π
π
ππ = πΉ ππ πΉ π
π ππ + πΉ ππ π + π π
πππ
14.10.2014 J.Nassour 99
Two Rigid Motions
π₯0
π¦0
π§0
π¦1
π₯1
π§1
π
π§2
π¦2
π₯2
πΉ ππ The orientation transformations can simply be multiplied together.
π ππ The translation transformation is the sum of:
β’ π ππ the vector from the origin π0 to the origin π1 expressed with respect to ππ ππ ππ ππ.
β’ πΉ ππ π π
π the vector from π1 to π2 expressed in the orientation of the coordinate system ππ ππ ππ ππ.
ππ = πΉ ππ πΉ π
π ππ + πΉ ππ π + π π
πππ
14.10.2014 J.Nassour 100
Three Rigid Motions
π₯0
π¦0
π§0
π¦1
π₯1
π§1
π
π§2
π¦2
π₯2
ππ = ?
π§3
π¦3 π₯3
14.10.2014 J.Nassour 101
Homogeneous Transformations
π₯0
π¦0
π§0
π¦1
π₯1
π§1 π
π§2
π¦2
π₯2
ππ = ?
π§π
π¦π π₯π
A long sequence of rigid motions, find ππ.
ππ = πΉ ππ ππ + π π
π
14.10.2014 J.Nassour 102
Homogeneous Transformations
π₯0
π¦0
π§0
π¦1
π₯1
π§1 π
π§2
π¦2
π₯2
ππ = ?
π§π
π¦π π₯π
A long sequence of rigid motions, find ππ. Represent rigid motions in matrix so that
composition of rigid motions can be reduced to matrix multiplication as was the case for
composition of rotations ππ = πΉ π
π ππ + π ππ
14.10.2014 J.Nassour 103
Homogeneous Transformations A long sequence of rigid motions, find ππ.
Represent rigid motions in matrix so that composition of rigid motions can be reduced to
matrix multiplication as was the case for composition of rotations
ππ = πΉ ππ ππ + π π
π
π =πΉ π
; π β βπ, πΉ β πΊπΆ π
14.10.2014 J.Nassour 104
Homogeneous Transformations A long sequence of rigid motions, find ππ.
Represent rigid motions in matrix so that composition of rigid motions can be reduced to
matrix multiplication as was the case for composition of rotations
ππ = πΉ ππ ππ + π π
π
π =πΉ π π π
; π β βπ, πΉ β πΊπΆ π
Transformation matrices of the form H are called homogeneous transformations. A homogeneous transformation is therefore a matrix representation of a rigid motion.
14.10.2014 J.Nassour 105
Homogeneous Transformations A long sequence of rigid motions, find ππ.
Represent rigid motions in matrix so that composition of rigid motions can be reduced to
matrix multiplication as was the case for composition of rotations
ππ = πΉ ππ ππ + π π
π
π =πΉ π π π
; π β βπ, πΉ β πΊπΆ π
πβπ = πΉπ» βπΉπ»π π π
The inverse transformation π―βπis given by
14.10.2014 J.Nassour 106
Ex. :Two Rigid Motions
π₯0
π¦0
π§0
π¦1
π₯1
π§1
π
π§2
π¦2
π₯2
πΉ ππ The orientation transformations can simply be multiplied together.
π ππ The translation transformation is the sum of:
β’ π ππ the vector from the origin π0 to the origin π1 expressed with respect to ππ ππ ππ ππ.
β’ πΉ ππ π π
π the vector from π1 to π2 expressed in the orientation of the coordinate system ππ ππ ππ ππ.
ππ = πΉ ππ πΉ π
π ππ + πΉ ππ π + π π
πππ
π =πΉ π π π
; π β βπ, πΉ β πΊπΆ π
πΉ ππ π π
π
π π πΉ π
π π ππ
π π= πΉ π
π πΉ ππ πΉ π
π π + π ππ
ππ
0 1
14.10.2014 J.Nassour 107
Ex. :Two Rigid Motions
π₯0
π¦0
π§0
π¦1
π₯1
π§1
π
π§2
π¦2
π₯2
πΉ ππ The orientation transformations can simply be multiplied together.
π ππ The translation transformation is the sum of:
β’ π ππ the vector from the origin π0 to the origin π1 expressed with respect to ππ ππ ππ ππ.
β’ πΉ ππ π π
π the vector from π1 to π2 expressed in the orientation of the coordinate system ππ ππ ππ ππ.
ππ = πΉ ππ πΉ π
π ππ + πΉ ππ π + π π
πππ
π =πΉ π π π
; π β βπ, πΉ β πΊπΆ π
πΉ ππ π π
π
π π πΉ π
π π ππ
π π= πΉ π
π πΉ ππ πΉ π
π π + π ππ
ππ
0 1
14.10.2014 J.Nassour 108
Ex. :Two Rigid Motions
π₯0
π¦0
π§0
π¦1
π₯1
π§1
π
π§2
π¦2
π₯2
πΉ ππ The orientation transformations can simply be multiplied together.
π ππ The translation transformation is the sum of:
β’ π ππ the vector from the origin π0 to the origin π1 expressed with respect to ππ ππ ππ ππ.
β’ πΉ ππ π π
π the vector from π1 to π2 expressed in the orientation of the coordinate system ππ ππ ππ ππ.
ππ = πΉ ππ πΉ π
π ππ + πΉ ππ π + π π
πππ
π =πΉ π π π
; π β βπ, πΉ β πΊπΆ π
πΉ ππ π π
π
π π πΉ π
π π ππ
π π= πΉ π
π πΉ ππ πΉ π
π π + π ππ
ππ
0 1
14.10.2014 J.Nassour 109
Ex. :Two Rigid Motions
π₯0
π¦0
π§0
π¦1
π₯1
π§1
π
π§2
π¦2
π₯2
πΉ ππ The orientation transformations can simply be multiplied together.
π ππ The translation transformation is the sum of:
β’ π ππ the vector from the origin π0 to the origin π1 expressed with respect to ππ ππ ππ ππ.
β’ πΉ ππ π π
π the vector from π1 to π2 expressed in the orientation of the coordinate system ππ ππ ππ ππ.
ππ = πΉ ππ πΉ π
π ππ + πΉ ππ π + π π
πππ
π =πΉ π π π
; π β βπ, πΉ β πΊπΆ π
πΉ ππ π π
π
π π πΉ π
π π ππ
π π= πΉ π
π πΉ ππ πΉ π
π π + π ππ
ππ
0 1
We must augment the vectors ππ, ππ and ππ by the addition of a fourth component of 1:
π·π = ππ
1, π·π = ππ
1, π·π = ππ
1
14.10.2014 J.Nassour 110
Homogeneous Transformations
π·π = π― π·πππ
π·π = π― π·πππ
β¦.. π·π = π― π·π
ππ
π¦0
π§0
π¦1
π₯1
π§1 π
π§2
π¦2
π₯2 π§π
π¦π π₯π
π·π = ππ
1
14.10.2014 J.Nassour 111
Basic Homogeneous Transformations
14.10.2014 J.Nassour 112
Homogeneous Transformations
π» 10 =
ππ₯ π π₯ππ¦ π π¦
ππ₯ ππ₯
ππ¦ ππ¦
ππ§ π π§
0 0ππ§ ππ§
0 1
=π π 0 0
π π0 1
π is a vector representing the direction of ππ in the ππ ππ ππ ππ system
π is a vector representing the direction of ππ in the ππ ππ ππ ππ system
π is a vector representing the direction of ππ in the ππ ππ ππ ππ system
14.10.2014 J.Nassour 113
Composition Rule For Homogeneous Transformations
Given a homogeneous transformation π― ππ relating two frames, if a second rigid
motion, represented by π― is performed relative to the current frame, then:
π» = π» 10 π»2
0 whereas if the second rigid motion is performed relative to the fixed frame, then:
π» = π»20 π» 1
0
14.10.2014 J.Nassour 114
Example
Find π― for the following sequence of 1. a rotation by πΆ about the current π β ππππ, followed by 2. a translation of π units along the current π β ππππ, followed by 3. a translation of π units along the current π β ππππ, followed by 4. a rotation by angle πΉ about the current π β ππππ
Transformation with respect to the current frame
π― = π― ππ π―π
π Transformation with respect to the fixed frame
π― = π―ππ π― π
π
Reminder:
14.10.2014 J.Nassour 115
Example
Find π― for the following sequence of 1. a rotation by πΆ about the current π β ππππ, followed by 2. a translation of π units along the current π β ππππ, followed by 3. a translation of π units along the current π β ππππ, followed by 4. a rotation by angle πΉ about the current π β ππππ
Transformation with respect to the current frame
π― = π― ππ π―π
π Transformation with respect to the fixed frame
π― = π―ππ π― π
π
Reminder:
14.10.2014 J.Nassour 116
Example
Find π― for the following sequence of 1. a rotation by πΆ about the current π β ππππ, followed by 2. a translation of π units along the current π β ππππ, followed by 3. a translation of π units along the current π β ππππ, followed by 4. a rotation by angle πΉ about the current π β ππππ
Transformation with respect to the current frame
π― = π― ππ π―π
π Transformation with respect to the fixed frame
π― = π―ππ π― π
π
Reminder:
14.10.2014 J.Nassour 117
Example
Find π― for the following sequence of 1. a rotation by πΆ about the current π β ππππ, followed by 2. a translation of π units along the current π β ππππ, followed by 3. a translation of π units along the current π β ππππ, followed by 4. a rotation by angle πΉ about the current π β ππππ
Transformation with respect to the current frame
π― = π― ππ π―π
π Transformation with respect to the fixed frame
π― = π―ππ π― π
π
Reminder:
14.10.2014 J.Nassour 118
Example
Find π― for the following sequence of 1. a rotation by πΆ about the current π β ππππ, followed by 2. a translation of π units along the current π β ππππ, followed by 3. a translation of π units along the current π β ππππ, followed by 4. a rotation by angle πΉ about the current π β ππππ
Transformation with respect to the current frame
π― = π― ππ π―π
π Transformation with respect to the fixed frame
π― = π―ππ π― π
π
Reminder:
14.10.2014 J.Nassour 119
Example
Find π― for the following sequence of 1. a rotation by πΆ about the current π β ππππ, followed by 2. a translation of π units along the current π β ππππ, followed by 3. a translation of π units along the current π β ππππ, followed by 4. a rotation by angle πΉ about the current π β ππππ
Transformation with respect to the current frame
π― = π― ππ π―π
π Transformation with respect to the fixed frame
π― = π―ππ π― π
π
Reminder:
14.10.2014 J.Nassour 120
Example Find π― π
π