Ask Your Question
0

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

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

ahtsan gravatar image

This could be useful when optimizing system performance.

edit retag flag offensive close merge delete

Comments

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

sloretz gravatar imagesloretz ( 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 imageahtsan ( 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 imageahtsan ( 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

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

Stats

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

Seen: 35 times

Last updated: Aug 01