Difference between revisions of "Combinations of transformations"

From Robotics
Jump to: navigation, search
Line 5: Line 5:
 
\mathbf{Trans}(p_x,p_y,p_z), \quad\mathbf{Rot}(x,\varphi), \quad \mathbf{Rot}(y,\varphi), \quad\mathbf{Rot}(z,\varphi)
 
\mathbf{Trans}(p_x,p_y,p_z), \quad\mathbf{Rot}(x,\varphi), \quad \mathbf{Rot}(y,\varphi), \quad\mathbf{Rot}(z,\varphi)
 
</math>
 
</math>
These transformation matrices can be combined by multiplying them. The most important thing that has to be considered combining transformations, is the order of the transformations. Different orders lead to different results. Descriptively seen, rotation is always applied around the origin or around axis intersecting with the origin, respectively. So the rotational part is depending on the respective input coordinates. Different orders of transformations result in different input coordinates for each transformation.
+
These transformation matrices can be combined by multiplying them. The most important thing that has to be considered combining transformations, is the order of the transformations. As already stated for [[Multiplication of matrices|multiplication of matrices]], different orders lead to different results. Descriptively seen, rotation is always applied around the origin or around axis intersecting with the origin, respectively. So the rotational part is depending on the respective input coordinates. Different orders of transformations result in different input coordinates for each transformation.
  
 
[[File:transformorder.png|right|450px]]
 
[[File:transformorder.png|right|450px]]
 
 
The following example shows descriptively as well as computationally, that the order of transformations is important. Consider a local coordinate frame positioned in the origin, whose axes are oriented parallel to the global coordinate axes. The related initial position vector <math>\vec{\mathbf{q}}_0</math> is a zero vector. A translation matrix <math>\mathbf{Trans}(0,0,1)</math> and a rotation matrix <math>\mathbf{Rot}(x,90^\circ)</math> are to be applied to this local frame. So the two different orders of the two transformations are possible.
 
The following example shows descriptively as well as computationally, that the order of transformations is important. Consider a local coordinate frame positioned in the origin, whose axes are oriented parallel to the global coordinate axes. The related initial position vector <math>\vec{\mathbf{q}}_0</math> is a zero vector. A translation matrix <math>\mathbf{Trans}(0,0,1)</math> and a rotation matrix <math>\mathbf{Rot}(x,90^\circ)</math> are to be applied to this local frame. So the two different orders of the two transformations are possible.
  
The upper three subfigures on the right show the first case. The local frame is first rotated around the x-axis and then translated on the z-axis. The result is shown in the top right subfigure. Computationally <math>\vec{\mathbf{q}}_0</math> is first premultiplied with <math>\mathbf{Rot}(x,90^\circ)</math> and then premultiplied with <math>\mathbf{Trans}(0,0,1)</math>:<br/>
+
The upper three subfigures on the right show the first case. The local frame is first rotated around the x-axis and then translated on the z-axis. The result is shown in the top right subfigure. Computationally <math>\vec{\mathbf{q}}_0</math> is first [[Multiplication of matrices|pre-multiplied]] with <math>\mathbf{Rot}(x,90^\circ)</math> and then [[Multiplication of matrices|pre-multiplied]] with <math>\mathbf{Trans}(0,0,1)</math>:<br/>
  
  

Revision as of 16:03, 16 June 2014

← Back: Homogeneous coordinates Overview: Transformations Next: Inverse transformation

In the previous subarticle homogeneous coordinates and transformation matrices for translation and rotation around the three axes are introduced:


\mathbf{Trans}(p_x,p_y,p_z), \quad\mathbf{Rot}(x,\varphi), \quad \mathbf{Rot}(y,\varphi), \quad\mathbf{Rot}(z,\varphi)

These transformation matrices can be combined by multiplying them. The most important thing that has to be considered combining transformations, is the order of the transformations. As already stated for multiplication of matrices, different orders lead to different results. Descriptively seen, rotation is always applied around the origin or around axis intersecting with the origin, respectively. So the rotational part is depending on the respective input coordinates. Different orders of transformations result in different input coordinates for each transformation.

Transformorder.png

The following example shows descriptively as well as computationally, that the order of transformations is important. Consider a local coordinate frame positioned in the origin, whose axes are oriented parallel to the global coordinate axes. The related initial position vector \vec{\mathbf{q}}_0 is a zero vector. A translation matrix \mathbf{Trans}(0,0,1) and a rotation matrix \mathbf{Rot}(x,90^\circ) are to be applied to this local frame. So the two different orders of the two transformations are possible.

The upper three subfigures on the right show the first case. The local frame is first rotated around the x-axis and then translated on the z-axis. The result is shown in the top right subfigure. Computationally \vec{\mathbf{q}}_0 is first pre-multiplied with \mathbf{Rot}(x,90^\circ) and then pre-multiplied with \mathbf{Trans}(0,0,1):


the general homogeneous transformation matrix \mathbf{T} were introduced. \mathbf{T} consists of a rotation matrix and a translation vector:


\mathbf{T}=
\left[\begin{array}{ccc|c}
 &  &  &  \\ 
 & \mathbf{R} &  & \vec{\mathbf{p}}\\
 & & & \\ \hline
0 & 0 & 0 & 1
\end{array}\right]

As shown in the subarticle homogeneous coordinates, multiplication of \mathbf{T} with a vector corresponds to rotating the coordinates first and then adding the translation vector.

Pre-/Post-...

transformation matrices for translation and rotation around the three axes are introduced:


\mathbf{Trans}(p_x,p_y,p_z), \quad\mathbf{Rot}(x,\varphi), \quad \mathbf{Rot}(y,\varphi), \quad\mathbf{Rot}(z,\varphi)