Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 475

start and kill rosbag record from bash shell script

$
0
0
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?

Viewing all articles
Browse latest Browse all 475

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>