[ros-users] rostopic echo -p -b --> Time stamp problem

Tim Field tfield at willowgarage.com
Thu Aug 19 19:58:04 UTC 2010


Gregory,

You can export bags to CSV with rxbag.  rxbag will export the recorded time,
not the header time.

1. run rxbag bagfile.bag
2. right-click the timeline and select *View (by Topic)* > *topic1* > *Plot*
3. expand the message tree to display the fields you wish to export
4. double-click each field to export
5. right-click the plot and select *Export to CSV...* > *All *(or *Every Xth
message* if you want to sample)
6. type topic1.txt and click Save
7. repeat steps 2-6 for *topic2*


Let me know if you run into any problems.

Tim

On Thu, Aug 19, 2010 at 7:05 AM, Gregory <hitzgreg at gmail.com> wrote:

>  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
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20100819/d02081ae/attachment-0004.html>


More information about the ros-users mailing list