Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 3
Message 1 of 7

bag file

Solved! Go to Solution.

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

Please help.

6 Replies
Commander Lvl 2
Message 2 of 7

Re: bag file

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

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

or 

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

?

 

Please follow-up to let us know how you made out. For good karma, mark a reply as the answer if it helped!

Copilot Lvl 3
Message 3 of 7

Re: bag file

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

Highlighted
Commander Lvl 2
Message 4 of 7

Re: bag file

How about this ?

 

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

 

Please follow-up to let us know how you made out. For good karma, mark a reply as the answer if it helped!

Copilot Lvl 3
Message 5 of 7

Re: bag file

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.

Solution
Commander Lvl 2
Message 6 of 7

Re: 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.

 

Please follow-up to let us know how you made out. For good karma, mark a reply as the answer if it helped!

Copilot Lvl 3
Message 7 of 7

Re: bag file

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