View my account

Bag file stream types

Comments

5 comments

  • MartyG

    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:

    https://github.com/IntelRealSense/librealsense/blob/master/wrappers/python/examples/read_bag_example.py 

    0
    Comment actions Permalink
  • V Srikrishnan

    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

    0
    Comment actions Permalink
  • MartyG

    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 

     

    0
    Comment actions Permalink
  • V Srikrishnan

    Hi Marty,

    indeed that's me :-)

    sorry, i just forgot about the rosbag-inspector

     

    Thanks!!

    Krishnan

    0
    Comment actions Permalink
  • MartyG

    You are very welcome.  Good luck!

    0
    Comment actions Permalink

Please sign in to leave a comment.