[ros-users] rosbag looping and recording of parameters/services

Jack O'Quin jack.oquin at gmail.com
Fri Mar 19 00:33:41 UTC 2010


On Thu, Mar 18, 2010 at 1:18 PM, Jeremy Leibs <leibs at willowgarage.com> wrote:

> These are definitely two of the larger problems with rosbag play at
> the moment and they keep getting pushed on account of being
> non-trivial to solve.
>
> With respect to a), as you mention, the time- and
> state-discontinuities make this reasonably complicated.  Could you
> provide me with some more information on your particular use-case?
> The more I can understand about why it is that people keep requesting
> this feature, the better job of addressing it I can do.  At the
> moment, I believe your best bet is going to be to have rosbag play
> publish the clock for you (using the --clock optioin), and then
> between each iteration of the loop, you are going to need to publish
> an empty message to the "/reset_time" topic.  There is an open ticket
> (https://code.ros.org/trac/ros/ticket/1580) to have rosbag play do
> this time-reset for you.  Unfortunately, a search for "reset_time" on
> the wiki does not provide any detailed information on what the
> ramifications of this time-resetting is going to be on your nodes.  As
> long as your nodes are not too stateful, I think this will do the
> trick though.

I don't know Dejan's use-case, but we frequently want to visualize
short snippets of sensor data repeatedly. Although rviz seems to
handle that correctly, rosbag does not provide an option to repeat the
data. That would be handy, but (as Dan mentioned) respawning rosbag or
calling it in a  shell while loop does work.

Adding looping to "rosbag --clock" would allow it to publish the
/reset_time when needed.

> As for b) there is a plan to figure out the appropriate way of logging
> parameters (ticket: https://code.ros.org/trac/ros/ticket/2425).  This
> will most likely be done by subscribing to a specified parameter list,
> and on appropriate invocation of rosbag play, re-setting these
> parameters over the course of replaying.  In general you don't want to
> play back all of the parameters since any node running on your
> played-back data would end up fighting with the player over setting
> the parameter.  However, until this support is added, your only option
> is to do a "rosparam dump" before you start recording and a "rosparam
> load" before you start playing back.  This will only work if you are
> recording from nodes that do not do any parameter manipulation, but
> that is usually a true statement if you just record from sensors and
> you do not reconfigure them over the course of your recording.

We have not uncovered a need for this yet.
-- 
 joq



More information about the ros-users mailing list