ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Index_pos meaning in rosbag

asked 2018-11-16 03:49:48 -0600

Nikolexis gravatar image

updated 2018-11-16 06:14:22 -0600

Hy, Can someone please explain purpose of index_pos field in bag header record. Description of it is: offset of first record after the chunk section. When i use audio_capture packages to record mp3 sound, index_pos is pointing to connection record. Shouldn't it be pointing to Index data record, becouse chunk record consist of message records and connection records? Why 2 Connection redords exist?

Bag header record |

Chunk record |

Connection record |

Msg records |

Index data record |

Connection record <----- index_pos |

Chunk info record |

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-11-20 10:25:07 -0600

William gravatar image

I don't know why the index_pos is pointing there, is it possible that you're mistaken about this? I would expect it to point to the index data records.

The reason the connection records are replicated in the index is so that you don't have to load all the chunks to know which connections were recorded in the bag. They are left in the chunks because they need to be written when in encountered and removing them would require rewriting the bag data (the index doesn't exist until the bag is closed or reindexed after a crash). Also, writing the connection records down when they arrive makes it possible to see connections appearing and disappearing in time.

edit flag offensive delete link more

Comments

might be bug in : https://github.com/ros-drivers/audio_... When i use this bag2wav converter : https://github.com/sbrodeur/ros-audio... and play wav file it seems that i can't choose exact position from where audio willl start to play. This may be the couse of this.

Nikolexis gravatar image Nikolexis  ( 2018-11-22 07:24:20 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-11-16 03:47:54 -0600

Seen: 397 times

Last updated: Nov 20 '18