[ros-users] rosbag patch for pausing recording and status information

Bill Morris morris at ee.ccny.cuny.edu
Tue Jul 27 18:39:17 UTC 2010


I put together a patch for 'rosbag record' that provides a client/server
interface. The patch was created using svn diff.

The current status of rosbag record can be obtained by calling the
get_status service which provides the name of the current bag file being
recorded, the recording status and a list of the topics being recorded.
$ rosservice call /record_1280253194863995182/get_status
target_filename: foo_2010-07-27-13-53-14.bag
write_filename: foo_2010-07-27-13-53-14.bag.active
writing_enabled: True
topics: ['/chatter', '/rosout', '/rosout_agg']

Calling set_status to set writing_enabled to False provides a means of
pausing the recording of data to the current bag file.
$ rosservice call /record_1280253194863995182/set_status False
success: True

Here the updated status is shown in a another call to get_status
$ rosservice call /record_1280253194863995182/get_status
target_filename: foo_2010-07-27-13-53-14.bag
write_filename: foo_2010-07-27-13-53-14.bag.active
writing_enabled: False
topics: ['/chatter', '/rosout', '/rosout_agg']

Setting writing_enabled to true will resume logging.
$ rosservice call /record_1280253194863995182/set_status True
success: True

The output of rosbag record will look something like this
$ rosbag record -a -o foo
[ INFO] [1280253741.079472070]: Recording to
foo_2010-07-27-14-02-21.bag.
[ INFO] [1280253742.087486427]: Subscribing to /chatter
[ INFO] [1280253742.093223888]: Subscribing to /rosout
[ INFO] [1280253742.098384181]: Subscribing to /rosout_agg
[ INFO] [1280253772.239637479]: disabling message logging
[ WARN] [1280253772.240439047]: Not logging message because logging
disabled.  Most likely cause is a full disk.
[ WARN] [1280253777.650501980]: Not logging message because logging
disabled.  Most likely cause is a full disk.
[ INFO] [1280253784.865028834]: enabling message logging

-------------- next part --------------
A non-text attachment was scrubbed...
Name: rosbag_patch.tar.gz
Type: application/x-compressed-tar
Size: 1748 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/ros-users/attachments/20100727/e0fb445c/attachment-0004.bin>


More information about the ros-users mailing list