bag file

I want to parse bag file using java and convert it into csv file.

Please help.

Could you be a little more specific?  I.e.

  1. Do you need to convert .bag files to .csv and don’t care how,


  1. You have a specific need to use Java to parse .bag files and write .csv


Yes. I have specific need to use java to parse .bag files and write .csv

How about this ?

Otherwise, most parsers seem to be C/C++, where you’d have to translate.

1 Like

Thanks for replay.

I refered this link but suppose if I have random bag file and i don’t know which type of data present on topic present then how do I parse the bag file.

You’ll have to follow a multi-pass process. As it shows in the readme file for the repository, you can print all the topics in the bagfile. Once you know the topics, you can extend your program to grab the topics of interest.

Or write a picker where you list the available topics, and pick from those topics to view more details.

Only you know what information you want to pull out of the bagfile; if there is no “standard” to help you identify the information you want, then you’re going to have to use your own judgement.

1 Like

Thanks for help. Yes I need to go through topic information.