ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
You are correct; it is reading through the bag file once for each topic.
Take a look at the rosbag API and the rosbag cookbook for some examples of better ways to extract data from bag files.
You may be able to use the same message to CSV conversion that rostopic uses if you're clever about it.