-
Notifications
You must be signed in to change notification settings - Fork 1
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
New log file format design #9
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Gazebo Log Format Update | ||
|
||
## Overview | ||
|
||
The Gazebo log format is an SQLite3 database that stores serialized protobuf | ||
messages along with topic names in a time sequence. Importantly, simulation | ||
state information is recorded as serialized Components. This relies on | ||
a unique type id to associate the data to a component type. This type | ||
information is available via c++ typeid, which is not readily | ||
cross-language. For example, a javascript logfile reader would not know how | ||
to associate a typeid with the correct component. | ||
|
||
|
||
State information encoded as components requires a log file reader to | ||
implement or use Gazebo’s ECS. This represents a large barrier to entry. | ||
Ideally, a user could query data from a log file without implementing | ||
a complete ECS. | ||
|
||
## Requirements | ||
|
||
1. Cross-platform and cross-language | ||
1. Logged data | ||
1. The current log file format is dependent on C++ typeid when it stores serialized ECS Component data. Typeid information is not available in other languages, such as javascript. | ||
1. It’s reasonable to assume that a language can use Protobuf messages. | ||
1. Log file format | ||
1. The mechanism used to record data should also be cross platform. | ||
1. Ease of use | ||
1. Queryable | ||
1. Support random access to logged data | ||
1. Low barrier to entry | ||
1. A user of the current log format needs to re-implement the Gazebo ECS. | ||
1. Efficient | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Support being "interrupted" in that the log file won't be corrputed/destroyed in the case that Gazebo is shut down incorrectly or has a segmentation fault. Since user systems run directly in the executable, there is always a chance of segfaults and we should do as much as possible to preserve already written data in case that happens. |
||
1. Forward and backward iterators through the log file should be fast. | ||
1. It should be possible to quickly jump to a specific time in the log | ||
file. | ||
1. Low overhead when writing log files. | ||
1. Self-contained | ||
1. Capture initial simulation state | ||
1. Capture topic names, message types, and message definitions | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not all topics/message definitions may be available when recording starts, we should accommodate this. |
||
1. Capture metadata such as | ||
1. Log format version | ||
1. Gazebo version | ||
1. Date and time of recording | ||
1. Optionally include all assets used by simulation. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Importantly, I think it would be nice to include these assets in a way that is not "echoing them to a topic" the way that it was typically done in ROS 1 bags. |
||
1. This can be opt-out. Opting out indicates that log replay would rely on Fuel assets or locally available assets. | ||
1. Streamable | ||
1. Do not require the entire database to be loaded before it can be read. This is very useful for web applications. | ||
1. Conversion and legacy support | ||
1. Support conversion from the old log file format to the new file | ||
format. | ||
1. Gazebo should continue support for the old log file format. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should note a minimum set of languages to help bound this a little bit.
From what we use in Gazebo, (C++, Ruby, Python, Typescript/Javascript, Go) would cover 99% of our use cases correct?