Hi Pat,<br><br>There aren't any tools, but it's pretty easy to do with rosrecord:<br><br><div style="margin-left: 40px;"><span style="font-family: courier new,monospace;">[(t, msg.var1) for topic, msg, t in rosrecord.logplayer('/path/to/some/bagfile.bag') if topic == '/important_topic']</span><br>

</div><br><br>Hope that helps,<br>Tim<br><br><div class="gmail_quote">On Fri, May 14, 2010 at 3:15 PM, Patrick Bouffard <span dir="ltr"><<a href="mailto:bouffard@eecs.berkeley.edu">bouffard@eecs.berkeley.edu</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Are there tools in existence that allow one to easily grab any given<br>
variable out of a bagfile, in Python (ideally) or Matlab (if push<br>
comes to shove)? I'd like to be able to do something like the<br>
following pseudo-python-code:<br>
<br>
from awesome_plotting_package import plot<br>
from super_bagfile_package import BagFile<br>
mybag = BagFile('/path/to/some/bagfile.bag')<br>
(t_important_var1, important_var1) = mybag.get('/important_topic/var1')<br>
plot(t_important_var1, important_var1)<br>
<br>
<br>
... and this would give me a plot of my important variable vs. time.<br>
This would assume important_var1 is of a numeric type like float64,<br>
and I as the user would probably need to do special processing to<br>
parse other types like arrays, but that would be pretty<br>
straightforward.<br>
<br>
Does something similar to the above exist? If not, I'll try to put<br>
something together and share it.<br>
<br>
Cheers,<br>
Pat<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>
</blockquote></div><br>