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

How to calculate bandwidth requirements for rosserial link?

asked 2014-11-19 08:41:45 -0500

MikeH gravatar image

updated 2014-11-19 09:24:57 -0500

We are beginning to prototype a small robot with differential drive, an IMU, and multiple sensors. For the first iteration we plan to put an Arduino with rosserial on the robot and run ROS on a PC. I want to calculate the bandwidth needed for the expected message traffic to determine if rosserial will work for us or if we need to use a different approach, however I can't find any references to the size of ROS messages once they've been serialized.

Can anyone give me some advice on how to approach calculating this rather than running a simulation and measuring the bandwidth?

Cheers, Mike

edit retag flag offensive close merge delete


Nice question. Would perhaps be a good candidate for a feature request on the rosserial tracker: a tool that could automatically do this.

gvdhoorn gravatar image gvdhoorn  ( 2014-11-19 09:07:58 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-11-19 12:57:44 -0500

ahendrix gravatar image

Serialized messages in ROS are roughly the size that you'd expect them to be; that is, an int64 is 8 bytes, an float32 is 4 bytes, etc. Strings and variable-length arrays are serialized as a 4-byte length followed by the contents (no null terminator). Fixed-size arrays are serialized as a sequence of data, without the length. There is no padding.

I believe the rosserial protocol adds a bit of overhead because it transmits a topic ID along with each message; this should be well-documented in the rosserial protocol docs.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2014-11-19 08:41:45 -0500

Seen: 301 times

Last updated: Nov 19 '14