## Annex D (informative) Geometrical references

This informative annex gives a description of the usage of the 3DFrame DataType and the 3DFrameType VariableType. The geometrical setup of a system can be very diverse. It is not possible to specify all possible setups in this specification. Instead, the specification provides the framework and gives examples for how to use.

**Frames**

A frame describes the translation and rotation of an object relative to another frame (the base frame). Figure D.1 – shows a simple frame chain to clarify the notation. The frame D is the base of frames E and F. The frames E and F are based on frame D. Frame F is the base of frames G and H. The frames G and H are based on frame F.

**Figure D.1 – Simple frame chain**

As shown in Figure D.1 – an arrow points from a frame to its base frame to visualize the frame chains. This arrow can be read as “The coordinates of frame E are specified in (or relative to) frame D”. In addition to the coordinates of frame E you also need to know its base frame D.

The coordinates of a frame are represented by the three values P = (X, Y, Z) for the position and the three values O = (A, B, C) for the orientation.

P is the translation relative to the base frame. When the translation of a frame is 0 then the origins of the frame and its base frame coincide.

O is the orientation of the frame in yaw, pitch and roll notation (see also ISO 9787:2013 “Robots and robotic devices — Coordinate systems and motion nomenclatures” or Wikipedia article about euler angles).

We use the notation of pre-multiplying rotation-matrices and column vectors.

Figure D.2 shows the three elementary rotations A, B and C as specified in ISO 9787:2013.

**Figure D.2 – Rotations**

The elementary rotations correspond to the following rotation matrices:

A = roll = rotation about X axis

*

=*
*1*
*0*
*0*
*0*

cos

**

*−*
sin

**

*0*

sin

**

cos

**

B = pitch = rotation about Y axis

*

=*

cos

**

*0*

sin

**

*0*
*1*
*0*
*−*
sin

**

*0*

cos

**

C = yaw = rotation about Z axis

*

=*

cos

**

*−*
sin

**

*0*

sin

**

cos

**

*0*
*0*
*0*
*1*

ISO 9787:2013 does not define the order of the rotations or whether to use intrinsic or extrinsic rotations. Thus, we refer to the Wikipedia article here. It says that the intrinsic rotations z-y’-x″ are known as yaw, pitch and roll, giving the transformation matrix

* ,, =

=*

*c*os

**

cos

**

sin

**

sin

**

cos

**
*−*
cos

**

sin

**

sin

**

sin

**
*+*
cos

**

sin

**

cos

**

cos

**

sin

**

sin

**

sin

**

sin

**
*+*
cos

**

cos

**

cos

**

sin

**

sin

**
*−*
sin

**

cos

**

*−*
sin

**

sin

**

cos

**

cos

**

cos

**

Figure D.3 shows the three consecutive rotations:

- Rotation about the Z axis (blue rotation; blue frame -> green frame)
- Rotation about the new Y axis (green rotation; green frame -> red frame)
- Rotation about the new X axis (red rotation; red frame -> black frame)
**Figure D.3 – Rotations of a frame**

The extrinsic rotations x-y-z about the axis of the original fixed coordinate system result in the same transformation matrix. This is

- Rotation about the X axis
- Rotation about the original Y axis
- Rotation about the original Z axis

For the explanations in the next paragraph a superscript prefix indicates the frame in which the vector or rotation matrix is defined. A subscript for a rotation matrix indicates the frame it defines.

The column vectors in the rotation matrices are the unit vectors of the frame in the coordinates of its base frame. Thus transforming a vector

** that is given in frame G to the base frame F (compare Figure D.1 – ) is done by

*

=

∙* with

*

= ,,* and the rotation angles **, **, and ** of the frame G.

Frames can be constant (e.g. the robot base) or dynamically changing (e.g. the robot flange).