Robotics StackExchange | Archived questions

Low FPS on a pointcloud (stereo_image_proc)

Hello,

I have a stereo vision system already calibrated where I can check that the frequency of the rectified images are 15hz as well as the disparity image, which looks quite acceptable. When I check the FPS of the pointcloud (rostopic hz /topic) I see that if I have rviz closed it is around 5Hz and when I open it, it drops to less than 1 Hz. Are there any parameters, besides "ChoosingGoodStereoParameters" tutorial to tune to improve this?

Should the pointcloud frequency be equal to the rectified images?

Thanks for the help.

Asked by Ariel on 2016-03-10 10:46:36 UTC

Comments

Can you check the rate at which the point cloud topic is published? Use rostopic hz /point_cloud_topic (replace that with what it is really called). RViz may be suffering from poor 3D performance. It's FPS is not representative of the topic publication rate.

Asked by gvdhoorn on 2016-03-10 11:34:56 UTC

With RVIZ closed is 5Hz and with RVIZ opened it's less than 1 Hz. Shouldn't it be the same frequency as the rectified images or the disparity map? (All of them 15 Hz)

Asked by Ariel on 2016-03-10 13:32:47 UTC

No, not necessarily: rendering a point cloud can be a lot of work. So much that your videocard might not be up to the task. That's why I asked to see what the publication rate is if you don't have RViz started at all, and just use rostopic to measure the rate.

Asked by gvdhoorn on 2016-03-10 15:27:51 UTC

I switched from the integrated gpu (intel) to the dedicated one (NVIDIA) and it went up to ~8Hz with RVIZ closed and ~2 with RVIZ opened. So this would be the best I can get then?

Asked by Ariel on 2016-03-11 03:03:34 UTC

It could be. But have you checked with rostopic hz .. already? There is no point in speculating. Please run the command, then we have at least some idea of where the bottleneck might be.

Asked by gvdhoorn on 2016-03-11 03:59:29 UTC

All values that I've been saying have been checked with rostopic hz

Asked by Ariel on 2016-03-11 04:57:20 UTC

And what are the results when you run everything, except rviz.

Asked by gvdhoorn on 2016-03-11 06:04:54 UTC

Rectified images and disparity 15Hz. Pointcloud ~5Hz

Asked by Ariel on 2016-03-11 06:21:24 UTC

If the images are properly time synchronised, then your results do suggest that this is the best your machine can do. if they aren't synchronised (two separate cameras with different clocks), then stereo_image_proc may be discarding images. You can always also check htop to see cpu usage.

Asked by gvdhoorn on 2016-03-11 06:39:55 UTC

Check also the approximate_sync parameter on the stereo_image_proc wiki page.

Asked by gvdhoorn on 2016-03-11 06:41:36 UTC

Is there a way to "activate" the calculation for the disparity and/or pointcloud to be done in the gpu rather than the cpu?

Asked by Ariel on 2016-03-11 09:31:11 UTC

Could be, but not that I know of.

Asked by gvdhoorn on 2016-03-11 10:42:48 UTC

Answers