ros2 / rosbag2_bag_v2

rosbag2 plugin for replaying ros1 version2 bag files
Apache License 2.0
24 stars 4 forks source link

ros2 bag play error: 'cdr' does not exist #9

Closed copaah closed 4 years ago

copaah commented 4 years ago

Trying to playback a bag file recorded with ROS 1. Following the readme in this repo and sourcing in the appropriate order in a new terminal:

source /opt/ros/melodic/setup.bash
source /opt/ros/dashing/setup.bash

Running

ros2 bag info -s rosbag_v2 path/to/bag

Files:             my_bag
Bag size:          1.0 GiB
Storage id:        rosbag_v2
Duration:          25.636s
Start:             Oct 25 2018 11:13:23.864 (1540458803.864)
End                Oct 25 2018 11:13:49.500 (1540458829.500)
Messages:          2053
Topic information: Topic: /left_camera/camera_info | Type: sensor_msgs/msg/CameraInfo | Count: 513 | Serialization Format: rosbag_v2
                   Topic: /right_camera/camera_info | Type: sensor_msgs/msg/CameraInfo | Count: 514 | Serialization Format: rosbag_v2
                   Topic: /left_camera/image_raw_align | Type: sensor_msgs/msg/Image | Count: 513 | Serialization Format: rosbag_v2
                   Topic: /right_camera/image_raw_align | Type: sensor_msgs/msg/Image | Count: 513 | Serialization Format: rosbag_v2

Which seems to be working fine. However, if I try to play the bag

ros2 bag play -s rosbag_v2 path/to/bag

I get the following error:

[ERROR] [rosbag2]: Requested converter for format 'cdr' does not exist
[ERROR] [rosbag2_transport]: Failed to play: Could not find converter for format cdr
Karsten1987 commented 4 years ago

I am not able to reproduce this locally on my computer. But just for me to make sure I understand your commands correctly:

path/to/bag points to an actual .bag file or to a top-level folder which contains the bag file?

Also, can you make sure that you have all rosbag2 plugins installed? Namely this one: ros-dashing-rosbag2-converter-default-plugins

copaah commented 4 years ago

Installing that plugin solved it! I only had the following one installed:

sudo apt install -y ros-dashing-rosbag2-bag-v2-plugins