OpenSimulationInterface / osi-utilities

Utility library for reading and writing OSI trace files supporting different container formats.
Mozilla Public License 2.0
0 stars 0 forks source link

Project structure and tracefile reader/writer poc #2

Open TimmRuppert opened 3 weeks ago

TimmRuppert commented 3 weeks ago

Description

I left out further documentation/tutorials besides doxygen documentation and multiple example applications. The PR already contains a lot more than "just adding a reader/writer". I recommend that decisions about how to host, design, or set up additional tutorials and documentation be made outside of this PR. This also applies to contribution guide lines etc.

What is missing to get out of Draft

Closes #1

jdsika commented 2 weeks ago

rename "metadata_glossary" to "context". We use a familiar term right away and "we are actually giving context for the definitions"

jdsika commented 1 week ago

I would suggest to only support a .txth writer and not a reader due to the discussion of the format being "lossy"

TimmRuppert commented 1 week ago

I would suggest to only support a .txth writer and not a reader due to the discussion of the format being "lossy"

I already implemented a txth reader which seem to work very reliable by simply assuming the first line in the file will be the separator between messages.

If you'd like, I can certainly remove it again! However, my recommendation is to keep it, as it is designed to be quite robust (as good as possible for a format which is not fully specified) and aligns with the de facto standardization caused by OSI2Read.py, thereby complementing the insufficient OSI specification for txth. But that is just my personal point of view.

Adding a txth writer should be quite easy.

ClemensLinnhoff commented 4 days ago

I generally tested all examples and they all worked with my test files.

jdsika commented 12 hours ago

Just a question that come to mind without research. Did we take into account that other signals like ROS messages etc can be placed alongside the osi traces?

TimmRuppert commented 11 hours ago

Just a question that come to mind without research. Did we take into account that other signals like ROS messages etc can be placed alongside the osi traces?

Yes.

For the reader:

For the writer:

The unittest of the reader creates an mcap with protobuf and json messages for testing.