<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Tim,<br>
<br>
I didn't know that it is possible to generate csv's using rxbag. So
thanks for the hint. But I have more than just one bag file, which
means that this solution becomes quite inefficient. <br>
<br>
Using Ken's solution I can use a script, which speeds things up a lot.<br>
<br>
Gregory<br>
<br>
<br>
Tim Field wrote:
<blockquote
cite="mid:AANLkTimno5SSfGmY0QyVEhy_Qh-wOkdRRa=6Zc9hbT52@mail.gmail.com"
type="cite">
<meta http-equiv="content-type" content="text/html; ">
<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="border-style: none; margin: 0px 0px 0px 40px; padding: 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 moz-do-not-send="true"
href="mailto:hitzgreg@gmail.com">hitzgreg@gmail.com</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;">
<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 moz-do-not-send="true" href="mailto:ros-users@code.ros.org">ros-users@code.ros.org</a><br>
<a moz-do-not-send="true"
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>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
ros-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:ros-users@code.ros.org">ros-users@code.ros.org</a>
<a class="moz-txt-link-freetext" href="https://code.ros.org/mailman/listinfo/ros-users">https://code.ros.org/mailman/listinfo/ros-users</a>
</pre>
</blockquote>
<br>
</body>
</html>