Skip to content

ros2 bag info -v fails for individual mcap files #2341

@tonynajjar

Description

@tonynajjar

Description

Running ros2 bag info with --verbose on a standalone MCAP file fails, while the same file works without --verbose.

Verbose mode attempts to reopen per-file storage entries and incorrectly resolves the path as sample.mcap/sample.mcap when the bag input is already a file path.

Expected Behavior

ros2 bag info sample.mcap -v should succeed and print verbose bag information for the same MCAP file that works in non-verbose mode.

Actual Behavior

Verbose mode fails with storage open errors.

Example command:

ros2 bag info sample.mcap -v

Example logs:

[ERROR ...] [rosbag2_storage]: Could not open 'sample.mcap/sample.mcap' with 'mcap'. Error: Not a directory
[ERROR ...] [rosbag2_storage]: Could not load/open plugin with storage id: 'mcap'
[INFO  ...] [rosbag2_storage]: Available storage plugins: 'sqlite3', 'mcap', ...
No plugin detected that could open file sample.mcap/sample.mcap

To Reproduce

  1. Obtain or record a standalone MCAP file named sample.mcap.
  2. Run:
    ros2 bag info sample.mcap
  3. Verify non-verbose command succeeds.
  4. Run:
    ros2 bag info sample.mcap -v
  5. Observe path resolution error with sample.mcap/sample.mcap.

System (please complete the following information)

  • OS: Ubuntu 24.04.2 LTS
  • ROS 2 Distro: Kilted
  • Install Method: source
  • Version: kilted
    I believe the issue is also present on rolling

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions