Now we will learn about TF2.
TF2 is a very important tool in Ros two and it keeps a track of different frames.
And it can also provide you the transformation from one frame to another frame.
It will like ease your work.
You will not need to calculate the transformation matrix from one frame to another, and it will be
a big trouble if you do that.
You can just use the library and feel at ease.
So here is the command to install different tools that are related to the TF.
Open the terminal and paste it.
Now we will try to run a demo using the same copy this.
And now this will launch our turtle.
One turtle is following the other.
If we move one turtle, the other one will be following the first one.
So how does it do that?
It is just using the library in order to find out the relative pose.
And it is trying to go there and trying to reach there.
Here we have one that will tell us transformation from one frame to another for us to run and TF2,
Ros, TF2, ICO and the run frame and will speak to another frame.
Copy it here, paste it.
So it is giving us the information about the transformation.
And if I try to move, you will see the change in the transformation.
These values are in the quaternion.
These are not the values.
As the Turtle two approaches turtle one the distance value will be minimized.
We can also visualize this thing on the iris.
So the iris is a tool that will enable you to visualize the data on different topics.
We will run this command in order to see the relation between these two frames.
It has opened the race to here we are seeing two frames.
So here we are seeing just one frame because two turtles are aligned with each other.
And if I try to move one there, you will be seeing the distance between them.
Okay.
Let me explain you what this command does.
It just runs our issue.
And then it loaded our configuration file that will be representing if we want to avoid this, we do
not have any information about the configuration file.
How can we visualize this?
We can just run our face to hit enter.
All right.
We are not loading any configuration file.
There you see different frames that are available to you.
I will select a fixed frame, which is default frame, and now I will add TF2.
There are tons of different things that you can add, but.
But currently we are just utilizing one thing that is tf and we will visualize it and.
Click here.
There we have three frames, and if we see the three, there is per frame.
And then there are two child frames.
There are Turtle one and turtle two.
So the first frame is the parent frame.
Now we can form it in.
Now, if I try to move one turtle and you will be seeing the moving frame.
The word frame is this one and it is fixed.
And one that moves first is a turtle one and then one that follows a sea turtle.
Two.
We can also utilize the names.
There we go.
The word frame and turtle one and turtle two are, like, mixed with each other.
And Turtle one goes forward and turtle two goes behind it.