ros-drivers / openni2_camera

ROS wrapper for openni 2.0
http://wiki.ros.org/openni2_camera
BSD 3-Clause "New" or "Revised" License
56 stars 96 forks source link

Low framerate on rectified and compressed topics #91

Closed christian-rauch closed 5 years ago

christian-rauch commented 5 years ago

I am using an Asus Xtion PRO Live on Ubuntu 18.04 / ROS melodic.

On topics /camera/depth/image and /camera/depth/image_raw I get the full framerate of ~30fps. But on the rectified topics /camera/depth/image_rect and /camera/depth/image_rect_raw and the compressed topics /camera/depth/image/compressedDepth and /camera/depth/image_raw/compressedDepth I only get about 8fps.

Is there some issue with the interprocess communication of the rectification and compression nodelets?

christian-rauch commented 5 years ago

It turns out this is related to the compressedDepth png compression level which is set by default to 9. Setting it to the lowest level (1) gives the full framerate: rosrun dynamic_reconfigure dynparam set /camera/depth/image_rect_raw/compressedDepth png_level 1.

I think I missed that parameter because I thought that compressedDepth is using a custom depth compression using quantisation and maximum depth values, as opposed to compressed which is using standard jpeg or png compression.