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?
Asked by yossi_ov on 2020-03-17 17:26:44 UTC
Comments
Related: #q321618.
Asked by gvdhoorn on 2020-03-18 03:16:57 UTC
Well it is, and I see that there is an example for C++ but no working example for Python.
Asked by yossi_ov on 2020-03-18 10:54:50 UTC
The article linked by the OP suggests otherwise.
Asked by gvdhoorn on 2020-03-18 11:00:10 UTC
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?
Asked by yossi_ov on 2020-03-18 12:04:47 UTC
The OP of #q321618 writes:
the question is also tagged
ros2
.Asked by gvdhoorn on 2020-03-18 12:11:30 UTC
You are right, thank you.
Asked by yossi_ov on 2020-03-18 12:26:26 UTC
FWIW, we are working on a Python API (https://github.com/ros2/rosbag2/issues/232) and I've recently added methods for (de)serializing ROS messages in Python to rclpy: https://github.com/ros2/rclpy/pull/495
Asked by jacobperron on 2020-03-18 22:18:11 UTC