Ask Your Question

Is it possible to get 30fps with compressedDepth?

asked 2018-04-03 19:59:05 -0500

icecreambaby gravatar image

Hello all,

I am using a kinect sensor on a remote robot and I'd like to know if it is possible to stream depth data from it to a workstation in real time using image_transport and compressedDepth.

rostopic hz /kinect/depth_image on the remote robot yields 30hz framerate as expected.

Of course when i do the same rostopic hz /kinect/depth_image on my workstation i get about 2.5hz due to bandwidth hogging

However when I use rosrun image_transport republish compressedDepth in:=/kinect/depth_image out:=/local//kinect/depth_image the framerate actually goes down to about 1hz on both machines, but I would expect it to stay the same on the robot and result in a higher framerate on the workstation.

Is there something about compressedDepth that makes image transfer slower? It certainly decreases the bandwidth.

For comparison I did the same task with the rgb data and it is 30hz on both machines.


edit retag flag offensive close merge delete



Is there something about compressedDepth that makes image transfer slower?

Just an observation so not an answer, but compression always makes things slower. Some compression algorithms are "lighter" than others wrt the computational resources (ie: cpu, mem) they need, but there will always ..

gvdhoorn gravatar image gvdhoorn  ( 2018-04-04 02:13:52 -0500 )edit

.. be some overhead.

Depending on the computing hardware that your remote robot has, compression could be taxing enough that publishing the data becomes more CPU bound than IO bound, resulting in the further drop in FPS.

gvdhoorn gravatar image gvdhoorn  ( 2018-04-04 02:14:57 -0500 )edit

Thats interesting. Perhaps the compressedDepth algorithm is much slower because it operates on floating point data, because compressing the rgb data didnt seem to lower the framerate at all.

icecreambaby gravatar image icecreambaby  ( 2018-04-04 18:47:48 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-04-09 04:06:45 -0500

kivrakh gravatar image

The problem is related to the compressedDepth png compression level which is set by default to 9. We get 3-4 Hz in the default configuration.

I manage to get 30 fps (full framerate) by setting the png_level parameter to 4 as follows:

<param name="/camera/depth/image_raw/compressedDepth/png_level" type="int" value="4" />
edit flag offensive delete link more



If computational overhead is keeping your FPS down, you could take a look at swri-robotics/imagezero_transport.

gvdhoorn gravatar image gvdhoorn  ( 2019-04-09 04:50:50 -0500 )edit

I get the same problem

where this line, please???

<param name="/camera/depth/image_raw/compressedDepth/png_level" type="int" value="4" />
Redhwan gravatar image Redhwan  ( 2019-05-18 22:32:41 -0500 )edit

You can put it somewhere in your launch file. Note that /camera is name for your device. All published topics are pushed down into the <camera> namespace. If image type is different than png you should also use

<param name="/camera/depth/image_raw/compressedDepth/format" value="png" />

Try png_level to set 1 if you do not get enough fps.

kivrakh gravatar image kivrakh  ( 2019-05-19 05:40:35 -0500 )edit

those my launch files for two cameras

which line that I should modify it,

please help me

I am new for those

thank in advance

Redhwan gravatar image Redhwan  ( 2019-05-19 21:34:03 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2018-04-03 19:59:05 -0500

Seen: 500 times

Last updated: Apr 09 '19