Good day. Is there any way to read a single message from a rosbag without iterating as is today possible with a txt file (in ROS1, no ROS2)? The point is to "remember" what in the rosbag file was already read it so is :
- Easier to multiprocess
- avoid loops and faster
Thanks in advance! (Using python3 + rosbag)
Originally posted by camilo.chiang on ROS Answers with karma: 46 on 2021-11-05
Post score: 0
Original comments
Comment by osilva on 2021-11-05:
Take a look at this prior answer: https://answers.ros.org/question/249757/reading-large-rosbag/
Comment by osilva on 2021-11-05:
Also please take a look at this package rosbag_direct_write
https://github.com/osrf/rosbag_direct_write/blob/master/README.md
Comment by osilva on 2021-11-05:
And for Python take a look at bagpy
there is a good article https://rahulbhadani.medium.com/reading-ros-messages-from-a-bagfile-in-python-b006538bb520