Ask Your Question
0

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

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

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

Comments

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

sloretz gravatar image sloretz  ( 2019-07-31 15:02:35 -0500 )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 -0500 )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 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

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

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

Stats

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

Seen: 85 times

Last updated: Aug 01 '19