Message size
Is there a way to get the size of a statically defined message (i mean, without lists)? I have something like this:
# msg1.msg
bool var1
uint8 var2
And I want to get (in Python) the size of the message in bytes, which would be 2 (bytes).
I' ve tried with the sizeof method, but it returns 40 instead of 2.
Thanks
Asked by crpizarr on 2014-05-04 17:57:39 UTC
Comments
I am having a custom message (uint64 and uint16 (roscpp))..the sizeof() these two is 10 (8+2) which seems pretty ok. But when I print the sizeof() the message is shows 12... Does anybody know how to calculate the sizeof messages and/or where these 2 funny byte's come from? Thanks
Asked by mrtwister on 2016-02-20 13:50:20 UTC
mrtwister, I would guess that the 2 extra bytes may be a checksum.
Asked by shoemakerlevy9 on 2016-12-12 14:10:18 UTC