I now have the SVO video data I have taken. My goal is to obtain RGB images from SVO files through ROS and carry out image processing related work. What I want to achieve is similar to reducing the speed of SVO file output image, so that each frame of image in SVO file can get the result of image detection. (the image must be transmitted through the topic of ROS)
I don’t quite understand what you mean.
I changed the mZedParams.svo_real_time_mode = true; to mZedParams.svo_real_time_mode = false;
I changed if (!loop_rate.sleep()) { to if (!loop_rate.sleep(10000)) {
Then, I running: roslaunch zed_wrapper zedm.launch svo_file:=/home//Data/my_data.svo
At this time, I can see from rviz that the obtained left view still outputs the image at a very fast speed. It still seems to work at 60fps/s
I want to get an image similar to 1 second output. The first frame of image is output in the first second. Output the second frame image in SVO file next second. In this way, every frame image in SVO can be workd with image detection method.
You means I should change the following part?
ros::Rate loop_rate(mCamFrameRate); into ros::Rate loop_rate(1);
mZedParams.svo_real_time_mode = true; into mZedParams.svo_real_time_mode = false;
Only this two part? Because when I check the output by rviz, I found the output fps still is 60. It is not changed.
It’s actually very simple. View the output image of topic through rviz. It is found that the output speed does not change after changing FPS. Theoretically, you should see the next frame of image one second after FPS is 1. But the reality is that the output image does not realize one frame per second.
Modifying the ZED Wrapper in order to change the default behaviors is not straightforward.
I think that it’s easier to write a simple node that does what you need leaving behind all the advanced features that you do not need.