What we have done so far is we are capable of driving the robot in the simulation.
We have the differential drive plug in ready.
We're moving to the goal.
We have the camera setup on the top to look on the ground, on the maze and make the computer vision
deep inside of it.
One last thing to make the life of our computer vision D really easy, and that is make a node to save
the video for image processing for computer vision tasks.
Okay.
This node is going to be really important.
If I click right click and create a new file, I am going to see that this file name is going to be
named as video saved or if it is going to be a basic node.
I have already copy the code just based.
If we look at this code line library open CV two should be installed in your system.
Okay.
Open CV two is the main thing while we execute this thing.
Node CV Bridge Open CV two The important thing that you have to install by yourself coming to the point
sends a message.
Message images utilize.
This is a new sense of methods that we have not talked about earlier, but this is the sensor message
that deals with the images interests.
Okay, simple publish subscriber functionality.
We are calling this class leading an object of work here and named as image subscriber and defining
a node video subscriber.
Subscriber is defined here with the specific topic of video part where you want the video to be saved
as each of the images are going to be combined into a form of video.
Then here we utilize some really interesting functionality of Opensea that we see all of the frames
we obtained on this specific topic and write it in, do a video, okay?
And the size is 1280 by 720.
How do I know that?
Because I have written it.
I'm going to make changes into this thing, which is the 800 by 800 it is going to provide.
I wanted 1280 by 720 sort of a seven type video.
Okay.
35 7:20 p.m. jp for encoding and it is going to save it into an object.
Opt out is not yet written.
Okay.
Before writing out of out is this containing the configuration?
It's not the images or the video stream.
Actually, video stream is here when the process data callback function is called whenever subscribed
data frame, it calls this process data process data contains one image and that image is converted
into from the rice enable of the format into open CV to enable format.
It is converted into a rice based from raw space to open CV understandable format with this TV bridge
functionality.
And then it becomes a simple frame of an image, and then it is saved in the form of the video after
combining a lot of teams.
So this is this basic functionality north of 80 rocket science.
What I am going to do is to provide actual top.
In our case, if I open up this, it is actually a per camera image raw.
Okay, that is going to be the topic on which it is going to be publishing.
30 FP This is what I have asked it for and everything seems to be fine.
The last thing before running everything.
We have to add this node in to the set of dirt by file.
It is going to be video recorded and it is going to contain video sievert very by and that's it.
I hope so.
If I open up this thing and perform, called and overwriting.
I want to run my mirrors bought camera mirrors don't lie Start by file to bring everything that I have
the camera, the means and every thing relative to it.
Now I want to run across to run me bought me is bought and what are the available nodes?
I want it to run.
There are extra nodes as well.
Video recorder.
That's what I am interested in.
Let's see if this video recorder works or not.
So you can see the video recorder is actually recording this video.
It is showing the video as well.
If I go in to my.
Yes, the code of video saver.
Yes.
Here you can see every single frame is also displayed on the screen.
As you can see here, the position is not changed the way I changed it.
I have to change it and then save to see the things here as well.
And other than that, everything seems great.
But how to check if this node is actually working or not?
I am going to press control.
See, and there is some code that I have already written with get current working directory.
Well, this execution is happening, right.
The file output.
Octavia, if we can look at here in this package, if I open up this right click open containing folder
miss but I know it is not in the maze board.
Then where it is, it is outside of me is board just not there even.
Oh, where it is.
Let me press open containing folder on it and it is in the bot planning workspace if I run it and let's
see.
Okay.
You can see the video has been written and you can perform image processing on it.
It is the same video that the upper camera is looking at it.
So that was regarding the video.
Say lot.
Let's see what we can do next.