jmscslgroup / bagpy

Python package for reading, and extracting data from rosbag files and performing any analysis on it.
https://jmscslgroup.github.io/bagpy/
Other
207 stars 39 forks source link

Reading bagfiles in a loop #33

Closed hgutze closed 1 year ago

hgutze commented 1 year ago

Hi,

I plan to read a bunch of bagfiles from a folder via bagreader() in a loop. Question No1: Is this possible?

I also want to read a specific topic with message_by_topic from a created .csvfile and process this topic.

I've seen that bagpy already creates an own folder with a special named .csv file. Question No2: How can I create such a folder just once for all my unique .csv files Question No2: How can I name these .csv file with a custom name which changes in the loop sequence .. file1.csv, file2.csv etc.

In short: I want to loop over a bunch of .bag files in a folder. I just want to create one folder for my .csv files There I want to save all the .csv files with self given names.

Any tipps would be appreciated

rahulbhadani commented 1 year ago

It is possible but with too many features, it is cumbersome to use: there are going to be too many if else and args and kwargs but I am keeping it as simple as possible. What you described can be done at the user end.

hgutze commented 1 year ago

Thanks for your reply! I am going to write my own ROS msgs bagfile reader. But thanks anyways.