Robotics StackExchange | Archived questions

Is it possible to get 30fps with compressedDepth?

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.

Thanks

Asked by icecreambaby on 2018-04-03 19:59:05 UTC

Comments

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 ..

Asked by gvdhoorn on 2018-04-04 02:13:52 UTC

.. 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.

Asked by gvdhoorn on 2018-04-04 02:14:57 UTC

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.

Asked by icecreambaby on 2018-04-04 18:47:48 UTC

Answers

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" />

Asked by kivrakh on 2019-04-09 04:06:45 UTC

Comments

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

Asked by gvdhoorn on 2019-04-09 04:50:50 UTC

I get the same problem

where this line, please???

<param name="/camera/depth/image_raw/compressedDepth/png_level" type="int" value="4" />

Asked by Redhwan on 2019-05-18 22:32:41 UTC

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 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.

Asked by kivrakh on 2019-05-19 05:40:35 UTC

those my launch files for two cameras

https://answers.ros.org/question/316305/how-to-run-kinect-and-asus-cameras-simultaneously/

which line that I should modify it,

please help me

I am new for those

thank in advance

Asked by Redhwan on 2019-05-19 21:34:03 UTC