Thanks for the code contribution and the ticket, Bill.<br><br>Allowing rosbag record & play to be controlled through a ROS API is a feature we will definitely be including in Diamondback.<br><br>Tim<br><br><div class="gmail_quote">

On Tue, Jul 27, 2010 at 11:39 AM, Bill Morris <span dir="ltr"><<a href="mailto:morris@ee.ccny.cuny.edu">morris@ee.ccny.cuny.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

I put together a patch for 'rosbag record' that provides a client/server<br>
interface. The patch was created using svn diff.<br>
<br>
The current status of rosbag record can be obtained by calling the<br>
get_status service which provides the name of the current bag file being<br>
recorded, the recording status and a list of the topics being recorded.<br>
$ rosservice call /record_1280253194863995182/get_status<br>
target_filename: foo_2010-07-27-13-53-14.bag<br>
write_filename: foo_2010-07-27-13-53-14.bag.active<br>
writing_enabled: True<br>
topics: ['/chatter', '/rosout', '/rosout_agg']<br>
<br>
Calling set_status to set writing_enabled to False provides a means of<br>
pausing the recording of data to the current bag file.<br>
$ rosservice call /record_1280253194863995182/set_status False<br>
success: True<br>
<br>
Here the updated status is shown in a another call to get_status<br>
$ rosservice call /record_1280253194863995182/get_status<br>
target_filename: foo_2010-07-27-13-53-14.bag<br>
write_filename: foo_2010-07-27-13-53-14.bag.active<br>
writing_enabled: False<br>
topics: ['/chatter', '/rosout', '/rosout_agg']<br>
<br>
Setting writing_enabled to true will resume logging.<br>
$ rosservice call /record_1280253194863995182/set_status True<br>
success: True<br>
<br>
The output of rosbag record will look something like this<br>
$ rosbag record -a -o foo<br>
[ INFO] [1280253741.079472070]: Recording to<br>
foo_2010-07-27-14-02-21.bag.<br>
[ INFO] [1280253742.087486427]: Subscribing to /chatter<br>
[ INFO] [1280253742.093223888]: Subscribing to /rosout<br>
[ INFO] [1280253742.098384181]: Subscribing to /rosout_agg<br>
[ INFO] [1280253772.239637479]: disabling message logging<br>
[ WARN] [1280253772.240439047]: Not logging message because logging<br>
disabled.  Most likely cause is a full disk.<br>
[ WARN] [1280253777.650501980]: Not logging message because logging<br>
disabled.  Most likely cause is a full disk.<br>
[ INFO] [1280253784.865028834]: enabling message logging<br>
<br>
<br>_______________________________________________<br>
ros-users mailing list<br>
<a href="mailto:ros-users@code.ros.org">ros-users@code.ros.org</a><br>
<a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
<br></blockquote></div><br>