-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSV export of compounds that contain containers (might be) broken #97
Comments
@doudou maybe you have an idea? |
The serialization format and the XML representations differ. What one can do is infer the latter from the former. Moreover, there is no current API that allow you to compute the offset of a field in the serialized data (it is possible, but not there). The authoritative serialization information is the memory layout. You can visualize it from within the Ruby bindings with
which gives for
Containers in the memory layout are represented as a type code and the memory layout of the container element. In the marshalled stream, it translates to the container size (64 bits) and then each marshalled container elements. Anything else is copied as-is. Alignment bytes are kept when marshalled into pocolog. So you have two choice if you want to convert typelib-marshalled data into msgpack:
|
That was fast, thanks! |
Hi,
I am trying to convert pocolog files to some other format (probably something like MessagePack). In order to do that I read how the CSV output is generated in typelib. I might be wrong but I think there is a bug:
I am trying to read a RigidBodyState from memory in typelib's seralization format. A RigidBodyState consists of a timestamp and two strings at the beginning. Strings are containers of 1 byte signed integers. The following lines are extracted from the XML type definition in the logfile:
It seems like offset should be an indicator of where the serialized field is stored in the serialized compound. This is not possible, of course, because strings can have any length, even in the same logfile. That alone would be OK, if the real length of a string would be used to compute where the next field starts in the serialized representation of the RigidBodyState. Hoever, this information is not used, instead, the offset will be used directly:
I don't know how that should work. Do you have any idea? Is there a good way to work around this issue? Is there a way to fix this? I would be happy to contribute.
The text was updated successfully, but these errors were encountered: