Now that we have studied and solved separately the translation and the rotation problems, which allowed
us to determine the position and the orientation of one reference frame with respect to another.
Let's see how to approach the general and complex problem of determining the pose of an object in the
space and therefore determining the rotor translation of our reference frame with respect to another.
In this case, we are dealing with a general scenario where we always have a fixed reference frame.
So the word frame and our mobile reference frame that is fixed that is attached to the robot.
This time the mobile frame is both translated and rotated with respect to the fixed world reference
frame.
We can see that the two reference frames are indeed translated from each other, since their origins
do not coincide.
They are not at the same point.
We can also see that they are rotated with respect to each other as the direction of the x, y and z
axis.
Different between the two reference frames.
We can quantitatively indicate the translation and the rotation of the mobile reference frame with the
respect to the fixed reference frame by using the coordinates X, Y, and Z of the mobile frame origin
with the respect to the fixed reference frame as well as the angles theta and phi of rotation around
the three axes.
Once again, the kinematic problem consists of determining the position of a given point p in the global
world reference frame, knowing its position in the inertial reference frame.
So the mobile frame.
And so knowing the translation and the rotation to which the mobile frame is subjected with respect
to the world frame.
We have already solved a simplified version of this problem.
We solved the problem when the two reference frames were oriented the same way, but they were only
translated with respect to each other using the translation vector.
And then we also solved the problem when the two reference frame at the same origin, but they were
only rotated, so they were differently orientated using the rotation matrices.
To solve the problem.
In the general case where the two reference frames are arbitrarily translated and rotated, it is enough
to combine these two equations and thus combine the two matrices to obtain a 4x4 matrix.
The elements of this new matrix are familiar to us.
They are not new.
The first three rows and columns, in fact, represents exactly the rotation matrix that express only
the orientation of the mobile reference frame with respect to the fixed reference frame.
Similarly, the first three rows of the last column represent the translation vector that express the
position of the mobile reference frame with respect to the fixed reference frame.
Finally, the last row of this column is set to zero, except for the last element.
This row actually doesn't add anything to the logic or to the equations for the coordinate transformation
between the two reference frames.
It simply ensures that this matrix is a square matrix, so namely that it has the same number of rows
and columns.
This property will be very useful when we combine and multiply many cumulative transformations.
Overall, these 4x4 matrix is called the Transformation Matrix, and it allows us to obtain the coordinates
of a point in the fixed reference frame.
Given the coordinates of the same point in the mobile reference frame and also vice versa.
So it enables us to obtain the coordinates of a point in any mobile reference frame.
So also if it is rotated or translated given the coordinates of the same point in the fixed reference
frame.
So simply by calculating then the inverse of this matrix, so the inverse of the transformation matrix.