Previously we developed the bot mapping module and now we need to be tested to see whether it is doing
its job correctly or not.
Now there are two ways to test out a specific module.
One method is the method that we booked previously for testing out the localization module.
That included running the simulation, then running the missile that has included that particular module
that we want to test.
This was fine for the localization module, but debugging the mapping module comes with a different
set of problems.
The problem is that we have a very large image which consist of hundreds of thousand pixels, and trying
to debug mapping process in that large image would prove to be very tedious because mapping process
includes finding the interest points that are just individual pixels and the connection and storing
them in a graph.
So individual pixels and the connection would be very hard to debug in a very large image.
So instead what we would like to do is to go to our test mapping file where we have imported a very
tiny image that is only of ten across ten bits.
This gives us the luxury of easily debug a problem or debugging our mapping module if we somehow encounter
a problem because we would know exactly what should have happened and what has happened and we would
easily be able to correct that problem in our algorithm.
So it does work correctly and we will be sure that this particular algorithm is scalable and it would
indeed work correctly for our larger or older means.
So let's go over to the test mapping file.
So we go over to the test mapping file where we have imported the boat mapper and simply imported the
tiny means that is often crossed in pixels and then pass it through that one pass algorithm.
So we run it and as you can see.
Our star name is has been important.
So at the moment, you can see that it's a very simple maze and present space for we have encountered
error.
So what is this error?
Let's look.
It's an attribute error which says that the board mapper object has no attribute reset connection parameters.
So basically, we are missing the definition of this function that was required to reset the state parameters
that represent the state of each vertex connection to its neighbors.
So we haven't defined it.
So let's head over to the board mapping, where before we define the one pass algorithm, let's define
this function and we have defined it right here.
There is reset connection parameters and this basically gives or resets the connection or state parameters
that represent the state of each vertex connection to its neighbors.
So this is the resetting point.
We set them all to false and pressing, say, save this file, and now we can simply rerun the test
mapping file, rerunning it, reloading the maze resident space for loops we have encounter anywhere.
And this time this is a name error.
We'd say that the name neighbor case is not defined.
And the problem here is that we may have misspelled or miss.
Define this neighbour's case then that was basically used to define a case of a neighbor.
So the problem is occurring in the line of connect.
Neighbors function in our block mapping file.
So let's head over there and see what's happening inside the Connect neighbors function.
So in the line like 80, you can see.
Here we have the neighbors neighbors case.
So why is this giving us the name error?
The problem here is that we may have mis defined this particular variable where we have defined it.
So we have defined it right here.
And as you can see, we have not written the correct spelling of the neighbors gate neighbor case.
We have the date as neighbors.
So as is extra, we remove that and save this.
We head over to test mapping and read on the test mapping.
And this time you would observe that once we lowered our means, we run the spacebar.
And zooming to our main interest points, you will see that this interest points looks a lot different
than what we saw before.
The problem here is and all the sprinkler is that we are simply drawing the interest point ship groupers
and those interest points.
But those ships that were included in circles and triangles are of larger than a single pixel.
So because this is a very tiny image, they prove to simply cover the whole image.
So we need to turn them off to simply display our interest points.
So we had to work with the boat mapper both to close this over to the boat mapper.
Reset our our state variables that we're doing interest points to set them to default and debug mapping
because we want to debug the mapping.
So we said this to group and this time we run the test mapping again.
Once our mates get loaded.
We minimize this, said this always on top.
Said This note is connected to always on top.
And simply resize this.
So that you understand what's happening.
And then zoom this snow is connected to now.
What's happening is that we are debugging the individual steps of the mapping.
This involved finding the interest points and connecting them to the neighbors.
So on the left hand side, you'll see the interest points.
On the right hand side, you see the connection.
So at the moment we have found the two interest points that included the start interest point and the
second interest part.
The START interest points does not get connected to any of its neighbors at the start.
And the reason is that there's nothing above it that it needs to be connected to.
So we look in the second interest point, and this will get connected because this includes a neighbor
in its vicinity.
And this light blue simply indicates that this is a three junction as it can get connected to above
interest point or interest point and to its bottom left interest point.
So let's see how this is get connected to this top interest point.
So this move into Smart is getting connected to this orange interest point, which is basically the
start of the maze and it is getting connected in the up direction.
And this is indicated by the green color because we have set all of prediction interest points or abduction
connection to green color.
So this you can see the connection that is being made between these two vertices.
So at the moment, if you look in the in the output that is being generated on this terminal, you can
see that we have connected the 2404 interest point 4 to 4 is basically two rows and four columns representing
the three junction and zero four is the zero row and four column interest point representing the maze
entry or this orange and just point.
So these two are being connected with case that we are stepping up with a value of two.
So two pixel two is getting connected and this gives us a cost of two.
So connecting these two interest points give us a cost of two.
And because we are connecting up.
So this is indicated by this display of up and this green color.
So the same way we move to the next interest point and next connection, you will see that this purple
interest point, which basically indicates a four junction, gets connected to the student on the left
hand side.
And because this connection is in the left hand side is indicated in the notes connected by a red color
of this red color on this connection.
And if you look in the output, you can see that we have connected a333 column, 0.23 column or 3 to
1 column interest point, which is basically this.
DURDEN And this is being connected by moving two steps to the left.
So basically from four junction, we move one step and two step to connect this to the state end.
And this has a cost of two.
And because we were connecting the left direction, this is basically being printed in the terminal
that is connected to the left.
And this red color also indicates that there's a connection.
And then moving further, you will see that because this was purple indicated a four junction.
So this will basically get connected to four of its neighbors.
So this is first it gets connected to this debt and then it will get connected to the three junction,
which is this light blue color.
And as you can see, this is connected to this.
Then it will get connected to it.
Right.
This is indicated by this.
And then it will get connected to its bottom.
Right.
So right now.
So it is you can see this purple interest point gets connected to four of its neighbors and just forms.
And then moving further, you will see that we have encountered a turn which is indicated by this large,
dark blue color.
So as tunes are basically any interest points that have to pass to the vicinity.
So one path is up to it and one path to its right.
So it will first get connected to its up interest point, which is this slight blue color, which is
a three junction and this is indicated by this green color and then it will get connected to its interest
point, which is a full junction.
So in this way, we can be sure that our mapping process is indeed working correctly for this time.
And as it can see, once we get to the end, you will see that our interest points that we are from
this particular maze are basically two tones.
Five three junction and two for junction.
So 252.
Only the nine interest points were necessary to represent this me is 500 pixels that was represented
in 100 pixels image.
So this is how we see our memory and also the processing time and simply get the same results of finding
or mapping our whole mess.
Now we can head over to our larger image that is our original maze and see whether it does the same
job there.
So for that, we head over to the board mapping and we first need to reset these state variables.
The first is that we want to draw the interest point because in the larger maze we could not easily
see the colors of the individual pixel.
So we need to draw them by representing them in the form of shapes around those pixels.
So basically a circle represents a basically ordered and grinding represents a three junction in that
case.
And because we don't want to debug mapping anymore in the larger context, because there it would just
take a lot of time because there are 100,000 pixels.
So we set this to false.
Now we have already started the simulation.
We head over to our terminal, open the new terminal, build this again and then run this.
And this time you will see once we get the output of the localising stage, which is basically the middle
occupancy grid, and then we can now move testing our mapping and this runs for a few seconds and then
it's displays as the interest point that is found and the connection between those interests point.
So you can easily see on the left hand side we have found the interest points which are basically the
subject color indicating the end and junction or dead end because there's no path.
And then going back and this time that represents the three junction and square represents the four
junction.
And on the right hand side, you can see the connection part of the mapping module working correctly
because this green line simply represents an upper connection of a node or interest point to its neighbor.
So as you can see, this large green line or very long green line simply indicates that this interest
point that was built below this below this green line and the stop of this green line has been connected
by simply this two ingress points and the connection between them.
So all of these extra pixels were simply redundant.
And we have saved this information and save and save a lot of processing power so that our algorithm
works a lot faster and simpler, easier.
So this proves that our mapping module is indeed working correctly, and now we can move on to attempting
the path planning algorithm.
Till then.
Thank you.
And by.