ros-tooling/rosbag2_storage_mcap

ros2 bag convert cannot read the input file if the input MCAP is not indexed

james-rms opened this issue · 1 comments

Description

When attempting to use ros2 bag convert with an un-indexed MCAP as the source file, some log messages are printed:

[WARN] [1666590451.821784700] [rosbag2_storage_mcap]: no message indices found, falling back to reading in file order
[ERROR] [1666590451.838618391] [rosbag2_storage_mcap]: cannot read MCAP in time order with no message indexes

ros2 bag convert should not care about read order - it should write them back out in whatever order they arrive. It's possible there should be a "any" ReadOrder option, indicating that the reader leaves the order up to the plugin to determine.

Expected Behavior

ros2 bag convert would succeed in reading the input MCAP.

Actual Behavior

** clear and concise description of what actually happened. include copied logs whenever possible **

To Reproduce

Take any source bag, and run:

$ cat << EOF > cfg.yaml
output_configs:
  - storage_id: mcap
     uri: bad
     all: true
     storage_config_uri: mcap.yaml
EOF
$ echo "noChunking: true" > mcap.yaml
$  mcap convert -i <your bag path> -o cfg.yaml

System (please complete the following information)

  • OS: Ubuntu Jammy
  • ROS 2 Distro: rolling
    ** For ROS 2 bugs - please attach a VCS.repos or Dockerfile if possible to help us reproduce the environment **

Additional context

** Add any other context about the problem here **