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

[ROS2] Is there a function to obtain message size of a ROS2 message in C++? [closed]

asked 2019-07-29 13:56:38 -0600

ahtsan gravatar image

This could be useful when optimizing system performance.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by ahtsan
close date 2020-07-27 18:09:46.225985


By size, do you mean the size of a message once it it serialized?

sloretz gravatar image sloretz  ( 2019-07-31 15:02:35 -0600 )edit

Yes, if that means the same as the throughput of a publisher if the publisher published that message.

ahtsan gravatar image ahtsan  ( 2019-07-31 15:06:46 -0600 )edit

Just want to confirm: Is it not possible at this stage? Will it be supported later?

ahtsan gravatar image ahtsan  ( 2019-08-01 11:12:10 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-08-01 11:59:44 -0600

Dirk Thomas gravatar image

Currently there is no API to determine the wire size of a message. And it isn't planned to implement that feature.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2019-07-29 13:56:38 -0600

Seen: 291 times

Last updated: Aug 01 '19