1
00:00:00,540 --> 00:00:06,140
Previously we developed the bot mapping module and now we need to be tested to see whether it is doing

2
00:00:06,150 --> 00:00:07,890
its job correctly or not.

3
00:00:08,730 --> 00:00:11,760
Now there are two ways to test out a specific module.

4
00:00:12,120 --> 00:00:17,130
One method is the method that we booked previously for testing out the localization module.

5
00:00:17,910 --> 00:00:23,970
That included running the simulation, then running the missile that has included that particular module

6
00:00:23,970 --> 00:00:24,840
that we want to test.

7
00:00:25,650 --> 00:00:30,960
This was fine for the localization module, but debugging the mapping module comes with a different

8
00:00:30,960 --> 00:00:31,860
set of problems.

9
00:00:32,520 --> 00:00:39,090
The problem is that we have a very large image which consist of hundreds of thousand pixels, and trying

10
00:00:39,090 --> 00:00:45,990
to debug mapping process in that large image would prove to be very tedious because mapping process

11
00:00:45,990 --> 00:00:51,600
includes finding the interest points that are just individual pixels and the connection and storing

12
00:00:51,600 --> 00:00:52,200
them in a graph.

13
00:00:52,530 --> 00:00:58,380
So individual pixels and the connection would be very hard to debug in a very large image.

14
00:00:58,920 --> 00:01:04,770
So instead what we would like to do is to go to our test mapping file where we have imported a very

15
00:01:04,770 --> 00:01:08,090
tiny image that is only of ten across ten bits.

16
00:01:08,730 --> 00:01:15,510
This gives us the luxury of easily debug a problem or debugging our mapping module if we somehow encounter

17
00:01:15,510 --> 00:01:21,120
a problem because we would know exactly what should have happened and what has happened and we would

18
00:01:21,270 --> 00:01:24,450
easily be able to correct that problem in our algorithm.

19
00:01:24,960 --> 00:01:31,380
So it does work correctly and we will be sure that this particular algorithm is scalable and it would

20
00:01:31,380 --> 00:01:35,380
indeed work correctly for our larger or older means.

21
00:01:36,180 --> 00:01:38,940
So let's go over to the test mapping file.

22
00:01:39,600 --> 00:01:44,910
So we go over to the test mapping file where we have imported the boat mapper and simply imported the

23
00:01:44,910 --> 00:01:49,920
tiny means that is often crossed in pixels and then pass it through that one pass algorithm.

24
00:01:50,460 --> 00:01:52,710
So we run it and as you can see.

25
00:01:53,690 --> 00:01:55,610
Our star name is has been important.

26
00:01:55,970 --> 00:02:01,760
So at the moment, you can see that it's a very simple maze and present space for we have encountered

27
00:02:02,330 --> 00:02:02,750
error.

28
00:02:03,170 --> 00:02:04,190
So what is this error?

29
00:02:04,280 --> 00:02:04,790
Let's look.

30
00:02:05,210 --> 00:02:10,520
It's an attribute error which says that the board mapper object has no attribute reset connection parameters.

31
00:02:10,820 --> 00:02:16,310
So basically, we are missing the definition of this function that was required to reset the state parameters

32
00:02:16,310 --> 00:02:21,200
that represent the state of each vertex connection to its neighbors.

33
00:02:21,470 --> 00:02:22,490
So we haven't defined it.

34
00:02:22,580 --> 00:02:28,100
So let's head over to the board mapping, where before we define the one pass algorithm, let's define

35
00:02:28,100 --> 00:02:30,680
this function and we have defined it right here.

36
00:02:30,860 --> 00:02:37,460
There is reset connection parameters and this basically gives or resets the connection or state parameters

37
00:02:37,460 --> 00:02:40,850
that represent the state of each vertex connection to its neighbors.

38
00:02:41,240 --> 00:02:43,070
So this is the resetting point.

39
00:02:43,190 --> 00:02:49,940
We set them all to false and pressing, say, save this file, and now we can simply rerun the test

40
00:02:49,940 --> 00:02:57,350
mapping file, rerunning it, reloading the maze resident space for loops we have encounter anywhere.

41
00:02:57,620 --> 00:02:59,510
And this time this is a name error.

42
00:02:59,510 --> 00:03:02,180
We'd say that the name neighbor case is not defined.

43
00:03:02,780 --> 00:03:06,590
And the problem here is that we may have misspelled or miss.

44
00:03:06,590 --> 00:03:11,480
Define this neighbour's case then that was basically used to define a case of a neighbor.

45
00:03:12,020 --> 00:03:14,540
So the problem is occurring in the line of connect.

46
00:03:14,540 --> 00:03:16,730
Neighbors function in our block mapping file.

47
00:03:16,790 --> 00:03:21,650
So let's head over there and see what's happening inside the Connect neighbors function.

48
00:03:22,100 --> 00:03:24,650
So in the line like 80, you can see.

49
00:03:26,110 --> 00:03:27,880
Here we have the neighbors neighbors case.

50
00:03:28,210 --> 00:03:30,310
So why is this giving us the name error?

51
00:03:31,180 --> 00:03:35,680
The problem here is that we may have mis defined this particular variable where we have defined it.

52
00:03:35,860 --> 00:03:37,420
So we have defined it right here.

53
00:03:37,720 --> 00:03:42,610
And as you can see, we have not written the correct spelling of the neighbors gate neighbor case.

54
00:03:42,910 --> 00:03:44,530
We have the date as neighbors.

55
00:03:44,780 --> 00:03:48,220
So as is extra, we remove that and save this.

56
00:03:48,520 --> 00:03:51,250
We head over to test mapping and read on the test mapping.

57
00:03:51,820 --> 00:03:57,580
And this time you would observe that once we lowered our means, we run the spacebar.

58
00:03:58,760 --> 00:04:05,040
And zooming to our main interest points, you will see that this interest points looks a lot different

59
00:04:05,080 --> 00:04:06,260
than what we saw before.

60
00:04:06,800 --> 00:04:12,650
The problem here is and all the sprinkler is that we are simply drawing the interest point ship groupers

61
00:04:12,650 --> 00:04:13,730
and those interest points.

62
00:04:14,060 --> 00:04:20,660
But those ships that were included in circles and triangles are of larger than a single pixel.

63
00:04:20,960 --> 00:04:25,850
So because this is a very tiny image, they prove to simply cover the whole image.

64
00:04:26,120 --> 00:04:29,780
So we need to turn them off to simply display our interest points.

65
00:04:30,260 --> 00:04:35,660
So we had to work with the boat mapper both to close this over to the boat mapper.

66
00:04:37,250 --> 00:04:43,490
Reset our our state variables that we're doing interest points to set them to default and debug mapping

67
00:04:43,490 --> 00:04:45,130
because we want to debug the mapping.

68
00:04:45,140 --> 00:04:49,820
So we said this to group and this time we run the test mapping again.

69
00:04:51,400 --> 00:04:52,720
Once our mates get loaded.

70
00:04:55,060 --> 00:04:57,730
We minimize this, said this always on top.

71
00:05:00,800 --> 00:05:02,990
Said This note is connected to always on top.

72
00:05:04,710 --> 00:05:06,480
And simply resize this.

73
00:05:08,420 --> 00:05:10,310
So that you understand what's happening.

74
00:05:11,840 --> 00:05:14,810
And then zoom this snow is connected to now.

75
00:05:15,140 --> 00:05:18,740
What's happening is that we are debugging the individual steps of the mapping.

76
00:05:19,010 --> 00:05:22,550
This involved finding the interest points and connecting them to the neighbors.

77
00:05:23,090 --> 00:05:25,430
So on the left hand side, you'll see the interest points.

78
00:05:25,430 --> 00:05:27,830
On the right hand side, you see the connection.

79
00:05:28,160 --> 00:05:32,900
So at the moment we have found the two interest points that included the start interest point and the

80
00:05:32,900 --> 00:05:33,800
second interest part.

81
00:05:34,250 --> 00:05:38,750
The START interest points does not get connected to any of its neighbors at the start.

82
00:05:39,020 --> 00:05:43,850
And the reason is that there's nothing above it that it needs to be connected to.

83
00:05:44,210 --> 00:05:50,930
So we look in the second interest point, and this will get connected because this includes a neighbor

84
00:05:50,930 --> 00:05:51,770
in its vicinity.

85
00:05:52,100 --> 00:05:58,070
And this light blue simply indicates that this is a three junction as it can get connected to above

86
00:05:58,070 --> 00:06:02,750
interest point or interest point and to its bottom left interest point.

87
00:06:03,230 --> 00:06:06,200
So let's see how this is get connected to this top interest point.

88
00:06:06,560 --> 00:06:11,150
So this move into Smart is getting connected to this orange interest point, which is basically the

89
00:06:11,150 --> 00:06:15,110
start of the maze and it is getting connected in the up direction.

90
00:06:15,260 --> 00:06:20,780
And this is indicated by the green color because we have set all of prediction interest points or abduction

91
00:06:20,780 --> 00:06:22,340
connection to green color.

92
00:06:22,580 --> 00:06:26,330
So this you can see the connection that is being made between these two vertices.

93
00:06:26,690 --> 00:06:31,760
So at the moment, if you look in the in the output that is being generated on this terminal, you can

94
00:06:31,760 --> 00:06:38,750
see that we have connected the 2404 interest point 4 to 4 is basically two rows and four columns representing

95
00:06:38,750 --> 00:06:45,260
the three junction and zero four is the zero row and four column interest point representing the maze

96
00:06:45,290 --> 00:06:47,000
entry or this orange and just point.

97
00:06:47,420 --> 00:06:52,790
So these two are being connected with case that we are stepping up with a value of two.

98
00:06:52,970 --> 00:06:57,830
So two pixel two is getting connected and this gives us a cost of two.

99
00:06:58,220 --> 00:07:01,370
So connecting these two interest points give us a cost of two.

100
00:07:01,580 --> 00:07:02,960
And because we are connecting up.

101
00:07:03,200 --> 00:07:06,440
So this is indicated by this display of up and this green color.

102
00:07:06,890 --> 00:07:12,100
So the same way we move to the next interest point and next connection, you will see that this purple

103
00:07:12,380 --> 00:07:17,300
interest point, which basically indicates a four junction, gets connected to the student on the left

104
00:07:17,300 --> 00:07:17,810
hand side.

105
00:07:18,050 --> 00:07:23,480
And because this connection is in the left hand side is indicated in the notes connected by a red color

106
00:07:23,810 --> 00:07:26,240
of this red color on this connection.

107
00:07:26,510 --> 00:07:35,280
And if you look in the output, you can see that we have connected a333 column, 0.23 column or 3 to

108
00:07:35,280 --> 00:07:37,670
1 column interest point, which is basically this.

109
00:07:37,670 --> 00:07:41,600
DURDEN And this is being connected by moving two steps to the left.

110
00:07:42,290 --> 00:07:48,170
So basically from four junction, we move one step and two step to connect this to the state end.

111
00:07:48,560 --> 00:07:50,360
And this has a cost of two.

112
00:07:50,540 --> 00:07:55,400
And because we were connecting the left direction, this is basically being printed in the terminal

113
00:07:55,430 --> 00:07:57,620
that is connected to the left.

114
00:07:57,920 --> 00:08:01,550
And this red color also indicates that there's a connection.

115
00:08:02,120 --> 00:08:07,350
And then moving further, you will see that because this was purple indicated a four junction.

116
00:08:07,400 --> 00:08:10,550
So this will basically get connected to four of its neighbors.

117
00:08:11,000 --> 00:08:16,190
So this is first it gets connected to this debt and then it will get connected to the three junction,

118
00:08:16,190 --> 00:08:17,300
which is this light blue color.

119
00:08:18,550 --> 00:08:20,770
And as you can see, this is connected to this.

120
00:08:21,040 --> 00:08:22,270
Then it will get connected to it.

121
00:08:22,270 --> 00:08:22,570
Right.

122
00:08:24,220 --> 00:08:25,390
This is indicated by this.

123
00:08:26,260 --> 00:08:28,510
And then it will get connected to its bottom.

124
00:08:28,510 --> 00:08:28,930
Right.

125
00:08:29,140 --> 00:08:30,550
So right now.

126
00:08:31,060 --> 00:08:36,880
So it is you can see this purple interest point gets connected to four of its neighbors and just forms.

127
00:08:37,630 --> 00:08:42,470
And then moving further, you will see that we have encountered a turn which is indicated by this large,

128
00:08:42,580 --> 00:08:43,450
dark blue color.

129
00:08:43,810 --> 00:08:48,850
So as tunes are basically any interest points that have to pass to the vicinity.

130
00:08:49,150 --> 00:08:51,820
So one path is up to it and one path to its right.

131
00:08:52,030 --> 00:08:56,110
So it will first get connected to its up interest point, which is this slight blue color, which is

132
00:08:56,110 --> 00:09:01,720
a three junction and this is indicated by this green color and then it will get connected to its interest

133
00:09:01,720 --> 00:09:03,070
point, which is a full junction.

134
00:09:03,580 --> 00:09:09,340
So in this way, we can be sure that our mapping process is indeed working correctly for this time.

135
00:09:10,150 --> 00:09:15,760
And as it can see, once we get to the end, you will see that our interest points that we are from

136
00:09:16,120 --> 00:09:18,850
this particular maze are basically two tones.

137
00:09:20,480 --> 00:09:23,390
Five three junction and two for junction.

138
00:09:23,570 --> 00:09:24,590
So 252.

139
00:09:24,830 --> 00:09:31,760
Only the nine interest points were necessary to represent this me is 500 pixels that was represented

140
00:09:31,910 --> 00:09:33,170
in 100 pixels image.

141
00:09:33,710 --> 00:09:40,700
So this is how we see our memory and also the processing time and simply get the same results of finding

142
00:09:40,700 --> 00:09:42,830
or mapping our whole mess.

143
00:09:43,460 --> 00:09:49,670
Now we can head over to our larger image that is our original maze and see whether it does the same

144
00:09:49,670 --> 00:09:50,450
job there.

145
00:09:50,870 --> 00:09:56,750
So for that, we head over to the board mapping and we first need to reset these state variables.

146
00:09:56,750 --> 00:10:01,610
The first is that we want to draw the interest point because in the larger maze we could not easily

147
00:10:01,610 --> 00:10:03,590
see the colors of the individual pixel.

148
00:10:03,890 --> 00:10:08,240
So we need to draw them by representing them in the form of shapes around those pixels.

149
00:10:08,540 --> 00:10:15,140
So basically a circle represents a basically ordered and grinding represents a three junction in that

150
00:10:15,140 --> 00:10:15,440
case.

151
00:10:15,800 --> 00:10:21,110
And because we don't want to debug mapping anymore in the larger context, because there it would just

152
00:10:21,110 --> 00:10:24,200
take a lot of time because there are 100,000 pixels.

153
00:10:24,290 --> 00:10:25,460
So we set this to false.

154
00:10:25,880 --> 00:10:28,010
Now we have already started the simulation.

155
00:10:28,010 --> 00:10:35,270
We head over to our terminal, open the new terminal, build this again and then run this.

156
00:10:35,840 --> 00:10:40,320
And this time you will see once we get the output of the localising stage, which is basically the middle

157
00:10:40,370 --> 00:10:47,090
occupancy grid, and then we can now move testing our mapping and this runs for a few seconds and then

158
00:10:47,600 --> 00:10:52,760
it's displays as the interest point that is found and the connection between those interests point.

159
00:10:53,120 --> 00:10:57,290
So you can easily see on the left hand side we have found the interest points which are basically the

160
00:10:57,290 --> 00:11:01,910
subject color indicating the end and junction or dead end because there's no path.

161
00:11:02,150 --> 00:11:06,830
And then going back and this time that represents the three junction and square represents the four

162
00:11:06,830 --> 00:11:07,310
junction.

163
00:11:07,880 --> 00:11:13,190
And on the right hand side, you can see the connection part of the mapping module working correctly

164
00:11:13,460 --> 00:11:20,480
because this green line simply represents an upper connection of a node or interest point to its neighbor.

165
00:11:20,780 --> 00:11:26,600
So as you can see, this large green line or very long green line simply indicates that this interest

166
00:11:26,600 --> 00:11:32,900
point that was built below this below this green line and the stop of this green line has been connected

167
00:11:33,200 --> 00:11:36,740
by simply this two ingress points and the connection between them.

168
00:11:36,980 --> 00:11:40,070
So all of these extra pixels were simply redundant.

169
00:11:40,310 --> 00:11:46,910
And we have saved this information and save and save a lot of processing power so that our algorithm

170
00:11:46,910 --> 00:11:49,520
works a lot faster and simpler, easier.

171
00:11:50,030 --> 00:11:56,600
So this proves that our mapping module is indeed working correctly, and now we can move on to attempting

172
00:11:56,600 --> 00:11:57,860
the path planning algorithm.

173
00:11:58,370 --> 00:11:58,970
Till then.

174
00:11:59,240 --> 00:11:59,780
Thank you.

175
00:11:59,990 --> 00:12:00,590
And by.
