[ros-users] CSV with time from bag files
Cedric Pradalier
cedric.pradalier at mavt.ethz.ch
Wed Jun 9 15:52:27 UTC 2010
On 06/09/2010 05:07 PM, cuenta altas wrote:
> Hi Cedric,
>
> I don't know if what you say applies here. If I understood you well
> when you mention 'testing software', that would be achieved using
> 'rosbag play'. If you are using 'rostopic echo' you'll just get a
> bunch of data printed on screen (or to a text file).
>
> Miguel.
Yes, I think you're right. I had read the email a bit too quickly.
I actually did not realise you could use rostopic to directly output a bag.
Good to know...
>
> 2010/6/9 Cedric Pradalier <cedric.pradalier at mavt.ethz.ch
> <mailto:cedric.pradalier at mavt.ethz.ch>>
>
> On 06/09/2010 04:31 PM, Jeremy Leibs wrote:
> > 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.
> >
>
> I actually implemented a playback functionality for another middleware
> some time ago, and I had put that as an option.
> In some context, one would want to have the time at which the data was
> recorded (for plotting for instance).
> On the other hand, if you test some software, then it's better to put
> the writing time, to have a feeling of real-time.
>
> Then I also had an option for time scaling (fast-forward or
> slow-motion). Then again, the choice of old time-stamp, write
> time-stamp
> becomes tricky, especially if you introduce a pause mechanism in the
> playback.
>
> Even without the special features above, I think both type of
> timestamp
> are sometimes useful, and only a command-line option can select
> between
> them.
>
> HTH
>
> > On Wed, Jun 9, 2010 at 2:14 AM, Miguel
> Prada<miguel.register at gmail.com
> <mailto: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
> <mailto: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 <mailto:ros-users at code.ros.org>
> >>>> https://code.ros.org/mailman/listinfo/ros-users
> >>>>
> >>>>
> >>> _______________________________________________
> >>> ros-users mailing list
> >>> ros-users at code.ros.org <mailto:ros-users at code.ros.org>
> >>> https://code.ros.org/mailman/listinfo/ros-users
> >>>
> >> _______________________________________________
> >> ros-users mailing list
> >> ros-users at code.ros.org <mailto:ros-users at code.ros.org>
> >> https://code.ros.org/mailman/listinfo/ros-users
> >>
> >>
> > _______________________________________________
> > ros-users mailing list
> > ros-users at code.ros.org <mailto:ros-users at code.ros.org>
> > https://code.ros.org/mailman/listinfo/ros-users
> >
>
>
> --
> Dr. Cedric Pradalier
> http://www.asl.ethz.ch/people/cedricp
>
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org <mailto: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
>
--
Dr. Cedric Pradalier
http://www.asl.ethz.ch/people/cedricp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20100609/3f3d9c65/attachment-0003.html>
More information about the ros-users
mailing list