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

how do I improve the steam video speed in ROS

asked 2015-03-05 05:02:13 -0600

mree gravatar image

Hello, thank you for spending your time try to help my problem.

Now I have two computers and would like to show the steam video on both computers through wifi connection.

the package Im using is usb_cam,

by using the same master host from one computer ( ROS_MASTER_URI=http://xxx:11311)

It could shows the video but in very low fps and unstable if the resolution is higher than 480p

To sustain fps around 20, the maximum is 240p.

But the wifi connection shows is around 200-300 mbps.

What should i do to improve this?

Best, mree

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-03-05 10:29:24 -0600

IvanV gravatar image

200-300 Mbps wireless connection seems pretty optimistic to me (too close to the theoretical maximum of 802.11n). Even more with several computers in the same wireless.

Anyway, you should check if you are using some compression for image transport. If you are using raw images, the bandwidth needed is huge.

edit flag offensive delete link more


Thank you very much, its much more smooth by setting it to compressed.

Sorry for asking some stupid questions.

rosrun image_view image_view image:=/usb_cam/image_raw _image_transport:=compressed

mree gravatar image mree  ( 2015-03-11 06:07:19 -0600 )edit

Could I know how to modify the usb_cam package to get the compressed image? It's need to modify the .cpp file (add some command about image_transport into usb_cam_node )?Otherwise,command "rosrun image_view image_view image:=/usb_cam/image_raw _image_transport:=compressed" showed no data

Joy.Lin gravatar image Joy.Lin  ( 2016-05-30 09:01:31 -0600 )edit

It should work out of the box, as image_transport is a separate library. Are you sure you are using the correct topic for image? The default name is image, not image_raw. Are you able to see the raw image?

IvanV gravatar image IvanV  ( 2016-05-30 09:57:34 -0600 )edit

Thank for your reply. I think usb_cam_node.cpp "advertiseCamera("image_raw" ,1)" ,so it publishes the topic named "image_raw". I can't image_view "/usb_cam/image"

Joy.Lin gravatar image Joy.Lin  ( 2016-05-30 10:26:36 -0600 )edit

rosrun image_view image_view image:=/usb_cam/image_raw _image_transport:=theora

I can see the image with this command. Thank you ,IvanV

Joy.Lin gravatar image Joy.Lin  ( 2016-05-30 11:04:45 -0600 )edit

You are right. usb_cam wiki page seems to be wrong, as it states "image" as default topic. However, "it should" work with your first command, as the compressed plugin comes by default in most systems (e.g. Ubuntu). Anyway, if you are streaming video theora should perform betters.

IvanV gravatar image IvanV  ( 2016-05-31 01:50:12 -0600 )edit

Question Tools

1 follower


Asked: 2015-03-05 05:02:13 -0600

Seen: 745 times

Last updated: Mar 05 '15