Spatcial Description & Transformation
Review
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
Central Topic
Problem
Robotic manipulation, by definition, implies that
parts and tools will be moving around in space
by the manipulator mechanism. This naturally
leads to the need of representing positions and
orientations of the parts, tools, and the
mechanism it self.
Solution
Mathematical tools for representing position
and orientation of objects / frames in a 3D
space.
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
Central Topic
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
Coordinate System 1/2
y
x
z
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
Coordinate System 1/2
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
Description of a Position
The location of any point in can be described as a 3x1 position vector in a
reference coordinate system
Coordinate System
px
A
P py
pz
Position vector
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
Description of an Orientation
The orientation of a body is described by attaching a coordinate system to the body
{B} and then defining the relationship between the body frame and the reference
frame {A} using the rotation matrix.
The rotation matrix describing frame {B}
relative to frame {A}
Reference Frame
r11 r12
A
A ˆ
A ˆ Aˆ
r r
R
[
X
,
Y
,
Z
]
B
B
B
B
21 22
r31 r32
r13
r23
r33
Body Frame
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
Description of an Frame
The information needed to completely specify where is the manipulator hand is a
position and an orientation.
The rotation matrix describing
frame {B} relative to frame {A}
{B} {BA R, APBORG}
The origin of frame {B}
relative to frame {A}
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
Mapping - Translated Frames
Assuming that frame {B} is only translated (not rotated) with respect frame {A}.
The position of the point can be expressed in frame {A} as follows.
A
P BP APBORG
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
Mapping - Rotated Frames
Assuming that frame {B} is only rotated (not translated) with respect frame {A} (the
origins of the two frames are located at the same point) the position of the point in
frame {B} can be expressed in frame {A} using the rotation matrix as follows:
A
P BAR BP
B
P ABR AP
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
Mapping - Rotated Frames - Inversion
Given:
The rotation matrix from frame {B} with respect to frame {A} Calculate: The rotation matrix from frame {A} with respect to frame {B} -
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
A
B
B
A
R
R
Mapping - Rotated Frames - Inversion
Given:
The rotation matrix from frame {B} with respect to frame {A} Calculate: The rotation matrix from frame {A} with respect to frame {B} -
A
B
R 1 A P BAR 1 BA R BP
B
P BAR 1 A P
1 0 0
A 1 A
1 0
B R B R I 0
0 0 1
B
P ABR AP
P IP
A
B
A
B
B
A
R
R
R 1 AP BAR 1 BA R BP I BP BP
P BAR BP
A
A
B
B
A
R BAR 1 BART
R ABR 1 ABRT
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
Orthogonal
Coordinate
system
Mapping - Rotated Frames - Inversion
The rotation matrix from frame {B} with respect to frame {A} The rotation matrix from frame {A} with respect to frame {B} -
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
A
B
B
A
R
R
Mapping - Rotated Frames - Inversion
The rotation matrix from frame {B} with respect to frame {A} The rotation matrix from frame {A} with respect to frame {B} -
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
A
B
B
A
R
R
Mapping - Rotated Frames - Example
Given :
0 0
B
P B p y 2
0 0
30o
Compute:
Solution:
A
P
A
P BAR BP
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
Mapping - Rotated Frames - Example
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
Mapping - Rotated Frames - Example
c
A
A ˆ
A ˆ Aˆ
s
R
[
X
,
Y
,
Z
]
B
B
B
B
0
s
c
0
0
0
1
c
s
s
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
c
Mapping - Rotated Frames - Example
c
A
P BAR BP s
0
s
c
0
0 0 0.866 0.500 0.000 0.000 1.000
0 B p y 0.500 0.866 0.000 2.000 1.732
1 0 0.000 0.000 1.000 0.000 0.000
1.732
-1
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
Mapping - Rotated Frames - General Notation
The rotation matrices with respect to the reference frame are defined as follows:
0
1 0
RX ( ) 0 c s
0 s c
c 0 s
1 0
RY ( ) 0
s 0 c
c s 0
RZ ( ) s c 0
1
0
0
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
Mapping - Rotated Frames - Methods
• X-Y-Z Fixed Angles
The rotations perform about an axis of a fixed reference frame
• Z-Y-X Euler Angles
The rotations perform about an axis of a moving reference frame
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
Mapping - Rotated Frames - X-Y-Z Fixed Angles
Start with frame {B} coincident with a known reference frame {A}.
• Rotate frame {B} about X̂ by an angle
A
ˆ
Fixed Angles
• Rotate frame {B} about Y by an angle
A
• Rotate frame {B} about Ẑ A by an angle
Note - Each of the three rotations takes place about an axis in the fixed reference
frame {A}
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
Mapping - Rotated Frames - X-Y-Z Fixed Angles
Compound Rotations Represented Globally
When successive rotations are described with respect to a single fixed
(global) frame, we may combine these rotations by pre-multiplication.
2
3
c
A
B RXYZ ( , , ) RZ ( ) RY ( ) RX ( ) s
0
cc
A
sc
R
(
,
,
)
B XYZ
s
s
c
0
0 c
0 0
1 s
css sc
sss cc
cs
1
0 s 1 0
1 0 0 c
0 c 0 s
csc ss
ssc cs
cc
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
0
s
c
Mapping - Rotated Frames - X-Y-Z Fixed Angles
r11 r12
A
r22
B RXYZ ( , , ) r21
r31 r32
r13 cc
r23 sc
r33 s
Atan2( -r31, r112 r212 )
css sc
sss cc
cs
for
csc ss
ssc cs
cc
- 90o 90o
Atan2( r21 /cβ ,r11 /cβ )
Atan2( r32 /cβ ,r33 /cβ )
• Special Case
90o
0
Atan2( r12 ,r22 )
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
Atan2 - Definition
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
Atan2 - Definition
Four-quadrant inverse tangent (arctangent) in the range of
Atan 2( y, x) tan 1 ( y / x)
For example
[
]
Atan( 1,1) 45o
Atan 2( 1,1) 45o
Atan( 1,1) 45o
Atan 2( 1,1) 135o
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
Mapping - Rotated Frames - Z-Y-X Euler Angles
Start with frame {B} coincident with a known reference frame {A}.
• Rotate frame {B} about Ẑ A by an angle
Euler Angles
• Rotate frame {B} about YˆB by an angle
• Rotate frame {B} about X̂ B by an angle
Note - Each rotation is preformed about an axis of the moving reference frame {B},
rather then a fixed reference frame {A}.
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
Mapping - Rotated Frames - X-Y-Z Euler Angles
Compound Rotations Represented Locally
We may combine successive rotations by post-multiplication if each rotation is about a
vector represented in the current rotated frame.
1
c
s
A
R
(
,
,
)
R
(
)
R
(
)
R
(
)
B Z 'Y ' X '
Z
Y
X
0
cc
A
B RZ 'Y ' X ' ( , , ) sc
s
s
c
0
0 c
0 0
1 s
css sc
sss cc
cs
3
2
0 s 1 0
1 0 0 c
0 c 0 s
csc ss
ssc cs
cc
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
0
s
c
Mapping - Rotated Frames
Fixed Angles Versus Euler Angles
A
B
RXYZ ( , , ) BARZ 'Y ' X ' ( , , )
Fixed Angles
XYZ
Euler Angles
ZYX
Three rotations taken about fixed axes (Fixed Angles - XYZ) yield
the same final orientation as the same three rotation taken in an
opposite order about the axes of the moving frame (Euler Angles
ZYX)
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
Equivalent Angle - Axis Representation
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
Equivalent Angle - Axis Representation
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
Equivalent Angle - Axis Representation
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
Operator - Rotating Vector
•
Rotational Operator - Operates on a a vector
a new vector B P1 , by means of a rotation R
A
•
A
P1 and changes that vector to
P2 R AP1
Note: The rotation matrix which rotates vectors through same the rotation R , is
the same as the rotation which describes a frame rotated by R relative to the
reference frame
A
P2 R AP1
Operator
A
P BAR BP
Mapping
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
Operator - Rotating Vector - Example
Given:
0 0
A
P1 A p1 y 2
0 0
Compute: The vector
Solution:
c
A
P2 R(30o ) AP1 s
0
A
P2 obtained by rotating this vector about Ẑ by 30 degrees
s
c
0
0 0 0.866 0.500 0.000 0.000 1.000
0 A p1 y 0.500 0.866 0.000 2.000 1.732
1 0 0.000 0.000 1.000 0.000 0.000
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
Mapping - General Frames
Assuming that frame {B} is both translated and rotated with respect frame {A}.
The position of the point expressed in frame {B} can be expressed in frame {A} as
follows.
{B} {BA R, APBORG}
A
P BP APBORG
A
P BAR BP APBORG
A
P ABT BP
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
Mapping - Homogeneous Transform
The homogeneous transform is a 4x4 matrix casting the rotation and translation of
a general transform into a single matrix. In other fields of study it can be used to
compute perspective and scaling operations. When the last raw is other then [0001]
or the rotation matrix is not orthonormal.
A
P BAR BP APBORG
A
AP
1 0
P ABT BP
A
B
R
0
0
A
PBORG B P
1 1
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
Homogeneous Transform - Special Cases
Translation
Rotation
1
0
A
BT
0
0
0 0
1 0
0 1
0 0
r11 r12
r r
21
22
A
T
B
r31 r32
0 0
PBORGx
A
PBORGy
A
PBORGz
1
A
r13 0
r23 0
r33 0
0 1
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
Homogeneous Transform - Example (1/2)
Given:
B p x 3
B
P B p y 7
0 0
Frame {B} is rotated relative to frame {A} about Ẑ
10 units in X̂ and 5 units in YˆA
A
Calculate: The vector A P expressed in frame {A}.
by 30 degrees, and translated
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
Homogeneous Transform - Example (2/2)
AP
A
P ABT BP
1 0
A
B
R
0
0
A
PBORG B P
1 1
0.866 0.500 0.000 10.0 3.0 9.098
0.500 0.866 0.000 5.0 7.0 12.562
A
P
0.000 0.000 1.000 0.0 0.0 0.0
0
0
1 1 1
0
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
Transformation Arithmetic - Compound Transformations
Vector C P
Frame {C} is known relative to frame {B} Frame {B} is known relative to frame {A} Vector A P
Given:
Calculate:
B
B
C
A
B
T
T
P CBT CP
B
A
A
P ABT BP
P ABT CBT CP
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
P
Transformation Arithmetic - Inverted Transformation
Given:
Calculate:
B
A
B
Description of frame {B} relative to frame {A} Description of frame {A} relative to frame {B} Homogeneous Transform
A
B
T
B
A
T
R BART
PAORG ABR APBORG BART A PBORG
B
AT
0
Note:
A
B
RT
0
BART A PBORG
0
1
B
PAORG
T ABT 1
B
A
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
( BAR, APBORG )
( ABR, B PAORG )
Inverted Transformation - Example (1/2)
Given:
Description of frame {B} relative to frame {A} - ABT ( BAR, APBORG )
Frame {B} is rotated relative to frame {A} about Ẑ by 30 degrees, and
translated 4 units in X̂ , and 3 units in Yˆ
Calculate:
Homogeneous Transform
B
A
T ( ABR, B PAORG )
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
Inverted Transformation - Example (2/2)
c
A
s
T
B
0
0
B
AT
0
A
B
s
0
c
0
0
1
0
0
RT
0
PBORGx 0.866 0.500 0.000 4.000
A
PBORGy 0.500 0.866 0.000 3.000
A
0.000 0.000 1.000 0.000
PBORGz
0
0
1
1 0
A
0.866 0.500 0.000 4.964
BART A PBORG 0.500 0.866 0.000 0.598
0.000 0.000 1.000 0.000
0
1
0
0
0
1
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
Homogeneous Transform - Summary of Interpretation
•
•
As a general tool to represent a frame we have introduced the homogeneous
transformation, a 4x4 matrix containing orientation and position information.
Three interpretation of the homogeneous transformation
1 . Description of a frame -
A
B
T describes the frame {B} relative to frame {A}
A
BT
0
2. Transform mapping -
A
B
3. Transform operator - T
T
maps
A
B
R
0
0
A
PBORG
1
P AP
B
operates on
A
A
P ABT
B
P1 to create A P2
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
P
A
P ABT
B
P
Transform Equations
Given:
Calculate:
U
A
T , DAT , UBT , CDT
B
C
T
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
Transform Equations
Given:
Calculate:
U
A
T , DAT , UBT , CDT
B
C
T
T UAT DAT
U
D
T UBT CBT CDT
U
D
T DAT UBT CBT CDT
U
A
T 1UAT DAT CDT 1 UBT 1UBT CBT CDT CDT 1
U
B
T UBT 1UAT DAT CDT 1
B
C
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
Transform Equations
Given:
B
T
T , BST , GS T
Calculate:
T
G
T
T BT T 1 BST GST
T
G
Instructor: Jacob Rosen
Advanced Robotic - MAE 263B - Department of Mechanical & Aerospace Engineering - UCLA
© Copyright 2026 Paperzz