Hi Pat, There aren't any tools, but it's pretty easy to do with rosrecord: [(t, msg.var1) for topic, msg, t in rosrecord.logplayer('/path/to/some/bagfile.bag') if topic == '/important_topic'] Hope that helps, Tim On Fri, May 14, 2010 at 3:15 PM, Patrick Bouffard < bouffard@eecs.berkeley.edu> wrote: > Are there tools in existence that allow one to easily grab any given > variable out of a bagfile, in Python (ideally) or Matlab (if push > comes to shove)? I'd like to be able to do something like the > following pseudo-python-code: > > from awesome_plotting_package import plot > from super_bagfile_package import BagFile > mybag = BagFile('/path/to/some/bagfile.bag') > (t_important_var1, important_var1) = mybag.get('/important_topic/var1') > plot(t_important_var1, important_var1) > > > ... and this would give me a plot of my important variable vs. time. > This would assume important_var1 is of a numeric type like float64, > and I as the user would probably need to do special processing to > parse other types like arrays, but that would be pretty > straightforward. > > Does something similar to the above exist? If not, I'll try to put > something together and share it. > > Cheers, > Pat > _______________________________________________ > ros-users mailing list > ros-users@code.ros.org > https://code.ros.org/mailman/listinfo/ros-users >