<meta http-equiv="content-type" content="text/html; charset=utf-8"><div>Gregory,</div><div><br></div>You can export bags to CSV with rxbag.  rxbag will export the recorded time, not the header time.<div><br></div><blockquote class="webkit-indent-blockquote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 40px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">

<div>1. run <font class="Apple-style-span" face="'courier new', monospace">rxbag bagfile.bag</font></div><div>2. right-click the timeline and select <i>View (by Topic)</i> > <i>topic1</i> > <i>Plot</i></div>

<div>3. expand the message tree to display the fields you wish to export</div><div>4. double-click each field to export</div><div>5. right-click the plot and select <i>Export to CSV...</i> > <i>All </i>(or <i>Every Xth message</i> if you want to sample)</div>

<div>6. type <font class="Apple-style-span" face="'courier new', monospace">topic1.txt</font> and click Save</div><div>7. repeat steps 2-6 for <i>topic2</i></div></blockquote><div><br></div><div>Let me know if you run into any problems.</div>

<div><br></div><div>Tim</div><br><div class="gmail_quote">On Thu, Aug 19, 2010 at 7:05 AM, Gregory <span dir="ltr"><<a href="mailto:hitzgreg@gmail.com">hitzgreg@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">





<div bgcolor="#ffffff" text="#000000">
<small>Hi,<br>
<br>
I have a .bag file that contains different types of messages. When the
file was recorded some of them were
generated by a running node and others were published via 'rosbag play'
from an older bag file, so they have a time stamp from the past (like
two weeks ago).<br>
<br>
Ok, so I tried to use:<br>
    <br>
    rostopic echo -p -b bagfile.bag /topic1 > topic1.txt <br>
</small><small>    rostopic echo -p -b bagfile.bag /topci2 > </small><small>topic2.txt</small><small>
</small><br>
<small><br>
to generate files that I can easily read from a matlab script which I
use to analyze the data. However the 'time' field in the text files is
equal to the 'header.stamp' field for all messages. So when I compare
topic1.txt and topic2.txt there is a two week offset not only between
the 'header.stamp' but also between the 'time' fields. Shouldn't 'time'
tell me when the message was recorded rather than what it's timestamp
is?<br>
<br>
When I play the bag file all the messages are published and there's no
offset. <br>
<br>
Is this a bug in rostopic.py? Or have I completely misunderstood
something?<br>
<br>
I use cturtle. OS is Ubuntu 9.10. rostopic.py is at revision 10000.<br>
<br>
<br>
Thanks in advance!<br>
<br>
Gregory<br>
<br>
</small>
<br>
</div>

<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>