Rosbag in Roslaunch, save rosbag to specific directory
Hey I wanted to use robsbag record in a roslaunch file like:
<node pkg="rosbag" type="record" name="record" output="screen"/>
How do I specify that I want to save the bag with a timestamp and to a specific location?
I am running on an embedded hardware and have therefore installed the needed ros packages for perception: ros-indigo-perception and ros-indigo-rosbag. Do I need any other packages?
I can run Rosbags without any issue, but start recording keeps failing. Running the following from the commandline, instead of launch file, achieves what I want:
rosbag record -o ~/../../media/ubuntu/E04E-7229/Rosbag/ -a
But running the command in the roslaunch file:
<node pkg="rosbag" type="record" name="record" output="screen" args="-o ~/../../media/ubuntu/E04E-7229/Rosbag/ -a" launch-prefix="xterm -e"/>
makes it crash with Error opening file! I tried changing the write rights for the launch file, but the error persists
Error writing: Error opening file: ~/Desktop/_2016-10-13-07-27-39.bag.active
The error was apparently now does not exist when writing to the Desktop but only when I write to the SD-Card. Nevertheless the .bag is not created when I use launch file. If I do the same thing in the terminal the file is created and no errors >/