Ask Your Question

How to check size of a topic on multi device ROS Communication

asked 2018-09-04 15:51:03 -0500

harderthan gravatar image

Hello, experts.

I am trying to ROS communicate with multi device. There is two PC. First one have a camera sensor, it have publish topics by 30 fps. Second one have be connected to another by 1Gb Ethernet. (Exactly, There is a switch-hub for these. it's specs for PCs is enough, 1Gb)

When I subscribe A's image topics, the hz is not 30 hz, 16.8 hz.

$ rostopic bw /my_topic
average: 160.24MB/s
mean: 6.96MB min: 6.96MB max: 6.96MB window: 100

The size of a saved image is 476.3 kB.

How can I DEBUG to solve this issue? How much is size of a ROS topic's header?

edit retag flag offensive close merge delete


The problem is the size of images. So, I implements 10Gb ethernet module on my pc.

harderthan gravatar image harderthan  ( 2019-01-31 08:10:00 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-09-05 03:21:25 -0500

Reamees gravatar image

I am no expert in this, but if I understand you correctly, that you have a topic with bw 160.24 MB/s and are streaming it over a Gb network, then this is expected behavior. 1Gb is theoretically 125MB, but you will never actually get 125MB/s which would still not be enough to give you 30 fps. In my experience I usually get ~95 MB/s from a Gb network. If you want to test your network google "iperf".

You would need to get the bw of the topics you want to use down. You could do encoding/decoding and/or reduce the fps or resolution of the stream.

I am not sure what you mean by:

The size of a saved image is 476.3 kB.

How do you get this image, how is it saved? If I would have to guess, I would say the saved image is not the raw feed of the camera. What is the resolution of the video feed?

Also not sure what you mean by ROS topic's header, if you mean the description of the message type, then it is probably in the order of tens of bytes, so probably not the issue here.

edit flag offensive delete link more


Thank you.

harderthan gravatar image harderthan  ( 2018-09-12 02:29:39 -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-09-04 15:51:03 -0500

Seen: 728 times

Last updated: Sep 05 '18