Index


HCR - Reference Frame

The reference frame is a 3 axis system that are usually connected by a body, an object or a system that can be used to acquire information or transmit information. For example a camera can be a reference frame, when you record a video, you are recording from a fixed point of view, the lenses of the camera, which has a mean direction. We can use the object frame (the camera) as reference for a robotic arm that gets information from it, so the camera becomes our reference frame.

Main concepts:

  • Reference Frame.
  • Position.
  • Orientation.

Reference Frames Examples:
  1. Camera Reference Frame
  2. Multi joint hand fingertips frame
  3. Virtual world reference frame

Everything has a reference frame in our robotic task.

Main task in robotics: Represent a reference frame of an object into another object’s reference frame, that can be the world reference frame, the camera’s, sensor’s, …

Link to original


HCR - Pose of a Rigid Body

A rigid body is completely described in a reference frame by position and orientation. The position of point on the rigid body with respect to the coordinate frame () is expressed by a three dimensional vector .

Where are versors. (??? it doesn't make sense, they should not be versors ???NOT_SURE_ABOUT_THIS )

So the position of with respect to is defined as:

In this case:

  • : is the World reference frame
  • : is the Object reference frame

The idea is: I want to know in respect to . This because in my system is NOT allowed to change (being the world reference frame) so it’s perfect for referencing that can change.

While for the position of with respect to , we can use the position of each vector of the object frame with respect to the reference frame: We obtain a representation of rotation by the Rotation Matrix

Link to original


HCR - Rotation Matrix

Given two reference frames like so:

We can write:

Where for example is defined as:

So, is defined as:

Rotation Matrix from reference frame to

Link to original


HCR - Definition of 'Elementary Rotation'

Given 2 reference frames we define the elementary rotation of the frame with respect to frame as the rotation of only one axis of the frames.

The composition of multiple Elementary Rotation Matrix result in a complete Rotation Matrix. ~Ex.:

~ Example: Rotation along the axis:

We rotate the frame with an angle of along the axis, as we can see in the second picture we can rewrite the rotation as:


  • ~Example: Other Elementary Rotations:
Link to original


HCR - Composition of Elementary Rotation

Each orientation could be composed by elementary rotations of the object frame with respect to the reference frame.

  • Successive rotations of an object about the object frame is obtained by ==premultiplication== of rotation matrices.
  • Successive rotations of an object about the reference frame is obtained by ==postmultiplication== of rotation matrices.

Where premultiplication and postmultiplication only mean when the elementary rotation matrix is multiplied (if at the beginning or at the end).

NOTE: The object frame is referenced to the reference frame

The composition of various elementary rotation matrices gives form to a complete rotation matrix

We need also to define ==how the elementary rotation are composed==, to do this we use the rotation matrix descriptors.

Link to original


HCR - Rotation Matrices Descriptors

Using various composition of elementary rotation matrices it can result in a redundant description of the frame orientation.

We can use one of the following descriptors to obtain a ==non-redundant== rotation matrix:

Link to original


HCR - Rotation Matrix Descriptor 'Euler Angles'

I have to specify beforehand in which axis i will rotate: ~ex.: ZXZ Also all Euler Angles will do 3 elementary rotations:

Where for formality:

  • ROLL” : always means a rotation along the axis
  • PITCH” : always means a rotation along the axis
  • YAW” : always means a rotation along the axis

This are names that sailor uses for rotating the ships


  • ~ Examples of Euler Angles Rotations:
    • ZXZ (Most used for the Euler Angles, ‘Standard for Euler Angles’):$$ R^O_{O \kern 1px ’} = R_z(\varphi) \kern 1px R_x(\theta) \kern 1px R_z(\psi)

R^O_{O \kern 1px ’} = R_z(\varphi) \kern 1px R_y(\theta) \kern 1px R_x(\psi)

Link to original


HCR - Rotation Matrix Descriptor 'RPY Angles'

Specific Euler Angeles: ZYX (‘Roll Pitch and Yaw’):

Link to original


HCR - Rotation Matrix Descriptor 'Angle and Axis'

Formula:Where:

  • : rotation matrix along the axis.
  • is the angle of rotation along the axis (in the figure this axis/vector it’s represented by the vector but i wanted to avoid confusion between this axis of rotation and the elements of the rotation matrix : , so i called it ).
    The angle of rotation can be found as:And the axis of rotation as:Where:

So to find the rotation matrix we can impose and as constraints and find:

NOTE:IMPORTANTE For (or ) (Indeterminate) The Quaternion descriptor is more complicated but can avoid this problem.

Link to original


HCR - Rotation Matrix Descriptor 'Quaternion'

NOTE:IMPORTANTE ==There is no possibility that 2 different quaternions give the same final rotation.==

Let’s take an example: in the angle and axis descriptor formulas, we find that:

Now if we consider then can be both equal to or , so we have and indetermination on the angle.

Let’s now define and with respect to and as:\begin{align} &\eta = \cos\left(\frac{\theta}{2}\right) \\[7px] &\varepsilon = \sin\left(\frac{\theta}{2}\right)\cdot \vec v \end{align} Where:

  • is a vector () and so is .
  • While is a scalar ().

Notice that:And:So by using and as constraints we can then find the rotation matrix :


Quaternions re-explained

(As everyone knows them)

Given a point an axis of rotation and the 2 angles of rotation and we can define:

Where:

So once we have defined the new point location after the rotation is given by:

Where:

Link to original


HCR - Homogeneous Transformation Matrix

The entire pose of an object, given one reference frame could be represented in another frame, just by multiplying the first one with a matrix called homogeneous transformation matrix.

Contrary to the rotation matrix, where we tackle only the problem of orientation, now we want to resolve also the problem of position.

After all ==a pose is just a collection of position and orientation==

  • So, first I resolve the problem of position (translation) then the problem of orientation (rotation).
    1. Solve the difference of and .
    2. Considering the and in the same center i calculate the rotation matrix.

Definition of ‘Transformation Matrix’

The Transformation Matrix that change one pose to another is denoted as .

\end{array} & \kern5px 1 \end{array} \right]_{4\times4} $$ Where: - $R^O_{O \kern 1px '}$ : [[HCR - Rotation Matrix|rotation matrix]]. - $O \kern 1px '$ : distance $\overline{O \kern 2px O \kern 1px '}$ Then we can write the following transformation given a point $p^{O}$ in the reference frame $O$ we can find the point $p^{O \kern 1px '}$ in the reference frame $O \kern 1px '$:$$p^{O \kern 1px '} = T_{O \kern 1px '}^O \cdot p^{O}$$ > **NOTE**: > The 3 zeros elements in the last row are usually unchanged but sometimes they do change, when they do it's because we want to impose the **concept of prospective**, for example when using a camera some dimensions are forcefully distorted (closer objects appear bigger). > **NOTE**: > The last element $(4,4)$ is often $1$, but it can be changed to reference the **scale of my robot or environment** ($0.1$, $0.01$, $0.001$, ... when working with small robots, while we'll change it to $10$, $100$, $1000$, $10000$ for big robots) ---- The **inverse** of a **tranformation matrix** $T$ is also a transformation matrix, and can be computed as:$$\begin{array}{l} T^{-1} &=& \left[\begin{array}{c} R^O_{O \kern1px '} & O' \kern2px \\[5px] \begin{array}{c} 0 & 0 & 0 \end{array} & 1 \end{array}\right]^{-1} \\[-5px]&\kern3px\downarrow&\\[-5px] &=& \left[\begin{array}{c} \left(R^O_{O \kern1px '}\right)^{\tiny T} & -\left(R^O_{O \kern1px '}\right)^{\tiny T} \cdot O' \kern2px \\[5px] \begin{array}{c} 0 & 0 & 0 \end{array} & 1 \end{array}\right] \end{array}$$***Source***: [Mecharithm (reading)](https://mecharithm.com/learning/lesson/homogenous-transformation-matrices-configurations-in-robotics-12#:~:text=The%20inverse%20of%20a%20transformation%20matrix%20T%20%E2%88%88%20SE(3)%20is%20also%20a%20transformation%20matrix%20and%20can%20be%20computed%20as) ^inverse-of-a-transformation-matrixLink to original