Skip to content

Commit 1316efa

Browse files
committed
sqlite
1 parent e8e98b2 commit 1316efa

File tree

1 file changed

+39
-6
lines changed

1 file changed

+39
-6
lines changed

articles/rosbags.md

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,15 @@ data (in hex): 0x00 0x01 0x00 0x00 0x0f 0x00 0x00 0x00 0x68 0x65 0x6c 0x6c 0x6f
8686
Given the API proposed in the above section, we need a data storage format which allows to sufficiently store and replay this serialized data.
8787
There are a few requirements for writing to such a data storage format:
8888

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.
9191
- Compression (might be relaxed): Ideally, when the file size becomes larger, it should be possible to compress the file for long time archiving.
9292

9393
In terms of reading from the file, there are similar requirements:
9494

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.
9798

9899
A general requirement is to be backwards compatible with existing ROS1 bags.
99100
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
105106
We hereby iterate over existing third party software as well as examining of maintaining a self-made format.
106107

107108

108-
## HDF5
109+
### HDF5
109110

110111
One very popular framework for storing scientific data is [HDF5](https://support.hdfgroup.org/HDF5/).
111112
It basically has all the necessary requirements listed above such as random access, parallelism and compression.
112113
It is further designed for highly complex data with an extensive amount of data.
113114
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.
114115
Multiple language wrapper or bindings are available, namely c/c++, python, fortran or java.
115116

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.
146+
147+
#### Pros
148+
149+
#### Cons

0 commit comments

Comments
 (0)