[ros-users] CSV with time from bag files

Jeremy Leibs leibs at willowgarage.com
Wed Jun 9 14:31:23 UTC 2010


Agreed.  I was also surprised to find it didn't print bag time.  I
created ticket: https://code.ros.org/trac/ros/ticket/2780 to track
this issue.

On Wed, Jun 9, 2010 at 2:14 AM, Miguel Prada <miguel.register at gmail.com> wrote:
> Hi Jeremy,
>
> Thanks for the tip. That's exactly what I've been doing after writing to the list and it works great.
>
> However, shouldn't rostopic output the bagfile's timestamps when echoing from a bagfile? I find it much more reasonable than having to programatically read the data using python to achieve this result. Am I missing some important reason for rostopic echo to behave this way?
>
> Miguel.
>
> El 09/06/2010, a las 10:33, Jeremy Leibs escribió:
>
>> Assuming you are still using boxturtle, rosrecord has a rosrecord.py
>> programmatic API
>>
>> Take a look at:
>>
>> http://www.ros.org/wiki/rosrecord#rosrecord.py
>>
>> It should be fairly straight forward to write a small program which
>> opens the bag and prints exactly what you want.
>>
>> On Wed, Jun 9, 2010 at 1:29 AM, Miguel Prada <miguel.register at gmail.com> wrote:
>>> Hi,
>>>
>>> I want to manipulate some data from a bag file with a spreadsheet. I'm exporting from the bag to CSV using 'rostopic echo -p -b BAGFILE TOPIC >> file.csv' but I just realised that the time field you get from doing that is the time corresponding to when rostopic is run, not the time stored in the bag file. That means that if I use this method to output messages in one topic and then repeat for another topic (e.g. controller commands and robot positions) the time fields on both CSV files are of no use at all to merge the data in those two files.
>>>
>>> I tried using 'rostopic echo -p -b BAGFILE -a >> file.csv' to print all topics at once, but the output is quite messed up and doesn't clearly state which data corresponds to which topic.
>>>
>>> Does anyone have any suggestion on how should I proceed with this?
>>>
>>> Miguel.
>>>
>>> _______________________________________________
>>> ros-users mailing list
>>> ros-users at code.ros.org
>>> https://code.ros.org/mailman/listinfo/ros-users
>>>
>> _______________________________________________
>> ros-users mailing list
>> ros-users at code.ros.org
>> https://code.ros.org/mailman/listinfo/ros-users
>
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>



More information about the ros-users mailing list