ros2/rosbag2

Specify bags base directory

tonynajjar opened this issue · 6 comments

Description

Currently in record.py, the arg --output allows to specify the full directory of the bag. It would be nice if we could specify the "base directory" only such that the bag folder is still automatically generated with the timestamp but all bags are contained in a configurable directory other than the current directory where the command is run

i think sounds reasonable, --output-dir or environmental variable would be useful.

@tonynajjar I am sorry. I didn't get your proposal. Could you please clarify/elaborate?

Sure. Currently we can specify the --output which is base directory + bag folder. If we don't specify it then base dir = current dir and bag folder is autogenerated to be unique (with a timestamp).

I'd like to specify only the base dir as an argument, to keep both benefits of specifying a directory for my bags and have unique aurogenerated names. I hope it's clearer

You basically want the autogenerated name of the bag_folder when specifying a base path where it should be?

Make sense to consider changing the current behaviour for the --output flag?
What would be the pros and cons?

I am not a fan of having two very similar options like --output and --output-dir. It will cause a lot of confusion and questions. Why and what is the difference?

Make sense to consider changing the current behaviour for the --output flag? What would be the pros and cons?

The biggest con is probably that it's breaking for current users. Besides, I think it makes sense to want to specify these 2 things separately: where you want to save your bags and what you want the name of your bag to be