<!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 Ken,<br>
<br>
Thank you very much! Commenting out these lines completely solved my
problem.<br>
<br>
Best,<br>
Gregory<br>
<br>
<br>
Ken Conley wrote:
<blockquote
 cite="mid:AANLkTinaBj9=GT8x090B+npd9eaS0V=zg=+rma2ASDyb@mail.gmail.com"
 type="cite">
  <pre wrap="">This goes way back in my memory, but I believe the behavior you
describe is the behavior that was requested, i.e. a stamped message
overrides the time the message was recorded in the bag file. In fact,
I have a hard-to-fix bug ticket filed by a user that describes a
situation where the stamped value isn't used. This behavior is because
usually, when plotting, the stamped value inherent with the data is
preferred to the recorded time, which is offset by variable latency of
network transmission.

You can always change this behavior in your own tree by removing these
lines from rostopic.py:

        if getattr(val, "_has_header", False):
            return "%s,%s"%(val.header.stamp.to_nsec()-time_offset, s)

Another option is to use rosbag.py to write your own bag->CSV
converter fairly trivially.

HTH,
Ken



On Thu, Aug 19, 2010 at 7:05 AM, Gregory <a class="moz-txt-link-rfc2396E" href="mailto:hitzgreg@gmail.com"><hitzgreg@gmail.com></a> wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Hi,

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

Ok, so I tried to use:

    rostopic echo -p -b bagfile.bag /topic1 > topic1.txt
    rostopic echo -p -b bagfile.bag /topci2 > topic2.txt

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?

When I play the bag file all the messages are published and there's no
offset.

Is this a bug in rostopic.py? Or have I completely misunderstood something?

I use cturtle. OS is Ubuntu 9.10. rostopic.py is at revision 10000.


Thanks in advance!

Gregory



_______________________________________________
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>
  <pre wrap=""><!---->_______________________________________________
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>