1
00:00:05,910 --> 00:00:08,280
Now we will learn about TF2.

2
00:00:08,310 --> 00:00:13,740
TF2 is a very important tool in Ros two and it keeps a track of different frames.

3
00:00:13,800 --> 00:00:18,230
And it can also provide you the transformation from one frame to another frame.

4
00:00:18,240 --> 00:00:20,820
It will like ease your work.

5
00:00:20,940 --> 00:00:26,520
You will not need to calculate the transformation matrix from one frame to another, and it will be

6
00:00:26,520 --> 00:00:27,900
a big trouble if you do that.

7
00:00:27,930 --> 00:00:32,640
You can just use the library and feel at ease.

8
00:00:33,000 --> 00:00:38,050
So here is the command to install different tools that are related to the TF.

9
00:00:38,070 --> 00:00:40,440
Open the terminal and paste it.

10
00:00:44,800 --> 00:00:49,090
Now we will try to run a demo using the same copy this.

11
00:00:49,090 --> 00:00:53,560
And now this will launch our turtle.

12
00:00:58,380 --> 00:01:00,210
One turtle is following the other.

13
00:01:04,350 --> 00:01:09,210
If we move one turtle, the other one will be following the first one.

14
00:01:09,450 --> 00:01:12,050
So how does it do that?

15
00:01:12,060 --> 00:01:18,000
It is just using the library in order to find out the relative pose.

16
00:01:18,000 --> 00:01:21,910
And it is trying to go there and trying to reach there.

17
00:01:21,930 --> 00:01:28,500
Here we have one that will tell us transformation from one frame to another for us to run and TF2,

18
00:01:28,500 --> 00:01:32,940
Ros, TF2, ICO and the run frame and will speak to another frame.

19
00:01:32,940 --> 00:01:34,830
Copy it here, paste it.

20
00:01:36,800 --> 00:01:40,580
So it is giving us the information about the transformation.

21
00:01:41,900 --> 00:01:46,500
And if I try to move, you will see the change in the transformation.

22
00:01:46,520 --> 00:01:48,840
These values are in the quaternion.

23
00:01:48,860 --> 00:01:50,780
These are not the values.

24
00:01:50,780 --> 00:01:57,020
As the Turtle two approaches turtle one the distance value will be minimized.

25
00:01:57,050 --> 00:02:00,410
We can also visualize this thing on the iris.

26
00:02:00,410 --> 00:02:06,000
So the iris is a tool that will enable you to visualize the data on different topics.

27
00:02:06,020 --> 00:02:10,580
We will run this command in order to see the relation between these two frames.

28
00:02:13,630 --> 00:02:18,310
It has opened the race to here we are seeing two frames.

29
00:02:20,690 --> 00:02:25,880
So here we are seeing just one frame because two turtles are aligned with each other.

30
00:02:25,880 --> 00:02:30,260
And if I try to move one there, you will be seeing the distance between them.

31
00:02:31,520 --> 00:02:32,150
Okay.

32
00:02:33,650 --> 00:02:36,070
Let me explain you what this command does.

33
00:02:36,080 --> 00:02:37,730
It just runs our issue.

34
00:02:37,730 --> 00:02:46,490
And then it loaded our configuration file that will be representing if we want to avoid this, we do

35
00:02:46,490 --> 00:02:48,830
not have any information about the configuration file.

36
00:02:48,860 --> 00:02:51,020
How can we visualize this?

37
00:02:51,050 --> 00:02:55,070
We can just run our face to hit enter.

38
00:02:55,310 --> 00:02:55,840
All right.

39
00:02:55,850 --> 00:02:58,310
We are not loading any configuration file.

40
00:02:59,150 --> 00:03:02,110
There you see different frames that are available to you.

41
00:03:02,120 --> 00:03:08,900
I will select a fixed frame, which is default frame, and now I will add TF2.

42
00:03:08,930 --> 00:03:12,050
There are tons of different things that you can add, but.

43
00:03:12,050 --> 00:03:17,930
But currently we are just utilizing one thing that is tf and we will visualize it and.

44
00:03:21,230 --> 00:03:21,990
Click here.

45
00:03:22,040 --> 00:03:27,260
There we have three frames, and if we see the three, there is per frame.

46
00:03:27,260 --> 00:03:29,210
And then there are two child frames.

47
00:03:29,210 --> 00:03:31,110
There are Turtle one and turtle two.

48
00:03:31,130 --> 00:03:33,770
So the first frame is the parent frame.

49
00:03:34,100 --> 00:03:35,600
Now we can form it in.

50
00:03:36,080 --> 00:03:42,500
Now, if I try to move one turtle and you will be seeing the moving frame.

51
00:03:46,640 --> 00:03:49,610
The word frame is this one and it is fixed.

52
00:03:49,610 --> 00:03:57,260
And one that moves first is a turtle one and then one that follows a sea turtle.

53
00:03:57,290 --> 00:03:57,650
Two.

54
00:03:58,040 --> 00:04:00,260
We can also utilize the names.

55
00:04:02,390 --> 00:04:03,080
There we go.

56
00:04:03,110 --> 00:04:09,500
The word frame and turtle one and turtle two are, like, mixed with each other.

57
00:04:10,070 --> 00:04:15,920
And Turtle one goes forward and turtle two goes behind it.
