Skip to content

Autodetect MCAP in rosbag2_cpp open #1158

@doisyg

Description

@doisyg

Description

Ongoing discussion with @clalancette here: ros2/cartographer_ros#67
Should rosbag automatically detects the bag format in the open method here ?

/**
* Opens an existing bagfile and prepare it for reading messages.
* The bagfile must exist.
* This must be called before any other function is used.
*
* \note This will open URI with the default storage options
* * using sqlite3 storage backend
* * using no converter options, storing messages with the incoming serialization format
* \sa rmw_get_serialization_format.
* For specifications, please see \sa open, which let's you specify
* more storage and converter options.
*
* \param storage_uri URI of the storage to open.
**/
void open(const std::string & uri);

And if yes, how ? Doing it based the file extension ?

Related:

  • Same for python api ?
  • Same for ros2 bag play cli ? (instead of passing the -s flag)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions