ros2 / rosbag2

Apache License 2.0
285 stars 251 forks source link

`ros2 bag convert` ignoring messages with unknown types #1811

Closed MichaelOrlov closed 1 month ago

MichaelOrlov commented 2 months ago

Description

The ros2 bag convert fails to convert bag files with "unknown" message types. Unknown is the type which typesupport is not available during the bag conversion.

Expected Behavior

The ros2 bag convert shall be able to process bag files with "unknown" message types.

Actual Behavior

ros2 bag convert fails with error messages like

ros2 bag convert -i input_bag -o output.yaml 
[INFO] [1726645139.199495110] [rosbag2_storage]: Opened database 'input_bag/input_bag.db3' for READ_ONLY.
[INFO] [1726645139.205163047] [rosbag2_storage]: Opened database 'split_bag/split_bag_0.db3' for READ_WRITE.
[WARN] [1726645139.205174432] [rosbag2_cpp]: Environment variable ROS_DISTRO not set, can't store value in bag metadata.
[WARN] [1726645139.206247285] [ROSBAG2_TRANSPORT]: Topic '/percept_info_rviz' has unknown type 'visualization_msgs/msg/MarkerArray' . Only topics with known type are supported. Reason: 'package 'visualization_msgs' not found, searching: [/home/morlov/ros2_rolling_new/install/rosbag2, /home/morlov/ros2_rolling_new/install/rosbag2_storage_default_plugins, 

To Reproduce

  1. Download the attached "reprod_files.zip" and extract "/input_bag" and "output.yaml".
  2. Make sure that visualization_msgs package from the common_interfaces repo are not build and not sourced before running ros2 bag convert
  3. Run ros2 bag convert -i <path to input_bag> -o output.yaml
  4. Logs print error during conversion and produce only one split_bag_0.db3, which doesn't have any messages in it.

System (please complete the following information)

Additional context