1
00:00:00,510 --> 00:00:07,170
Driving mode was created previously Nordstrom to get ahead of it and start working with the theory that

2
00:00:07,170 --> 00:00:08,190
we have just taken.

3
00:00:08,190 --> 00:00:09,840
And that is our go to go, right?

4
00:00:10,590 --> 00:00:13,920
I have created a download here go to Google Dot fight.

5
00:00:13,950 --> 00:00:21,840
And so one of the most important step is to add that in do not go to go into setup by file of the package

6
00:00:21,840 --> 00:00:23,300
and that has been already done.

7
00:00:23,310 --> 00:00:25,010
So basic stuff is ready.

8
00:00:25,020 --> 00:00:28,110
My simulation is running, robot is in the simulation.

9
00:00:28,110 --> 00:00:32,580
I just need to write the code to write the go to world behavior.

10
00:00:32,580 --> 00:00:42,150
What I am going to do is do utilize this driving, no dirt bike and I'm going to edit it to our needs

11
00:00:42,270 --> 00:00:45,060
so we can get started with the development of go to work.

12
00:00:45,070 --> 00:00:45,390
Okay.

13
00:00:45,990 --> 00:00:52,140
One common thing between driving load and go to goal is going to be the command velocity.

14
00:00:52,140 --> 00:00:54,360
It is going to be publishing command velocity.

15
00:00:54,750 --> 00:01:00,330
I will need to add a lot of things like the publisher, the subscribers that are going to be required

16
00:01:00,330 --> 00:01:00,480
here.

17
00:01:00,480 --> 00:01:00,810
Okay.

18
00:01:01,230 --> 00:01:06,030
So minimum publisher is not going to be the name of this specific node.

19
00:01:06,030 --> 00:01:12,510
It is going to be robot go to Google.

20
00:01:12,810 --> 00:01:16,350
That is going to be the name of the class that we are going to be dealing with.

21
00:01:16,890 --> 00:01:19,350
And it is not going to be with the minimum publisher.

22
00:01:19,350 --> 00:01:25,950
It is going to be GDG Node and here we are.

23
00:01:27,540 --> 00:01:29,520
No, it's not a velocity publisher.

24
00:01:29,940 --> 00:01:32,370
It is going to be

25
00:01:35,100 --> 00:01:41,330
goal movement, node and gold movement load.

26
00:01:41,340 --> 00:01:47,190
Basically able to load coming to the point that velocity publishing is going to be on the same topic.

27
00:01:47,190 --> 00:01:48,510
Yes, it is going to be.

28
00:01:48,510 --> 00:01:50,130
And we need this time.

29
00:01:51,390 --> 00:01:54,930
Lord, I know we are doing its timer callback.

30
00:01:55,170 --> 00:01:59,550
It is going to be the time we call back or let's see what it is going to be.

31
00:02:00,180 --> 00:02:03,960
It is publishing and a timer call back has been said.

32
00:02:04,320 --> 00:02:08,430
Okay, fine, let's create a subscriber for that.

33
00:02:08,430 --> 00:02:10,200
Let's just go to the Google.

34
00:02:10,500 --> 00:02:17,010
And I have already opened up Ros Vicky to show you how you can get the code of published subscriber.

35
00:02:17,100 --> 00:02:25,170
I am say published again and again coming to the subscriber in this specific thing, the specific project

36
00:02:25,170 --> 00:02:31,860
we are requiring multiple publishers and subscribers to do common one is the first we want to send the

37
00:02:31,860 --> 00:02:32,400
velocity.

38
00:02:32,400 --> 00:02:34,260
The second one we want to send.

39
00:02:34,260 --> 00:02:36,390
We want to get the powers of the robot.

40
00:02:36,600 --> 00:02:43,260
For that we are going to create this subscriber ID start renaming things to our requirements.

41
00:02:43,530 --> 00:02:45,300
It is not going to be a string.

42
00:02:45,300 --> 00:02:51,900
It is going to be a pause and the topic is going to be pause or dawn.

43
00:02:53,700 --> 00:02:54,630
How do I do that?

44
00:02:54,840 --> 00:03:02,790
Let me open up my terminal and the ROS two topic list is going to tell us everything about what we are

45
00:03:02,970 --> 00:03:03,630
requiring.

46
00:03:04,020 --> 00:03:16,350
So it is going to be in order and if I get information about it, Ros to topic I can Ros to interface.

47
00:03:16,860 --> 00:03:17,380
Sure.

48
00:03:17,760 --> 00:03:26,400
Or that is from navigation stack, I guess navigation messages and then navigation messages.

49
00:03:26,670 --> 00:03:31,500
And if I double press tab or dormitory.

50
00:03:32,850 --> 00:03:35,850
Yes, I think that is the message.

51
00:03:35,910 --> 00:03:42,390
But how do how do I know that Ros to topic info or dome is going to reveal that information?

52
00:03:42,390 --> 00:03:46,740
To me it is utilization, navigation, messages, message or imagery.

53
00:03:46,740 --> 00:03:49,620
If I go here, there are some things posted.

54
00:03:49,860 --> 00:03:51,360
I will look into it later.

55
00:03:51,360 --> 00:03:54,330
But first, let's define certain things.

56
00:03:55,320 --> 00:04:06,990
Geometric message and from navigation message message dot message import or give me tree and sorry it

57
00:04:06,990 --> 00:04:08,190
is not going to pause.

58
00:04:08,190 --> 00:04:11,220
It is going to be the tree from the ordering topic.

59
00:04:11,850 --> 00:04:15,990
And I'm going to say Bose call back

60
00:04:18,570 --> 00:04:22,680
and that suits very well for this specific problem.

61
00:04:23,100 --> 00:04:28,740
We have a publisher, we have a subscribe, but I don't want it to be named as a publisher and a subscriber.

62
00:04:28,740 --> 00:04:33,900
I would say that it is going to be a velocity publisher.

63
00:04:35,070 --> 00:04:38,820
Rename it I'm for the subscription.

64
00:04:39,450 --> 00:04:42,630
Okay, that is dangerous because it is going to be here as well.

65
00:04:43,020 --> 00:04:47,790
I'm just going to say pause some.

66
00:04:48,720 --> 00:04:49,080
Okay.

67
00:04:49,500 --> 00:04:50,220
Makes sense.

68
00:04:50,430 --> 00:04:55,200
I'm just writing in front of you to make you comfortable with discord as well so you can write it in

69
00:04:55,200 --> 00:04:55,740
this manner.

70
00:04:56,400 --> 00:04:58,110
Publisher and a subscriber.

71
00:04:58,470 --> 00:04:59,460
Now we need to do.

72
00:05:00,360 --> 00:05:05,810
Now what we need to do is to understand how we can deal with the data of our subscriber.

73
00:05:06,360 --> 00:05:06,720
Okay.

74
00:05:08,070 --> 00:05:12,480
We currently are not using any timer.

75
00:05:12,630 --> 00:05:14,130
We can create a timer as a

76
00:05:18,390 --> 00:05:22,710
last name and go to goal function.

77
00:05:23,610 --> 00:05:29,460
And that function is going to be defined here, defined go to go function and I'm going to just say

78
00:05:29,460 --> 00:05:30,810
is equal to one for now.

79
00:05:31,170 --> 00:05:32,430
Not that doing nothing there.

80
00:05:32,730 --> 00:05:40,170
So whenever I get the pause, I'm going to come back to this specific piece to say I'm going to come

81
00:05:40,170 --> 00:05:43,380
back at the pause callback whenever the pause is received.

82
00:05:43,740 --> 00:05:47,280
So for that, I need to understand the data that it is receiving.

83
00:05:48,300 --> 00:05:54,420
And when it is receiving a data, we need to assign that data to something that we can perform to processing

84
00:05:54,420 --> 00:05:55,290
the variables.

85
00:05:55,650 --> 00:05:58,430
If we take a look, it says there is a child ready frame.

86
00:05:58,710 --> 00:06:06,540
This gives us information, but I think more accurate information can be obtained like this and more

87
00:06:06,540 --> 00:06:14,760
understandable data can be understood, can be ROS, can be visualized visually.

88
00:06:14,910 --> 00:06:16,860
We can see it when we echo the topic.

89
00:06:16,890 --> 00:06:17,220
Okay.

90
00:06:17,730 --> 00:06:20,160
Just stopping it, putting it on full screen.

91
00:06:20,700 --> 00:06:26,610
This is one single message headed till the next header.

92
00:06:29,890 --> 00:06:30,850
From this point.

93
00:06:30,880 --> 00:06:31,510
At this point.

94
00:06:31,510 --> 00:06:33,100
Okay, headdress.

95
00:06:33,100 --> 00:06:34,270
10 seconds.

96
00:06:34,480 --> 00:06:36,690
We have pause.

97
00:06:37,010 --> 00:06:40,420
Indeed, there is a pause and it is a position.

98
00:06:40,420 --> 00:06:42,820
And then there is an X pause.

99
00:06:42,820 --> 00:06:43,790
Pause position.

100
00:06:43,920 --> 00:06:45,160
Okay, let's write it down.

101
00:06:45,700 --> 00:06:52,540
So the robot pause in x is equal to data.

102
00:06:52,960 --> 00:06:56,710
Pause dot pause dot position dot x.

103
00:06:56,740 --> 00:06:57,520
Is that correct.

104
00:06:57,790 --> 00:06:59,530
Data full message.

105
00:07:00,130 --> 00:07:02,260
Pause that pause the position.

106
00:07:03,220 --> 00:07:04,840
Yes, that's correct.

107
00:07:06,010 --> 00:07:07,120
For Y as well.

108
00:07:07,120 --> 00:07:17,350
We are going to require y, robot pause, y and Z is going to be what we will be using.

109
00:07:18,010 --> 00:07:20,440
It is going to be the intention.

110
00:07:21,160 --> 00:07:21,640
The Z.

111
00:07:22,270 --> 00:07:23,410
Okay, seems good.

112
00:07:24,700 --> 00:07:26,530
You don't need to publish the velocity here.

113
00:07:26,830 --> 00:07:30,640
You are going to be publishing velocity and it will be required here.

114
00:07:30,910 --> 00:07:31,270
Okay.

115
00:07:32,140 --> 00:07:34,420
For now, just get out of the quote.

116
00:07:35,890 --> 00:07:37,780
These are the data that we are receiving.

117
00:07:38,110 --> 00:07:41,890
What is our script working correctly?

118
00:07:41,890 --> 00:07:42,880
We need to check it.

119
00:07:42,880 --> 00:07:46,540
So I'm going to use ROS logging functionality.

120
00:07:47,130 --> 00:07:48,520
That is really amazing.

121
00:07:48,520 --> 00:07:55,030
When we are developing first we define a message and then we put this message in do set of don't get

122
00:07:55,630 --> 00:07:56,350
longer.

123
00:07:57,040 --> 00:07:58,660
They have already given me the option.

124
00:07:59,140 --> 00:08:03,390
I get longer I think in full.

125
00:08:04,210 --> 00:08:09,790
I think yes, that is the syntax text, whatever it is not we can get it from the wiki.

126
00:08:09,790 --> 00:08:10,720
Where was the wiki.

127
00:08:11,350 --> 00:08:14,170
Do I have the log it hit get longer info.

128
00:08:14,170 --> 00:08:16,660
Yes I have, I have written correctly.

129
00:08:16,660 --> 00:08:20,890
You know what is the message here.

130
00:08:21,170 --> 00:08:29,360
Message is going to be first I'm going to say X and then I'm going to say Y and then I'm going to say

131
00:08:29,400 --> 00:08:34,240
Z off the date of Z of x, y, z of my robot.

132
00:08:34,630 --> 00:08:43,420
And when I say that Z X, it is going to be I'm defining a placeholder with the float value of three,

133
00:08:44,320 --> 00:08:54,490
meaning I think after the decimal there are going to be three values, up to three decimal points for

134
00:08:54,490 --> 00:08:55,060
all of them.

135
00:08:55,540 --> 00:09:05,770
And then I had a write format and I will be giving the values the rule board pause x call my robot for

136
00:09:05,920 --> 00:09:07,960
y call my robot.

137
00:09:08,440 --> 00:09:10,660
It is giving me the values by itself.

138
00:09:11,380 --> 00:09:14,410
I think the code is ready for just starting.

139
00:09:14,800 --> 00:09:17,740
I am going to bring in my domain.

140
00:09:17,860 --> 00:09:26,200
Then let me squeeze it down and I'm going to say going to my repository part planning perform can build.

141
00:09:32,230 --> 00:09:38,350
Build the package because I've written this new go to work load.

142
00:09:38,680 --> 00:09:43,990
It took 6 seconds for care rice to run me bought.

143
00:09:44,290 --> 00:09:45,180
Is it sourced?

144
00:09:45,190 --> 00:09:51,280
No installed setup nor do sourced rice to run mes board.

145
00:09:51,640 --> 00:09:53,560
And the name of the node is go to toward.

146
00:09:54,520 --> 00:09:57,490
Let's run it and bring our simulation side by side.

147
00:10:00,210 --> 00:10:01,830
Only one argument was given.

148
00:10:01,830 --> 00:10:03,900
There is some sort of a syntax error.

149
00:10:04,200 --> 00:10:05,190
Go to google function.

150
00:10:05,190 --> 00:10:08,070
Take zero positional argument but one was given.

151
00:10:08,340 --> 00:10:09,150
Where did I?

152
00:10:10,980 --> 00:10:16,650
I think it requires the set of function, not sourcing.

153
00:10:16,650 --> 00:10:25,590
We need the collagen building and let's bring the simulation and dominant as well to see what the values

154
00:10:25,590 --> 00:10:27,750
that we are getting are correct or not.

155
00:10:28,650 --> 00:10:29,490
And under load.

156
00:10:29,670 --> 00:10:30,540
Where is the line.

157
00:10:31,530 --> 00:10:31,920
Yes.

158
00:10:31,920 --> 00:10:33,630
Hit it is lost to run me port.

159
00:10:35,610 --> 00:10:35,990
Okay.

160
00:10:36,480 --> 00:10:44,370
In X is 0.2 -0.7 and some angular side as well.

161
00:10:44,880 --> 00:10:46,530
So let me change.

162
00:10:46,530 --> 00:10:53,130
The orientation of the robot is complete pause and we'll see that if the rotation part is working or

163
00:10:53,130 --> 00:10:53,390
not.

164
00:10:53,400 --> 00:10:57,840
Okay, let me rotate the robot now.

165
00:10:57,840 --> 00:11:05,040
The values have changed to 0.9 and if I change it to another side, 0.9 and as again change, okay,

166
00:11:05,340 --> 00:11:11,340
if I put this robot here, x and Y are not going to change X and y values have not changed a lot.

167
00:11:11,340 --> 00:11:17,730
If I put on the negative side of y, I think it was negative side of the x and the values have shifted.

168
00:11:18,630 --> 00:11:28,140
What I was testing here that are basic good we are just logging the basic go to goal is to some extent

169
00:11:28,140 --> 00:11:28,710
ready.

170
00:11:29,070 --> 00:11:34,200
We need to add the equations and then we'll move forward.
