Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the possibility to load large ROS bags datasets without filling your RAM completely.
To achieve that the bag is read in its entirety but only the info about a certain chunk of data is retrieved. These infos contain the start and end timestamp of the data contained in that chunk and the position in the file where the chunk can be read. The data can therefore be read on request providing the desired time range. All the data outside that time range can be offloaded from RAM for retrieving it later. This can be done through the DataProvider class which needs to be initialized with the proper function to load the data. In fact that class only provides an interface for any module that needs to retrieve data on request, in order to allow extension of current implementation to formats other than ROS bags.
Being a major change further testing is recommended before merging.