This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
"""Node to record a rosbag with start/stop/pause control through service calls. | |
Example call: | |
rosrun utilities rosbag_controlled_recording.py _rosbag_command:="rosbag record -o /home/foo/test_bag /bar_topic" _record_from_startup:=false | |
Then start/pause/resume/stop can be controlled through: | |
rosservice call /rosbag_controlled_recording/start | |
rosservice call /rosbag_controlled_recording/pause_resume | |
rosservice call /rosbag_controlled_recording/pause_resume | |
rosservice call /rosbag_controlled_recording/stop |