start and kill rosbag record from bash shell script
Let's say we want to record a rosbag, and run a python script from a bash script.
rosbag record -o /file/name /topic
PID=$!
sleep 2
python ./run_ROS_script.py
kill -INT $PID
so if you leave out -INT it kills the rosbag, but not nicely: it leaves the rosbag in .active status. If you add -INT (same thing as running ctrl+c on the rosbag process) then the rosbag never finishes, and doesn't leave .active status.
So ... what gives? Why can't we nicely kill this rosbag record?