In robotics, generally, we try to describe each of the bodies that we are interested as points and
represent them on different frames.
For example, in this case, the camera is assigned frame eight with frame accesses of eight x a y and
is that the robot is assigned frame B with frame axis of B, XB Y and B's it and so on.
These frames can be inertial or look of moving or stable, depending on our needs.
Generally, the local frames like frames A, B and C are stuck on the bodies of interest, as these
make both kinematics and dynamics calculations easier, which we will see during the future lessons.
The inertial frame generally doesn't move, and it is needed in order to get absolute values of Victorian
quantities like velocity acceleration, angular velocity, angular acceleration and do pictorial calculations
on them.
Because, as you know, in order to do calculations on Victorian quantities, they need to be represented
on the same frames so to have the same unit vectors.
Let's consider a point that's represented with respect to two frames, namely inertial oh zero and look
or one.
Then we can describe that point with respect to two frames like that zero hud j zero had zero had I
want had j one had K one had our unit vectors.
In this case, however, it is not enough to just represent bodies on different frames.
But the key thing that's fundamental concept for robotics is describing the relation and transformation
between these frames.
In order to understand the importance of this issue, let's consider below example as it can be seen
from the picture.
We have inertial frame, which is not moving and local frames assigned to each of the bodies in this
case a robot, some random object robot with camera and fixed camera.
For example, we want to know the distance between the robot and the object on inertial frame.
We can do that firstly, by finding the object's distance from the fixed camera with respect to the
frame of the fixed camera, then find the robot's distance from the fixed camera with respect to frame
of the fixed camera.
Then we can find distance between the robot and the camera from these two vector quantities.
And if we want, we can additional represent this distance in inertial frame in order to do some further
calculations.
As you can see, even for this simple calculation, which is very common in robotics, we use different
transformations and relations between the frames.
In order to do such kind of manipulations, we will need two essential tools.
The first is rotation matrix, which I will explain now.
The second is homogeneous transformation matrix, which will be discussed on the following lessons.
So what is the rotation matrix?
Let's assume that we have a zero coordinate frame, and we rotate this frame by two degrees around zero
axis.
As a result of rotation, we got a new frame of one.
You can ask why not use data itself to describe rotations, which is obvious way of doing that.
However, it has two disadvantages.
Firstly, they can be cases in which small orientation change of epsilon can cause large changes in
the value of data.
Secondly, it is hard to use this representation during 3D cases, so we use less obvious way of rotation
mattresses to describe rotations.
Anyway, let's continue.
So let's try to find the projection of unit vectors of frame or one onto the frame of zero.
As you know, a vector can be represented in a frame by projecting it on the axis of the frame using
simple trigonometry.
We will try to do the same here for each of the axis of the frame or one.
So we have to Project Y one on that zero and then y zero.
Then we project that one onto y zero and then z zero.
In terms of x one.
As the rotation is about x zero axis x zero and x one will be the same.
So we got x one zero one zero and z one zero.
Finally, we can construct our rotation matrix by combining them in a matrix form.
The rotation matrix is depicted by R1 zero.
The meaning of the numbers is that the rotation matrix represents a rotation from frame one to zero.
The same mattresses can be derived for rotation about y zero and z zero axis, as you can do as a Holmberg,
which is very similar to the above derivation.
These mattresses are called element rotation mattresses.
All of the rotation mattresses are not only useful for expressing the orientation of one frame relative
to another.
Let's see there another use of full implementation.
Assume that a point p is represented in two frames, namely o zero and or.
One then we can right, Victor P, with respect to two friends like that, as these two vectors are
the same, we can equalize equations one and two and get equations three, then we can replace unit
vectors of frame one with frame zero and get equation form.
Finally, we can solve four zero one zero zero zero in terms of x one y ones at one.
After doing some algebraic manipulations, we can write the last equations in matrix form.
Like that, you can easily see the rotation matrix of R1 zero, which represents the rotation about
the x zero axis.
This shows another user full implementation of rotation mattresses, which is representing transformation
between the coordinates of a point expressed in two different frames.
Let's see one more implementation case of the rotation mattresses.
Take this scenario into consideration.
We have inertial frame of zero, and moving frame of one frame or one is moving from initial configuration
of all.
One initial equals two or one zero to final configuration of all one final.
Additionally, we have a point p attach to frame or one and move with it from p ie to p f as point p
doesn't move with respect to frame B because it is attached to it.
We can write this equation also from the definition of rotation method as we can write this equation.
Then from the first and second equations, we can get this final equation.
So it is obvious from this relation that rotation mattresses can be used to rotate a vector within the
same coordinate frame.
This is all about the concept and implementation of the rotation mattresses.
In the next lesson, we will discuss some important properties of the new rotation mattresses and their
composition.
See on the next lesson.