Play ordered multiple bags from a launch file
Hi, I have a question that might be a bit silly, but i do not really find a answer that satisfy me. I have recorded a sequence of 15 minutes splitted in 1 minute rosbag. I want to reproduce them 1 by 1. Can I do that from a roslaunch just by indicating the path to the folder?
I intened to automatize the process, so the idea is not to have to write by hand the paths to the rosbags, because they will be different every time, just to have to indicate the folder as a paramenter or something like that. Can I do that from a launch file or from a c++ file?
I think that by doing:
rosbag play *.bag
The rosbags should be played according to their timestamps. However I do not know if that is the best way of doing it because the rosbags will be very large (more tan 15GB) and I have tried that but it takes a looooot of time to load all the rosbags files, that is why I ask if there is any other option.
Thanks a lot
UPDATED:
I intend to use at first the rosbag play *.bag
and later try to implement a new methow using the rosbag API.
However when I try to use it from a roslaunch I obtain this error.
[ INFO] [1475569615.047917389]: Opening /home/kailegh/Descargas/Custom/20Jul16/*.bag
[FATAL] [1475569615.048150633]: Error opening file: /home/kailegh/Descargas/Custom/20Jul16/*.bag
The roslaunch I use looks like this:
<arg name="path" default="/home/lsi2/Descargas/Custom/20Jul16/" />
<node pkg="rosbag" type="play" name="player" output="screen" args="--clock $(arg path)*.bag">
</node>
Could you tell me how to use the * in a launch file? Because I think the problem is something related to that, because using the complete name of the bag the launch works well.
Since the topic of the question has changed quite a little I have post the *.bag problem in a new one: http://answers.ros.org/question/24496...
I think I am going to post a new question since the updated part has little to do with the topic of the question