Closed MatthieuMuschinowski closed 2 years ago
Hi there!
First of all, this is great, thanks for your work!
Second, I think you could change line 131 of rosbag_to_csv.py:
bag_to_csv(options,files[0])
to something like this:
for i in range(0, len(files)): bag_to_csv(options,files[i])
Since your GUI allows for selection of multiple bags at once, this allows to convert all of them instead of just the first one if multiple are selected, and it doesn't change anything if only one is selected.
It works with these two lines on my config as long as the topics selected are in all the bags (if they're not in a bag, this bag is ignored without warning), but maybe there's a more elegant way of doing this, I don't know... :)
This change is really cool.But there is a little bug.
for i in range(0, len(files)-1):
This way there will be no error message.
PR is welcome.
Hi there! First of all, this is great, thanks for your work! Second, I think you could change line 131 of rosbag_to_csv.py:
bag_to_csv(options,files[0])
to something like this:
for i in range(0, len(files)): bag_to_csv(options,files[i])
Since your GUI allows for selection of multiple bags at once, this allows to convert all of them instead of just the first one if multiple are selected, and it doesn't change anything if only one is selected. It works with these two lines on my config as long as the topics selected are in all the bags (if they're not in a bag, this bag is ignored without warning), but maybe there's a more elegant way of doing this, I don't know... :)
This change is really cool.But there is a little bug.
for i in range(0, len(files)-1):
This way there will be no error message.
If files = ['a.bag', 'b.bag'], then len(file) -1
equals 1. for i in range(0, len(files)-1):
means i equals only 0. 'b.bag' cannot be read.
It should still be for i in range(0, len(files)):
, right?
PR is welcome.
Hi there!
First of all, this is great, thanks for your work!
Second, I think you could change line 131 of rosbag_to_csv.py:
to something like this:
Since your GUI allows for selection of multiple bags at once, this allows to convert all of them instead of just the first one if multiple are selected, and it doesn't change anything if only one is selected.
It works with these two lines on my config as long as the topics selected are in all the bags (if they're not in a bag, this bag is ignored without warning), but maybe there's a more elegant way of doing this, I don't know... :)