You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/rosbags.md
+39-6Lines changed: 39 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,14 +86,15 @@ data (in hex): 0x00 0x01 0x00 0x00 0x0f 0x00 0x00 0x00 0x68 0x65 0x6c 0x6c 0x6f
86
86
Given the API proposed in the above section, we need a data storage format which allows to sufficiently store and replay this serialized data.
87
87
There are a few requirements for writing to such a data storage format:
88
88
89
-
- Scalability: The chosen format has to scale up to multiple terabytes of file size
90
-
- Parallelism: It must be possible to write to the file from multiple instances at the same time
89
+
- Scalability: The chosen format has to scale up to multiple terabytes of file size.
90
+
- Parallelism: It must be possible to write to the file from multiple instances at the same time.
91
91
- Compression (might be relaxed): Ideally, when the file size becomes larger, it should be possible to compress the file for long time archiving.
92
92
93
93
In terms of reading from the file, there are similar requirements:
94
94
95
-
- Random access: It must be possible to grant random read access to the file and extract specific individual messages
96
-
- Range access: It further should be possible to only replay/read a section of the record, specified by a range of time
95
+
- Random access: It must be possible to grant random read access to the file and extract specific individual messages.
96
+
- Range access: It further should be possible to only replay/read a section of the record, specified by a range of time.
97
+
- Chunk sizes: The chunk sizes must be configurable to fit various large message types.
97
98
98
99
A general requirement is to be backwards compatible with existing ROS1 bags.
99
100
This compatibility can either be via a conversion script, which permanently converts ROS1 bags into ROS2 bags or a bridge API which allows to manually open existing ROS1 bags and publish them into the ROS2 system.
@@ -105,12 +106,44 @@ In the following, we are iterating over a couple of data formats, which may be s
105
106
We hereby iterate over existing third party software as well as examining of maintaining a self-made format.
106
107
107
108
108
-
## HDF5
109
+
###HDF5
109
110
110
111
One very popular framework for storing scientific data is [HDF5](https://support.hdfgroup.org/HDF5/).
111
112
It basically has all the necessary requirements listed above such as random access, parallelism and compression.
112
113
It is further designed for highly complex data with an extensive amount of data.
113
114
HDF5 is open source and its source can be freely obtained from [bitbucket](https://bitbucket.hdfgroup.org/projects/HDFFV/repos/hdf5/browse) and is under a [permissive license](https://bitbucket.hdfgroup.org/projects/HDFFV/repos/hdf5/browse/COPYING) of the HDF group.
114
115
Multiple language wrapper or bindings are available, namely c/c++, python, fortran or java.
115
116
116
-
## Existing ROS1 format
117
+
#### Pros
118
+
- Open Source and standard specification for file format
119
+
- Fullfils the requirements given
120
+
- Multi language support
121
+
- Large community of users
122
+
123
+
#### Cons
124
+
- Depending on a slowly developing standard
125
+
126
+
There is a popular [blog post](http://cyrille.rossant.net/moving-away-hdf5/) by Cyrille Rossant, which gives a short introduction, but also discusses some controversy with HDF5.
127
+
128
+
129
+
### Existing ROS1 format
130
+
131
+
Alternatively, the existing ROS1 format can be continued to be used. The format description can be found [here](http://wiki.ros.org/Bags/Format/2.0).
132
+
133
+
#### Pros
134
+
- Already ROS specific and evaluated for ROS messages, existing code could be reused
135
+
136
+
#### Cons
137
+
- No random access
138
+
139
+
140
+
### SQLite
141
+
142
+
A third alternative which provides capabilities for data logging, and is used as such, is [SQLite](https://www.sqlite.org/about.html)
143
+
Despite other relational database systems, it doesn't require any external SQL Server, but is self-contained.
144
+
It is also open source, [extensively tested](https://www.sqlite.org/testing.html) and known to have a large [community](https://www.sqlite.org/support.html).
145
+
The Gazebo team created a nicely composed [comparison](https://osrfoundation.atlassian.net/wiki/spaces/GAZ/pages/99844178/SQLite3+Proposal) between SQLite and the existing rosbag format.
0 commit comments