2 - 1 Spatial Description and Transformations
2 - 1 Spatial Description and Transformations
homogeneous
transformations
Robotics A
Dr. Mauro Eduardo Maya Méndez
Introducción
• The 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.
• Homogeneous transformations combine the operations of rotation
and translation into a single matrix multiplication, these area use for
the operations of rotation and translation
• Representations of points and vectors in a Euclidean space equipped
with multiple coordinate frames and we use rotation matrix to
represent relative orientations among coordinate frames.
Robotics A
Dr. Mauro Eduardo Maya Méndez
Representing positions
A point corresponds to a specific
location in space in order to assign
coordinates it is necessary to specify a
coordinate frame we could specify the
coordinates respect different frames.
With respect to frame 𝑜" 𝑥" 𝑦"
𝑝 = (5,6),
With respect to frame 𝑜- 𝑥- 𝑦-
𝑝 = (−2.8,4.2),
we will adopt a notation in which a
superscript is used to denote the
reference frame.
Robotics A
Dr. Mauro Eduardo Maya Méndez
Representing positions
We can also represent the position of the origin of one coordinate
system with respect to another.
Robotics A
Dr. Mauro Eduardo Maya Méndez
Representing positions.
Coordinate convention
To perform algebraic manipulations using coordinates, it is essential that
all coordinate vectors be defined with respect to the same coordinate
frame
Robotics A
Dr. Mauro Eduardo Maya Méndez
Representing rotations
To represent the relative position and orientation of one rigid body with
respect to another, we will attach coordinate frames to each body, and
then specify the geometric relationships between these coordinate
frames.
Robotics A
Dr. Mauro Eduardo Maya Méndez
Representing rotations
Robotics A
Dr. Mauro Eduardo Maya Méndez
Representing rotations
Recalling that the dot product of two unit vectors gives the projection of
one onto the other, we obtain
And the rotation matrices of 𝑜- 𝑥- 𝑦- with respect to 𝑜" 𝑥" 𝑦" , and 𝑜" 𝑥" 𝑦"
with respect to 𝑜- 𝑥- 𝑦- are defined as:
Robotics A
Dr. Mauro Eduardo Maya Méndez
Representing rotations
Robotics A
Dr. Mauro Eduardo Maya Méndez
Representing rotations
Since the inner product is commutative, (i.e. xi · yj = yj · xi), we see that
the orientación of 𝑜" 𝑥" 𝑦" with respect to the frame 𝑜- 𝑥- 𝑦- is the inverse
of the orientation de 𝑜- 𝑥- 𝑦- with respect to the frame a 𝑜" 𝑥" 𝑦" ;
It is customary to refer to the set of all such nxn matrices by the symbol
SO(n), which denotes the Special Orthogonal group of order n.
Robotics A
Dr. Mauro Eduardo Maya Méndez
Representing rotations
Rotations in trhee dimensions
The projection technique described above scales nicely to the three
dimensional case. In three dimensions, each axis of the frame 𝑜- 𝑥- 𝑦- 𝑧- is
projected onto coordinate frame 𝑜" 𝑥" 𝑦" 𝑧" The resulting rotation matrix is given
by
Robotics A
Dr. Mauro Eduardo Maya Méndez
Representing rotations
Example.
Suppose the frame 𝑜- 𝑥- 𝑦- 𝑧- is
rotated through an angle 𝜃 about the
𝑧" axis.
From the figure we obtain
Robotics A
Dr. Mauro Eduardo Maya Méndez
Representing rotations
The Basic Rotation Matrices. which together imply
The rotation matrix given is called a
basic rotation matrix (about the z-
axis)
The basic rotation matrices
representing rotations about the x
and y-axes are given as
Robotics A
Dr. Mauro Eduardo Maya Méndez
Representing rotations
Example
Consider the rotation matrix 𝑅-"
specifying the orientation of
𝑜- 𝑥- 𝑦- 𝑧- relative to 𝑜" 𝑥" 𝑦" 𝑧" , given
the coordinates 𝑥- , 𝑦- , 𝑧- .
- - ,
𝑥- = 0 and
5 5
- - ,
𝑦- = 0 −
5 5
𝑧- = 0 ,
1 0
hence
Robotics A
Dr. Mauro Eduardo Maya Méndez
Rotational Transformations
The rotation matrix can also be
used to transform the coordinates
of a point from one frame to
another. In order to obtain the point
𝑝 on the frame 𝑜" 𝑥" 𝑦" 𝑧" we apply
the equation:
where:
Robotics A
Dr. Mauro Eduardo Maya Méndez
Rotational Transformations
We can also use rotation matrices
to represent rigid motions that
correspond to pure rotation.
One corner of the block in the figure
is located at the point 𝑝D . After a
rotation about 𝑧" by the angle 𝜋 .
Derive the coordinates for 𝑝F given The rotation is defined by
only the coordinates for 𝑝D .
Robotics A
Dr. Mauro Eduardo Maya Méndez
Rotational Transformations
This same approach can be used to
rotate vectors with respect to a
coordinate frame
Example
The vector 𝑣 with coordinates 𝑣 " =
G
(0,1,1, ), is rotated about 𝑦" by .
5
The resulting vector 𝑣- has
coordinates given by
Robotics A
Dr. Mauro Eduardo Maya Méndez
Rotational Transformations
Summary
Robotics A
Dr. Mauro Eduardo Maya Méndez
Similarity Transformations
A coordinate frame is defined by a If A is the matrix representation of
set of basis vectors. a given linear transformation
A rotation matrix, as a coordinate in 𝑜" 𝑥" 𝑦" 𝑧" and B is the
transformation, can also be viewed representation of the same linear
as defining a change of basis from transformation in 𝑜- 𝑥- 𝑦- 𝑧- then A
one frame to another. and B are related as
Robotics A
Dr. Mauro Eduardo Maya Méndez
Similarity Tranformations
Example
Suppose frames 𝑜" 𝑥" 𝑦" 𝑧" and 𝑜- 𝑥- 𝑦- 𝑧- are related by the rotation.
If 𝐴 = 𝑅J,A relative to the frame 𝑜" 𝑥" 𝑦" 𝑧" , then, relative to frame
𝑜- 𝑥- 𝑦- 𝑧- , we have
In other words, B is a rotation about the 𝑧" -axis but expressed relative to
the frame 𝑜- 𝑥- 𝑦- 𝑧- .
Robotics A
Dr. Mauro Eduardo Maya Méndez
Composition of rotations
Rotation with respect to the current frame
A given point p can then be represented by coordinates specified
with respect to any of these three frames
Robotics A
Dr. Mauro Eduardo Maya Méndez
Composition of rotations
Example
Suppose initially that all three of the coordinate frames coincide.
First, rotate the frame 𝐹- relative to 𝐹" according 𝑅-" , Then, the frames
𝑜- 𝑥- 𝑦- 𝑧- and 𝑜5 𝑥5 𝑦5 𝑧5 coincident, we rotate 𝑜5 𝑥5 𝑦5 𝑧5 relative to 𝑜- 𝑥- 𝑦- 𝑧-
according to the transformation 𝑅5- . In each case we call the frame relative to
which the rotation occurs the current frame.
Robotics A
Dr. Mauro Eduardo Maya Méndez
Composition of rotations
Example
Suppose a rotation matrix R represents a rotation of angle ∅ about the
current y-axis followed by a rotation of angle 𝜃 about the current z-axis,
Then the matrix R is given by
Note that 𝑅 ≠ 𝑅N .
Robotics A
Dr. Mauro Eduardo Maya Méndez
Composition of rotations
Rotation with respect to the fixed frame
Perform a sequence of rotations, each about a given fixed coordinate
frame, We will refer to 𝒐𝟎 𝒙𝟎 𝒚𝟎 𝒛𝟎 as 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
Therefore
Robotics A
Dr. Mauro Eduardo Maya Méndez
Composition of rotations
Example
Suppose that a rotation matrix R represents a rotation of angle ∅ about 𝑦"
followed by a rotation of angle 𝜃 about the fixed 𝑧" .
The second rotation about the fixed axis is given by 𝑅T,U∅𝑅@,A 𝑅T,∅, is the
basic rotation about the z-axis expressed relative to the frame. Therefore,
the composition rule for rotational transformations gives us
Robotics A
Dr. Mauro Eduardo Maya Méndez
Composition of rotations
Summary
Let 𝐹" be a fixed frame, 𝐹- a current frame and 𝑅-" the rotation matrix
relating them,
If the second rotation is performed w.r.t. 𝐹" (fixed frame) then the
notation 𝑅5- is both confusing and inappropriate to represent this rotation.
Therefore, representing the rotation by R, we premultiply 𝑅-" by 𝑅 to
obtain
𝑅5" = 𝑅𝑅-"
Robotics A
Dr. Mauro Eduardo Maya Méndez
Compositions of rotations
Example
The matrix R is defined by 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
In order to determine the cumulative e↵ect of these rotations we simply
begin with the first rotation 𝑅Z,A and pre- or post-multiply as the case may
be to obtain
𝑅 = 𝑅Z,[ 𝑅@,\ 𝑅Z,A 𝑅@,∅𝑅T,]
Robotics A
Dr. Mauro Eduardo Maya Méndez
Parametrizations of rotations
Three ways in which an arbitrary rotation can be represented using only
three independent quantities
• The Euler Angle representation.
• The roll-pitch-yaw representation.
• The axis/angle representation
Robotics A
Dr. Mauro Eduardo Maya Méndez
Euler Angles
We can specify the orientation of frame 𝑭𝟏 relative to frame 𝑭𝟎 by
three angles (∅, 𝜃, ψ).
Robotics A
Dr. Mauro Eduardo Maya Méndez
Euler Angles
Special case In this case the equations ZYZ is
given by
Robotics A
Dr. Mauro Eduardo Maya Méndez
Roll, Pitch Yaw Angles
A rotation matrix R can also be first a yaw about 𝑥" through an
described as a product of angle ψ, , then pitch about the 𝑦" by
successive rotations about the the angle θ, and finally roll about the
principal coordinate axes 𝑥" , 𝑦" and 𝑧" by an angle ∅. These rotations
𝑧" taken in a specific order. These are successive rotations are relative
rotations define the roll, pitch, and to the fixed frame, the resulting
yaw angles, which we shall also transformation matrix is given by
denote ϕ, θ y ψ
Robotics A
Dr. Mauro Eduardo Maya Méndez
Axis/Angle Representation
Sometimes we require a rotation Therefore, a rotation about the axis k can
about an arbitrary axis in the space. be computed using a similarity
transformation as
,
Let 𝑘 = 𝑘Z , 𝑘T , 𝑘@ expressed in
the frame 𝑜" 𝑥" 𝑦" 𝑧" be a unit vector
defining an axis. We wish to derive
the rotation matrix 𝑅r,A representing
a rotation of θ about this axis.
A simples way to derive 𝑅r,A is note
the axis define by the vector k is
along the z-axis following the
rotational transformation
𝑅-" = 𝑅@,\ 𝑅T,] .
Robotics A
Dr. Mauro Eduardo Maya Méndez
Axis/Angle Representation
From the figure we see that Given an arbitrary rotation matrix R
with components 𝑟st , the equivalent
angle 𝜃 and equivalent axis k are
given by
Substituting
The axis/angle representation is not
unique, since
if 𝜃 = 0 the 𝑅 is the matrix identity
Donde and the axis of rotation is undefined.
Robotics A
Dr. Mauro Eduardo Maya Méndez
Axis/Angle Representation
Example The equivalent angle is given by
Suppose R is generated by a
rotation of 90° about 𝑧" , followed by
a rotation of 30° about
𝑦" followed by a rotation of 60 ° The equivalent axis is given from
about 𝑥" . Then
Hence, 𝑇𝑟 𝑅 = 0
Robotics A
Dr. Mauro Eduardo Maya Méndez
Rigid motions
Definition If we have the two rigid motions
y
A rigid motion is an ordered pair
𝑑, 𝑅 where 𝑑 ∈ 𝑅e and 𝑅 = 𝑆𝑂 3 . Then their compisition defines a
third rigid motion.
A rigid motion is a pure translation
together with a pure rotation.
we see that if frame 𝑜- 𝑥- 𝑦- 𝑧- is Since the relationship between 𝑝"
obtained from frame 𝑜" 𝑥" 𝑦" 𝑧" by first and 𝑝5 is also a rigid motion, we can
applying a rotation specified by equally describe it as
𝑅-" followed by a translation given by
𝑑-" , then the coordinates 𝑝" are
given by Comparings the previous equations
we have the relationships
Robotics A
Dr. Mauro Eduardo Maya Méndez
Homogeneous Transformations
Supposing In the matrix identity form are
Robotics A
Dr. Mauro Eduardo Maya Méndez
Homogeneous Transformations
The inverse transformation H "1 is A set of basic homogeneous
given by: tranformations generating 𝑆𝐸(3) is
given by
,
In the above equations 𝑛 = 𝑛Z 𝑛T 𝑛@ s a vector representing the
,
direction of 𝑥- in the 𝑜" 𝑥" 𝑦" 𝑧" system, s= 𝑠Z 𝑠T 𝑠@ represents the direction
,
of 𝑦- and a = 𝑎Z 𝑎T 𝑎@ represents the direction of 𝑧- . The vector
,
d = 𝑑Z 𝑑T 𝑑@ represents the vector from the origin 𝑜- to the origin 𝑜-
expressed in the frame 𝑜" 𝑥" 𝑦" 𝑧" .
Robotics A
Dr. Mauro Eduardo Maya Méndez
Homogeneous Transformations
Composition Rule for Homogeneous Transformations
Given a homogeneous transformation 𝐻-" relating two frames, if a second
rigid motion, represented by 𝐻 𝜖 𝑆𝐸(3) is performed relative to the current
frame, then
𝐻5" = 𝐻-" 𝐻
whereas if the second rigid motion is performed relative to the fixed frame,
then
𝐻5" = 𝐻𝐻-"
Robotics A
Dr. Mauro Eduardo Maya Méndez
Homogeneous Transformations
Example
The homogeneous transformation matrix H that represents a rotation by
angle 𝛼 about the current x-axis followed by a translation of b units along the
current x-axis, followed by a translation of d units along the current z-axis,
followed by a rotation by angle 𝜃 about the current z-axis, is given by
Robotics A
Dr. Mauro Eduardo Maya Méndez
Summary
• The matrices in 𝑆𝐸(𝑛) can be used to represent the relative position and
orientation of two coordinate frames.
• The notation 𝑝" represents the coordinates of the point 𝑝 relative to
frame 0.
• The relative orientation of two coordinate frames can be specified by a
rotation matrix
Robotics A
Dr. Mauro Eduardo Maya Méndez
Summary
• Rotation matrices can be used to perform coordinate transformations
between frames that differ only in orientation. We derived rules for the
composition of rotational transformations as
Robotics A
Dr. Mauro Eduardo Maya Méndez
Summary
• Roll, pitch and yaw angles are similar, except that the successive
rotations are performed with respect to the fixed
• Homogeneous transformations combine rotation and translation. In three
dimensional case, a homogeneous tranformation has the form
Robotics A
Dr. Mauro Eduardo Maya Méndez
Referencias:
Robotics A
Dr. Mauro Eduardo Maya Méndez