ROS2 Bag - DB3 CDR Deserialization
Hello!
Examining the recorded bag I see that the data is stored in SQLite database, and I can see all the recorded messages in the corresponding table.
The problem is that I cannot find a way to decode the messages' data which is stored in binary format (CDR).
Is there a better way to fetch the messages from saved bag? Or is there some documentation / examples on how I can deserialize the data?
Related: #q321618.
Well it is, and I see that there is an example for C++ but no working example for Python.
The article linked by the OP suggests otherwise.
OP (vadbut) referenced ROS1 API, not ROS2
@kyungpyo Put a link to a blog in Korean where he presents an example interfacing a bag using C++.
The short paragraph on Python API demonstrates an example code which fails on clean ros-dashing-desktop : it fails to import required modules (do tell if you succeed).
Reference link in the same paragraph leads to an open issue in rosbag2 github repository, where jacobperron presents a PoC (the aforementioned example), however one of required branches for the example to work is missing, and there are no clear way to make it work.
It seems that the features will be added to next ROS2 release, though?
The OP of #q321618 writes:
the question is also tagged
ros2
.You are right, thank you.
FWIW, we are working on a Python API (https://github.com/ros2/rosbag2/issue...) and I've recently added methods for (de)serializing ROS messages in Python to rclpy: https://github.com/ros2/rclpy/pull/495