C1 - Coordinate Transformations
C1 - Coordinate Transformations
Fundamentals of Robotics
(Automatisierungs- und Robotertechnik I)
C: Coordinate Transformations
Introduction
Motion Control
& Path Planning
forward
Handling Systems
Robot Programming
Safety
inverse
Sensors
Robot Hardware
Performance and
Accuracy
Inverse Kinematics: Joint variables are determined from
position and orientation of the tool frame.
+y
Introduction
+θ
Kinematic
Robot Types
Coordinate
Transformations +ϕ +x +X, +Y, +Z
+ψ
Motion Control
& Path Planning +z
Handling Systems
Robot Programming
Safety
+ϕ, +θ, +ψ
Sensors
Robot Hardware
Performance and
Accuracy
Introduction
Kinematic
Robot Types
Coordinate
Transformations
Motion Control
& Path Planning
O
Handling Systems
Robot Programming
Safety
Sensors
The base frame, {B}
Robot Hardware
The tool frame, {T}
Performance and
Accuracy The station frame, {S}
The object frame, {O}
The wrist frame, {W}
Introduction
world frame is the base for all other coordinate systems
Kinematic and is fixed to the environment
Robot Types
Robot Hardware
object frame connected to the workpiece
Performance and
Accuracy
Introduction
Kinematic
Robot Types
Coordinate
Transformations
Motion Control
& Path Planning
Handling Systems
xTCP
yTCP
Robot Programming
Safety
zTCP
Sensors pTCP z
Robot Hardware
x
Performance and
Accuracy
Introduction
Kinematic
Robot Types
Coordinate
Transformations
C
Motion Control
& Path Planning
C
Handling Systems
C E
Robot Programming
Safety
D
Sensors
Robot Hardware
Performance and C
Accuracy
B A
Introduction
Kinematic
Robot Types
Coordinate
Transformations
Motion Control
& Path Planning
Tool frame
Handling Systems
Robot Programming
Safety
Performance and
Accuracy
weld seam frame /
object frame
source: Hesse
Introduction
Kinematic
Robot Types
Motion Control
& Path Planning Every other frame has a reference frame
Handling Systems
Robot Programming
Every frame can be a reference frame
Safety
for any other frame except for the world frame.
Sensors
Robot Hardware
Performance and
Accuracy
Introduction
Kinematic
Robot Types
Coordinate
Transformations
Describing Position and Orientation of Objects
Motion Control
& Path Planning in 3D-Space
Handling Systems
Robot Programming
Safety
Sensors
Robot Hardware
Performance and
Accuracy
Introduction
Kinematic
Robot Types
Coordinate
Transformations px
A
Motion Control
P = py
& Path Planning
p
z
Handling Systems
Robot Programming
Safety
Sensors
Robot Hardware
A vector is used to define the point P relative to the
Performance and coordinate system {A} („P in A“)
Accuracy
A A
R = XB YB Z
A
A
B
Introduction B
Kinematic
Robot Types A X Bx AYBx A Z Bx
Coordinate = A X By AYBy A Z By
Transformations
A X Bz AYBz A Z Bz
Motion Control
XB⋅ X A Y B ⋅ B ⋅
& Path Planning
XA Z X A
Handling Systems
=
X B ⋅Y A Y B ⋅Y A Z B ⋅Y A
Robot Programming
Safety X B ⋅ Z A Y B ⋅ Z A Z B ⋅ Z A
Sensors
A A A
Robot Hardware
X B Y B ZB are axis unit vectors of the coordinate system {B}
Performance and expressed in the coordinate system {A}.
Accuracy They are orthonormal to each other.
Introduction
Kinematic
Robot Types
Coordinate
Transformations
Motion Control
& Path Planning
A Frame {B} is a coordinate system that defines
Handling Systems both position and orientation information relative
Robot Programming
to another Frame (or coordinate system) {A}.
Safety
Sensors
{B} = { BA R, A PBORG }
Robot Hardware
Performance and
Accuracy In industrial robotics a frame is attached e.g. to the end-effector of the
robot. This frame describes the spatial position and orientation of the
end-effector (relative to a reference frame).
Kinematic
Robot Types
Coordinate
Transformations
A
Motion Control P B
P
& Path Planning
Handling Systems A
PBORG
Robot Programming
Safety
Sensors
Robot Hardware
Performance and
A B
Accuracy
P
= P + A PBORG
Introduction
Kinematic
Robot Types
B
Coordinate P = known
Transformations
A
Motion Control
P = unknown
& Path Planning
Xˆ A ⋅ B P
Handling Systems
A B
px
=
Robot Programming
Safety
A
p y BYˆA ⋅ B P
=
Sensors
A
pz
= B
Zˆ A ⋅ B P
Robot Hardware
Performance and
Accuracy
A
Matrix Notation: P = BA R B P
Introduction
vice versa:
Kinematic
Robot Types
A
Coordinate
P = BA R B P
Transformations
Motion Control
B
P = AB R A P
& Path Planning
definition
Handling Systems
Robot Programming
= BA R −1 A P conversion of line 1 (inverse)
Sensors
Robot Hardware
Performance and
Accuracy
A
BR
= B
AR −1
= B
A RT
{B‘} {B}
Introduction
Kinematic
Robot Types
Coordinate
Transformations
Motion Control
& Path Planning
Handling Systems
Robot Programming
Safety
A A
= P B R B P + A PBORG
Introduction {B}
Kinematic
Robot Types
Coordinate
Transformations
Motion Control
& Path Planning
Handling Systems
Robot Programming
Safety
Sensors
Expressed in one Matrix:_____
Robot Hardware
Performance and
Accuracy
A
P = ABT B P
Introduction
Kinematic
Robot Types
Coordinate
Transformations
Motion Control
& Path Planning
Handling Systems
Robot Programming
Robot Hardware
Performance and
Accuracy A P BA R A
PBORG B P
=
1 0 0 0 1 1
Introduction
Kinematic
Robot Types
Coordinate
Transformations
Motion Control
& Path Planning
Handling Systems
Robot Programming
A A
R B P + A PBORG
Safety
= P B
Sensors
Introduction
Kinematic
Robot Types
Coordinate
Transformations translation vector
Motion Control
& Path Planning
rotation matrix
x' Rxx Rxy Rxz tx x
y' = Ryx Ryy Ryz t y y
Handling Systems
Robot Programming •
Safety
z ' Rzx Rzy Rzz tz z
1 0 0 0 1 1
Sensors
Robot Hardware
perspective
transformations scaling factor
Performance and
Accuracy
in computer graphics
Frame {C} is known relative to {B}, and frame {B} is known relative to frame {A}
Unknown: Frame {C} relative to {A},
B
P = CBT C P A P = ABT CBT C P as
A
P = CAT C P}
A B
⇒ A
A
P = BT P CT = ABT CBT
replace
A
T
=
known: B
A
B R + A PBORG B
AR
= R −1
A
=
B
A
B RT
B
T
=
needed: A
B
A R + B PAORG B
AT
= T −1 ≠ ABT T
A
B
B B
= P A R A P + B PAORG (1)
B A BA RT
−1 − BA RT A PBORG
T
=A BT
=
0 0 0 1
ZB ZA
Introduction
cos θ
Kinematic
Robot Types
YB
Coordinate sin θ
Transformations XB⋅ X A Y B ⋅ XA B ⋅
Z X A
Motion Control
& Path Planning
A
BR = X B ⋅ Y A Y B ⋅ Y A
Z B ⋅Y A θ
B ⋅ZA -sin θ θ cos θ
X B ⋅ Z A Y B ⋅ Z A Z
Handling Systems XB XA
YA
Robot Programming
Safety
1 0 0 cosθ 0 sin θ
RX (θ ) 0 cosθ
= − sin θ RY (θ ) = 0 1 0
Sensors
0 sin θ cosθ − sin θ 0 cosθ
Robot Hardware
Performance and
Accuracy cosθ − sin θ 0
RZ (θ ) = sin θ cosθ 0
0 0 1
XB XA
Introduction
cos θ
Kinematic
Robot Types
ZB
Coordinate sin θ
Transformations XB⋅ X A Y B ⋅ XA B ⋅
Z X A
Motion Control
& Path Planning
A
BR = X B ⋅ Y A Y B ⋅ Y A
Z B ⋅Y A θ
B ⋅ZA -sin θ θ cos θ
X B ⋅ Z A Y B ⋅ Z A Z
Handling Systems YB YA
ZA
Robot Programming
Safety
1 0 0 cosθ 0 sin θ
RX (θ ) 0 cosθ
= − sin θ RY (θ ) = 0 1 0
Sensors
0 sin θ cosθ − sin θ 0 cosθ
Robot Hardware
Performance and
Accuracy cosθ − sin θ 0
RZ (θ ) = sin θ cosθ 0
0 0 1
YB YA
Introduction
cos θ
Kinematic
Robot Types
XB
Coordinate sin θ
Transformations XB⋅ X A Y B ⋅ XA B ⋅
Z X A
Motion Control
& Path Planning
A
BR = X B ⋅ Y A Y B ⋅ Y A
Z B ⋅Y A θ
B ⋅ZA -sin θ θ cos θ
X B ⋅ Z A Y B ⋅ Z A Z
Handling Systems ZB ZA
XA
Robot Programming
Safety
1 0 0 cosθ 0 sin θ
RX (θ ) 0 cosθ
= − sin θ RY (θ ) = 0 1 0
Sensors
0 sin θ cosθ − sin θ 0 cosθ
Robot Hardware
Performance and
Accuracy cosθ − sin θ 0
RZ (θ ) = sin θ cosθ 0
0 0 1
Introduction
1 0 0
Kinematic RX (θ ) 0 cosθ
Rotation about the x-axis: = − sin θ
Robot Types
0 sin θ cosθ
Coordinate
Transformations
Motion Control
& Path Planning
cosθ 0 sin θ
RY (θ ) = 0 0
Handling Systems
Rotation about the y-axis: 1
Robot Programming
− sin θ 0 cosθ
Safety
Sensors
Robot Hardware
cosθ − sin θ 0
Performance and Rotation about the z-axis: RZ (θ ) = sin θ cosθ 0
Accuracy
0 0 1
Describe both right hand rules refering to right handed cartesian coordinate
systems.
Name and describe the most common frames usually used in robotics.
Please deduce the three basic rotation matrices Rx, Ry and Rz by sketching the
rotated unit vectors of the moving frame axes and the fixed axes of the initial
frame in one plane and by describing the projections of the rotated unit vectors
onto the fixed reference axes by trigonometric functions.
Coordinate
Transformations 0.866 −0.500 0.000
Rz (30) = 0.500 0.866 0.000
Motion Control
& Path Planning 0.000 0.000 1.000
Handling Systems
1.000 0.000 0.000
Robot Programming
Rx (30) = 0.000 0.866 −0.500
Safety 0.000 0.500 0.866
Sensors
0.87 −0.43 0.25
Robot Hardware
Rz (30) Rx (30) = 0.50 0.75 −0.43
Performance and 0.00 0.50 0.87
Accuracy
Introduction
Kinematic
Robot Types
Coordinate
Transformations
Motion Control
& Path Planning
Handling Systems
Robot Programming
Safety
Sensors
nose
left / right
Introduction
Kinematic Start with a frame {B} that is congruent to a reference frame {A}.
γ,
Robot Types
1. Rotate {B} first about XA axis of {A} by an angle
β,
Coordinate
Transformations 2. Then about the fixed YA axis by an angle
Motion Control
& Path Planning
3. Finally about the fixed ZA by an angle α.
Handling Systems
2. 1.
Robot Programming
=Fnew Safety
A
BRXYZ (γ , β ,α ) Fold RZ (α ) RY ( β ) RX (γ ) Fold
=
Sensors
Robot Hardware
Rotation around the axes of the fixed (nonmoving) frame
Performance and
Accuracy Multiplication of each partial rotation from the left side
of the preceding partial rotation
Introduction
Kinematic
Robot Types A
B RXYZ (γ , β ,α ) = RZ (α ) RY ( β ) RX (γ )
Coordinate 1.
Transformations
cα − sα 0 cβ 0 s β 1 0 0
Motion Control
& Path Planning
sα cα 0 0 1 0 0 cγ − sγ
Handling Systems 0 0 1 − sβ 0 cβ 0 sγ cγ
Robot Programming
cα − sα 0 cβ sβ sγ sβ cγ
Safety
= sα cα 0 0 cγ sγ
Sensors
0 0 1 − sβ cβ sγ cβ cγ
Robot Hardware
Performance and
Accuracy
wher
= e c cos,
= s sin
Introduction
Kinematic
Robot Types A
B RXYZ (γ , β ,α ) = RZ (α ) RY ( β ) RX (γ )
Coordinate 1.
Transformations
cα − sα 0 cβ 0 s β 1 0 0
Motion Control
& Path Planning
sα cα 0 0 1 0 0 cγ − sγ
Handling Systems 0 0 1 − sβ 0 cβ 0 sγ cγ
2.
Robot Programming
cα − sα 0 cβ sβ sγ sβ cγ
Safety
= sα cα 0 0 cγ − sγ
Sensors
0 0 1 − sβ cβ sγ cβ cγ
Robot Hardware
Performance and
Accuracy
wher
= e c cos
= , s sin
Introduction
Kinematic
Robot Types A
B RXYZ (γ , β ,α ) = RZ (α ) RY ( β ) RX (γ )
Coordinate
Transformations
cα − sα 0 cβ 0 s β 1 0 0
Motion Control
& Path Planning
sα cα 0 0 1 0 0 cγ − sγ
Handling Systems 0 0 1 − sβ 0 cβ 0 sγ cγ
Robot Programming
cα cβ cα sβ sγ − sα cγ cα sβ cγ + sα sγ
Safety
= sα cβ sα sβ sγ + cα cγ sα sβ cγ − cα sγ
Sensors
− sβ cβ sγ cβ cγ
Robot Hardware
Performance and
Accuracy
where c = cos, s = sin
Introduction A
B RXYZ (γ , β ,α ) = RZ (α ) RY ( β ) RX (γ )
Kinematic
Robot Types
Handling Systems
Robot Programming
If cos𝛽𝛽 ≠ 0, 𝑡𝑡𝑡𝑡𝑡𝑡𝑡 we can use the following equations:
Safety
2 2
Sensors 𝛽𝛽 = 𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴 −𝑟𝑟31 , 𝑟𝑟11 + 𝑟𝑟21 ,
Robot Hardware
Introduction
Kinematic
Robot Types
Coordinate
Transformations
Motion Control
& Path Planning
Handling Systems
Robot Programming
Safety
Sensors
Robot Hardware
Performance and
Accuracy
Introduction Start with the frame {B} coincident with a known frame {A}
Kinematic
Robot Types
1. Rotate {B} first about local ZB by an angle α,
Coordinate 2. then about new YB by an angle β,
finally about new ZB by an angle γ.
Transformations
3.
Motion Control
& Path Planning 1. 2.
Handling Systems
Robot Programming
Fnew = Fold RZYZ(α, β, γ) = Fold RZ(α) RY(β) RZ(γ)
Safety
Sensors
Robot Hardware
Rotation around the axes of the new (rotated) frame
Performance and
Multiplication of each partial rotation from the right side
Accuracy of the preceding partial rotation
Coordinate
Transformations 𝑐𝑐𝛼𝛼 −𝑠𝑠𝛼𝛼 0 𝑐𝑐𝛽𝛽 0 𝑠𝑠𝛽𝛽 𝑐𝑐𝛼𝛼 −𝑠𝑠𝛼𝛼 0
= 𝑠𝑠𝛼𝛼 𝑐𝑐𝛼𝛼 0 0 1 0 𝑠𝑠𝛼𝛼 𝑐𝑐𝛼𝛼 0
Motion Control
& Path Planning 0 0 1 −𝑠𝑠𝛽𝛽 0 𝑐𝑐𝛽𝛽 0 0 1
Handling Systems
Robot Programming
𝑐𝑐𝛼𝛼𝛼𝛼𝛼𝛼𝛼𝛼𝛼𝛼 − 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 −𝑐𝑐𝛼𝛼𝛼𝛼𝛼𝛼𝛼𝛼𝛼𝛼 − 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝑐𝑐𝛼𝛼𝛼𝛼𝛼𝛼
Safety
= 𝑠𝑠𝛼𝛼𝛼𝛼𝛼𝛼𝛼𝛼𝛼𝛼 + 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 −𝑠𝑠𝛼𝛼𝛼𝛼𝛼𝛼𝛼𝛼𝛼𝛼 + 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑠𝑠𝛼𝛼𝛼𝛼𝛼𝛼
Sensors −𝑠𝑠𝛽𝛽𝛽𝛽𝛽𝛽 𝑠𝑠𝛽𝛽𝛽𝛽𝛽𝛽 𝑐𝑐𝛽𝛽
Robot Hardware
Performance and
Accuracy
Handling Systems
Robot Programming
If sinβ ≠ 0, then we can use the following equations:
Safety
Sensors 2 2
𝛽𝛽 = 𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴( 𝑟𝑟31 + 𝑟𝑟32 , 𝑟𝑟33 )
Robot Hardware
Introduction
Multiplication from the left means a rotation around the fixed
axes of the initial (or the “old”) coordinate system
Kinematic
Robot Types
Multiplication from the right is the mathematical description of
Coordinate
Transformations a rotation around the axes of the new coordinate system
Motion Control
& Path Planning 2. 1.
Handling Systems
Fnew A
BRXYZ (γ , β ,α ) Fold - RZ (α ) RY ( β ) RX (γ ) Fold
=
Robot Programming
1. 2.
Safety
old B RZ ′Y ′X ′ (γ , β , α ) Fold RZ (α ) RY ( β ) RX (γ )
A
Sensors
Fnew F=
Robot Hardware
Performance and
Accuracy
(90,90,-90) (0,90,0)
Both sets of angles describe orientations
with respect to a moving object coordinate system
Introduction
Multiplication from the left means a rotation around the fixed
axes of the initial (or the “old”) coordinate system
Kinematic
Robot Types
Multiplication from the right is the mathematical description of
Coordinate
Transformations a rotation around the axes of the new coordinate system
Motion Control
& Path Planning 2. 1.
Handling Systems
Fnew A
BRXYZ (γ , β ,α ) Fold - RZ (α ) RY ( β ) RX (γ ) Fold
=
Robot Programming
1. 2.
Safety
old B RZ ′Y ′X ′ (γ , β , α ) Fold RZ (α ) RY ( β ) RX (γ )
A
Sensors
Fnew F=
Robot Hardware
Introduction
Advantages:
Kinematic
Intuitive, vivid
Robot Types
Coordinate
Transformations Disadvantages:
Motion Control Sequence of rotations is not arbitrary
& Path Planning
Computation of angles is not unambiguous
Handling Systems
orientations can be described by various sets
Robot Programming
of Euler angles
Safety
Performance and
Accuracy
Introduction
Kinematic
Robot Types
Coordinate
Transformations Denavit-Hartenberg Conventions
Motion Control
& Path Planning Part 1.1:
Handling Systems
Robot Programming
Placing coordinate systems
Safety on arm elements
Sensors
Robot Hardware
Performance and
Accuracy
Handling Systems
Robot Programming
Safety
Sensors
Robot Hardware
Performance and
Accuracy
Introduction
Kinematic
Robot Types
Coordinate Ji
Transformations
Motion Control
& Path Planning
Ji+1
Handling Systems
Robot Programming
i-th link body
Safety
Sensors
Robot Hardware
Performance and
Accuracy
Origin of Fi
Introduction
Kinematic
Robot Types
Coordinate Ji
Transformations
Motion Control
& Path Planning
Ji+1
Handling Systems
Robot Programming
i-th link body
Safety
Sensors
Robot Hardware
Performance and
Accuracy
Origin of Fi
Introduction
Kinematic
Robot Types
Coordinate
Transformations
Motion Control
& Path Planning
Handling Systems
Common normal
Robot Programming
Intersection point
Safety
Sensors
Position of the origin Fi
Robot Hardware
If axes i and i+1 intersect, the intersection point is chosen as the
Performance and
Accuracy
origin for coordinate system i.
If the axes are not intersecting,
the origin of coordinate system i is located in the intersection of
axis i+1 and the common normal to the axes i and i+1.
Introduction
Kinematic
Robot Types
Coordinate
Transformations
Motion Control
& Path Planning
Handling Systems
Robot Programming
Safety
Sensors
Robot Hardware
Performance and
Orientation of z-axis
Accuracy
The axis zi is placed on joint axis i+1.
The direction can be user defined and represents the positive
direction of movement (positive sense of rotation: right hand rule).
Introduction
Kinematic
Robot Types
Coordinate
Transformations
Motion Control
& Path Planning
Handling Systems
Sensors
Robot Hardware
Orientation of x-axis
Performance and
Accuracy If the axes zi-1 and zi intersect, axis xi runs parallel to the
direction of the cross product of zi-1 x zi (choose the sign).
If not intersecting, axis xi runs from joint axis i to i+1 along
the common normal.
Introduction
Kinematic
Robot Types
Coordinate
Transformations
Motion Control
& Path Planning
Handling Systems
Robot Programming
Safety
Sensors
Robot Hardware
Performance and
Accuracy Orientation of y-axis
The axis yi completes a right hand coordinate system with xi and zi.
(cross product of zi and xi)
Introduction
Kinematic
Robot Types
Coordinate
Transformations
Motion Control
& Path Planning
Handling Systems
wrist point P2
Robot Programming
Safety
effector
Sensors
Robot Hardware
base frame tool frame
Performance and
Accuracy
Location of first frame
The origin of the base frame F0 is placed anywhere on the first
joint axis, usually near (or in) joint 1
z0 axis is directed along the first joint axis, x0 is arbitrary.
Introduction
Kinematic
Robot Types
Coordinate
Transformations
Motion Control
& Path Planning
Handling Systems
wrist point P2
Robot Programming
Safety
effector
Sensors
Robot Hardware
Location of last Frame
tool frame
Performance and
Accuracy
The origin of frame n is often placed in the TCP
and the zn axis runs in the same direction as zn-1
xn is directed from zn-1 to zn
If zn-1 and zn are collinear, xn is chosen like xn-1