I have made rosbag v2 random access by adding a Summary Header (opcode=0) which contains the filepos of the first opcode6 or 7 header. The Summary Header has constant size, by making all fields mandatory and no data field, just 0 for data Length. This enabled me to jump immediately to the chunk info headers, and connection headers, then to all the rest. Other information includes the total number of records for each opcode, the total number of records, the global start time, the global end time, as well as the global min and max numbers of connections, any chunk (chunk info) will have. The summary header is optional, but its presence can easily be detected because it has a constant size placed at the end of a rosbag file. It may even be in a separate file with additional .summary extension from its original name. The c code is in the picture below. ![Summary%20OpCode0|690x348](upload://rcxnhSDYKg496IZAlDBsS2NegoF.jpg) --- [Visit Topic](https://discourse.ros.org/t/ros-bag-v2-enhancement-for-random-access/5066/1) or reply to this email to respond. If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates. ______________________________________________________________________________ ros-users mailing list ros-users@lists.ros.org http://lists.ros.org/mailman/listinfo/ros-users Unsubscribe: