Bag file stream types
HI all,
is there a way to know what kind of streams are there in a particular bag file using the SDK? That is, given a bag file, how would one know if it has colour stream or depth stream or IR stream or the combinations?
These bag files have been created by storing data from D400 series(415 or 435) cameras.
if there is any sample python code, that would be wonderful. The python apis are very confusing.
regards
-
The types of stream in a bag file are determined by the streams that were active when the bag was being recorded. For example, if a camera supports depth, IR, color and IMU streams, if depth and IR are the streams that are enabled during recording then color and IMU streams will not be included in the bag file.
As far as I know there is not a way to know in advance which streams are included in a bag. You can check their contents quickly though by drag-and-dropping a bag file created with the RealSense SDK from a folder into the center window of the RealSense Viewer program, which can play them back. So you do not need to use Python to view them.
If you do need to use Python in your project though, the RealSense SDK includes a Python bag viewer sample program called read bag file:
-
Hi MartyG,
thanks for reply. yes, i am aware that bag files will contain data of what we recorded. i also know that we can drag and drop file in viewer and see the stream types. hoever, i am sure that the viewer also uses the same realsesnse sdk codebase and if it can figure out, i was hoping there would be a way; looking through source code of viewer is one way of course.
Thanks
krishnan
-
There was a past case of a RealSense user called Srikrishnan V who was also asking about bag files. Was that you, please? :)
Anyway, in that case a RealSense tool called rosbag-inspector was mentioned that can read the topics and messages of bags.
https://github.com/IntelRealSense/librealsense/tree/master/tools/rosbag-inspector
Please sign in to leave a comment.
Comments
5 comments