Class Rosbag2Dataset

Nested Relationships

Nested Types

Inheritance Relationships

Base Types

  • public mola::RawDataSourceBase

  • public mola::OfflineDatasetSource

  • public mola::Dataset_UI

Class Documentation

class Rosbag2Dataset : public mola::RawDataSourceBase, public mola::OfflineDatasetSource, public mola::Dataset_UI

RawDataSource for datasets in rosbag2 format.

It reads a rosbag2 file, and exposes it as a dataset with N entries, N being the number of messages in the bag. Reading them via the offline API (OfflineDatasetSource) returns empty shared_ptr observations for those messages that do not have a direct mapping to mrpt::obs classes. The dataset can be also played in an online (real-time, or with a custom time wrapping) fashion via the RawDataSourceBase API.

See example configuration files to see how to define what topics to publish, and how to optionally override the sensor poses in the local robot frame.

Public Functions

Rosbag2Dataset()
~Rosbag2Dataset() override = default
virtual void spinOnce() override
virtual size_t datasetSize() const override
virtual mrpt::obs::CSensoryFrame::Ptr datasetGetObservations(size_t timestep) const override
inline virtual size_t datasetUI_size() const override
inline virtual size_t datasetUI_lastQueriedTimestep() const override
inline double datasetUI_playback_speed() const override
inline void datasetUI_playback_speed(double speed) override
inline bool datasetUI_paused() const override
inline void datasetUI_paused(bool paused) override
inline virtual void datasetUI_teleport(size_t timestep) override

Protected Functions

virtual void initialize_rds(const Yaml &cfg) override