1
00:00:06,040 --> 00:00:10,210
Remember that we have selected a dark theme in the preference, right?

2
00:00:10,510 --> 00:00:12,220
So it is not dark.

3
00:00:12,250 --> 00:00:14,590
It is still white thing.

4
00:00:14,740 --> 00:00:17,560
So we just need to restart this.

5
00:00:19,660 --> 00:00:22,360
This is now doctrine to explain this code.

6
00:00:22,390 --> 00:00:24,390
There is a complete cross architect.

7
00:00:24,400 --> 00:00:26,260
Let me take you to the website.

8
00:00:26,270 --> 00:00:28,210
So here it is, a website.

9
00:00:30,400 --> 00:00:33,450
Come to hear programming with the Sclc.

10
00:00:33,700 --> 00:00:36,280
There you will see some overview.

11
00:00:36,280 --> 00:00:37,920
And then the nodes.

12
00:00:37,930 --> 00:00:45,880
And here it is, the documentation where you will see the alligators, sports publisher and subscriber.

13
00:00:45,880 --> 00:00:53,020
So if you really want to learn this thing deeply, you need to check out this and the link will be in

14
00:00:53,020 --> 00:00:55,630
the description to keep things easier.

15
00:00:56,050 --> 00:01:02,650
If you just need to focus on this code to understand this code will ask chettipatti because no one can

16
00:01:02,650 --> 00:01:04,740
explain better than Chettipatti.

17
00:01:11,680 --> 00:01:15,190
It is explaining every line, so it is not adding any comments.

18
00:01:15,190 --> 00:01:18,290
It is just like taking some sections and explaining it.

19
00:01:18,310 --> 00:01:20,980
I will just open and try to regenerate.

20
00:01:21,160 --> 00:01:22,540
It will be adding comment.

21
00:01:32,380 --> 00:01:39,310
Okay, so it has successfully added key commands in the first we have the library Arduino Micro that

22
00:01:39,310 --> 00:01:46,810
we have just added into the Arduino IDE and then there is some input output library and then the Ros

23
00:01:46,810 --> 00:01:47,920
client library.

24
00:01:48,160 --> 00:01:52,060
Ros Client library for C and then the Executer library.

25
00:01:52,060 --> 00:01:56,860
And here is the message type and the message that publisher is publishing.

26
00:01:56,860 --> 00:02:01,380
And 32 here it is declaring the publisher and this is the publisher type.

27
00:02:01,390 --> 00:02:07,270
These are all the declarations publisher message executer port allocator and northern timer.

28
00:02:07,270 --> 00:02:14,470
When the publisher comes in, it will need a timer that will keep on repeating itself after a certain

29
00:02:14,470 --> 00:02:17,230
time that we will be inputting in defined.

30
00:02:17,260 --> 00:02:22,000
And these two lines are for the error handling and this is the error loop.

31
00:02:22,000 --> 00:02:28,900
It will just try to blink the Led after 100 milliseconds and this is a timer that will be repeating

32
00:02:28,900 --> 00:02:36,200
itself and inside there are soft check function and this is publishing the message and the message is

33
00:02:36,200 --> 00:02:38,120
being increased here.

34
00:02:38,120 --> 00:02:41,750
And in the work setup we defined the Ros transport.

35
00:02:41,780 --> 00:02:46,220
Like in this case we are connecting Esp32 with fire.

36
00:02:46,250 --> 00:02:48,260
So we are connecting it in serial.

37
00:02:48,290 --> 00:02:51,920
This is why you are seeing this function empty.

38
00:02:52,010 --> 00:02:59,720
But if we connect it via Wi-Fi, then we will be inputting here the Wi-Fi credentials defining that

39
00:02:59,720 --> 00:03:07,550
The pin, which is 13 in this case, is set to the output mode and sets the initial set of PIN to her.

40
00:03:07,910 --> 00:03:08,450
All right.

41
00:03:08,450 --> 00:03:09,950
And then there is our delay.

42
00:03:09,950 --> 00:03:16,880
And then the default allocator is called sport initialize 10 to 0 is called and the node name is here.

43
00:03:16,880 --> 00:03:19,550
Micro Ros Arduino naught.

44
00:03:19,580 --> 00:03:25,250
This is creating the publisher and here it is, the timer initialized and the timer will be repeating

45
00:03:25,250 --> 00:03:27,890
itself after 100 milliseconds.

46
00:03:27,890 --> 00:03:35,630
Then this is the callback function that we saw above here and then there is the initialization of the

47
00:03:35,630 --> 00:03:36,970
executor here.

48
00:03:36,990 --> 00:03:44,330
This number initialized with the zero and the wire, though there is a delay and then the executor is

49
00:03:44,330 --> 00:03:47,810
fed to the executor spin.

50
00:03:47,810 --> 00:03:50,060
This thing will keep everything alive.

51
00:03:50,090 --> 00:03:55,550
The thing that confuses you in this code, you can ask Djibouti about that.

52
00:03:55,550 --> 00:03:56,990
And it will it will guide you.

53
00:03:56,990 --> 00:04:02,720
Well, let's open the Arduino IDE and we will take a look at another example.

54
00:04:02,720 --> 00:04:04,820
We will run the subscriber this time.

55
00:04:09,220 --> 00:04:13,690
My twist subscriber closes.

56
00:04:14,260 --> 00:04:14,860
Upload.

57
00:04:19,030 --> 00:04:20,340
Cord is uploaded.

58
00:04:20,350 --> 00:04:23,710
Now we need to run the micro Ross Agent.

59
00:04:30,420 --> 00:04:33,120
I will just breasty and I will return here.

60
00:04:33,120 --> 00:04:34,770
And this is connected.

61
00:04:37,490 --> 00:04:40,570
So they said they are doing all subscriber topics.

62
00:04:40,580 --> 00:04:42,140
We can also change this name.

63
00:04:42,140 --> 00:04:47,690
If we want to publish on this topic, we will first try to equal this.

64
00:04:49,640 --> 00:04:54,080
And currently no one is publishing over this topic.

65
00:04:54,620 --> 00:04:57,260
So let's create a publisher also.

66
00:05:18,970 --> 00:05:20,430
And there you see it is.

67
00:05:20,440 --> 00:05:24,550
It has published the value on x linear.

68
00:05:24,550 --> 00:05:30,460
And if we try to press L, it will publish this value and see.

69
00:05:31,580 --> 00:05:34,730
And tell you to skip or not.

70
00:05:34,760 --> 00:05:41,390
Establishing the value over this topic and this micro or not is subscribing to this.
