Closed vpenades closed 5 years ago
Your question seems to be about the serialized form. That would be more relevant for roscpp_serialization and the serialization overview: http://wiki.ros.org/roscpp/Overview/MessagesSerializationAndAdaptingTypes
If you have more questions please ask them on https://answers.ros.org
I am trying to read some ROS Bag messages (using my own parser), and I am having trouble understanding how arrays are interpreted:
In
CameraInfo
we have:It appears to me that when an array has undefined size, it means the data in the file is preceded by an uint32 length, as it happens with D, and when a fixed size is specified, like K and R, the values are stored directly.
Then,
Image
has auint8[] data;
field, which states in the comment that it doesn't have a preceding length.Does this also apply to the
uint8[] data;
ofCompressedImage
?What is the general rule to handle arrays when length is not defined in the msg? Is there a way to tell which ones need to read the length beforehand and which don't?