ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

Is it possible to get 30fps with compressedDepth?

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

icecreambaby gravatar image

updated 2021-11-04 20:48:35 -0600

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

Thanks

edit retag flag offensive close merge delete

Comments

2

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 -0600 )edit
2

.. 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 -0600 )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 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

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

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

Comments

1

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 -0600 )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 -0600 )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 -0600 )edit

those my launch files for two cameras

https://answers.ros.org/question/3163...

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 -0600 )edit

Question Tools

2 followers

Stats

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

Seen: 1,010 times

Last updated: Nov 04 '21