I am trying to code a rosbag serializer, and I am trying to generate code from the messages, like https://github.com/ros/genmsg
I noticed there's an inconsitency in how to handle unbounded array lengths.
In some cases, it is assumed the array elements are preceded with the length of the array: CameraInfo
In some others, the length is calculated from other properties of the message: Image, PointCloud2
Then there's cases in which it's not clear if the length needs to be handled based on the length of the whole message itself: CompressedImage.
So, are these cases handled manually? or is there some sort of non obvious rule?
I have noticed that in the definitions of some unbounded arrays, it is stated that the length needs to be computed from other parameters.
↧