In this video, we will try to apply the lessons, the lessons that we have learned about rotation methods
into practice.
We will use the Pethokoukis Robotics Library.
So let's start with the rotation metrics around X.
As you can see, the rotation metrics around X is defined by the Command X.
We will, uh, define rotation around X Pi over three irradiance, then we will animate this rotation.
So that's its result.
As you can see, the rotation is around X.
That's why X doesn't move, but other X is moving, so let's try it with the minus pi over three.
The rotation should be opposite.
Excuse me.
OK.
As you can see, the rotation is opposite.
So let's do that with the same thing, but with y axis or y equals two rotation burned by PI over three.
No, the y axis doesn't move
on, mate.
OK, well, let's check what will happen.
As you can see, no one axis doesn't move.
There are others.
Other axis movements do the same with my surroundings.
As you can see, the rotation is in opposite direction.
Let's try the same thing with that axis.
OK, merge three or z and animate opposite.
Let's run this section.
As you can see now, the rotation is around z axis and stuff with minus.
As you can see, we get the opposite rotation.
So let's check the properties of rotation mattresses.
So first of all, let's define the rotation mattress, for example, our X rotation x pi over three.
OK, then let's define it.
Let's check whether the combs are mutual or thickening.
We will use DOT product in order to analyze this result because the product of orthogonal vectors are
zero because cosine of 90 is equal to zero.
So let's check the result of the dot product of columns of rotation metrics.
So, OK, we really do the first and second row columns first.
OK, let's check this answer.
What we will get?
OK.
Let's run this section.
Excuse me.
This is one and one so well.
And two, as you can see, we go zero.
So, OK, let's do the same with the product.
Let's do the same with one and three.
Okay.
Well, and see first and third rows press of line.
OK.
As you can see, we got zero.
So let's check if the seam is valid for rows.
Let's do this one.
First row and second row.
Let's check press have line.
As you can see, we got zero again and let's check the first row and third row.
F9 and as you can see, we saw Bruce and columns are mutual orthogonal, so let's check also determinant
of our rotation matrix, which is very important.
It has to be one if you remember correctly.
Let's run F9.
OK, this determinant of our rotation matrix.
OK, we'll check the non-committal commentary tier of rotation practices.
What's known continuity of rotation references.
Let's define tool rotation methods for, for example, the first one is rotation around X Pi, over
three to radiance and the R Y equals rotation of y around, uh, around y axis pi four three degrees
radius.
Excuse me.
So let's first write this one r x y is defined as x multiplied by or, as you know, the multiplication
of rotation mattresses is also rotation method.
So our X Y is rotation matrix.
And also let's define R y x, which is the ordering is opposite of our x y y multiplied by R X.
So let's see the results of these two rotation mattresses on the Mate 10 Mate X Y.
Let's check first this one.
Let's run this section as you can see it, this is our oral rotation for rotation.
Let's see again, this is the whole rotation.
Be careful.
Now we will check R y x.
As you can see, the total different rotation that's around once again.
OK.
This is called non-committal of rotation mattresses.
This is a property, one of the properties of rotation mattresses.
Why?
What does it mean if we change the ordering of rotations?
The resultant rotation is not the same.
It will be quite different, as you can see from this code.
OK, let's check the composition of rotation methods first.
We will define two rotation mattresses.
OK, let's copy this one.
OK, and then we will first do a rotation about current frames.
So post post multiplication, so on x y equals two or x multiplied by r y.
So we will first rotate about our X, then we will rotate the newly created frame about Y of the current
frame, not the fixed frame.
OK, first let's try to OK, let's try to animate
x one before animate.
Let's try to predict the answer.
So let me come to here.
OK.
This is our first axis result.
This is our initial axis we created first or initial, or it can be a little different.
Then we try to uh, as you can see, we pi over two degree irradiance.
We rotated around x zero axis.
As you can see, we got this newly created, um, yellow frame, one frame or one frame.
So then we are rotating this yellow frame about the current y axis.
So not about this one, but about this, uh, y axis.
We will rotate our newly created frame about this, uh, y axis because this is the current frame,
so our resultant rotation will be like that.
So let's check if this is correct.
OK, let's run this session, OK?
As you can see, we get what we expected.
As you can see from here.
So then let's try the opposite.
So are you OK with multiplication?
No, I will do or want X equals two or y times are X and animate, excuse me and mate or X.
OK, first, let's try to predict the answer.
OK, let's pass this one, OK, this is our first frame.
Then we rotate about x zero axis.
Yeah, fixed, uh, frame about the x axis or fixed frame.
So we've got this one.
No, the difference from the first one is here, you have to be careful.
We will now rotate the newly created frame about the not, uh, the y axis of current frame but fixed
frame.
So we will rotate our newly created frame.
So why von about why zero, which is and the uh, which is about the z axis of currently created frame?
So the z axis of current frame?
OK, let's try to rotate.
As you can see now we get this one.
As you can see, the rotation is around y axis of fixed axis, but a fixed frame, but uh, z axis of
current frame.
So let's check if we will get the same answer as we predicted.
Press of nine.
First, let's try to OK, no free press, if not, OK.
As you see, we got what we have expected.
The rotation was around z axis.
Uh, current frame.
Is it axis of current frame?
But the y axis of what?
What axis or fixed frame?
As you can see from here, we expected correctly.
OK, see you on the next lesson.