Deserializing topics from a ROS2 Bag,got warning "no plugin"

asked 2022-12-21 20:44:16 -0500

hsirzon gravatar image

updated 2022-12-24 17:31:06 -0500

ljaniec gravatar image

I want to read data from a ros2 bag using C++ API.

I have read similar questions and some pages on Github,they all refering this example: https://github.com/orascheg/ROS2BagFi...

Following the example, here is my code:

rosbag2_cpp::SerializationFormatConverterFactory factory;
std::unique_ptr<rosbag2_cpp::converter_interfaces::SerializationFormatDeserializer> cdr_deserializer = factory.load_deserializer("cdr");

After calling factory.load_deserializer("cdr"), it will print No plugin found providing serialization format 'cdr'. Falling back to checking RMW implementations.

I believe that's the reason why I can't get deserialized data after calling cdr_deserializer's deserialize method since my message is serialized as a cdr format.

I also compiled the example code and got the same warning output.

How to solve the problem?

Thank you!

I'm using ROS 2 Rolling Ridley.I have installed ros-rolling-fastcdr via apt. My Platform: Ubuntu 20.04.5 LTS(5.15.0-56-generic) on x86 virtual machine.

edit retag flag offensive close merge delete