[ros-users] getting recorded data into a bagfile
leibs at willowgarage.com
Tue Jul 6 17:59:13 UTC 2010
On Tue, Jul 6, 2010 at 9:23 AM, Michael Styer <michael at styer.net> wrote:
> Earlier this year (before I started working with ROS), I did a project
> using a pre-recorded robot navigation dataset (from RAWSEEDS). I'd like
> to try re-implementing the project in ROS, and of course it would be
> great to be able to use the ROS bagfile tools to play back the data. But
> it's not in a bagfile now.
> Has anyone else had to get data that was recorded in a different format
> into the ROS bagfile format? If so, how did you do it? (Even better if
> it was one of the RAWSEEDS datasets...)
I have no familiarity with the RAWSEEDS datasets, but it has been our
goal to make this kind of transformation as painless as possible,
which is why we have provided a programmatic interface for both
reading and writing to bagfiles in cturtle.
The only hard part is going to be writing yourself a parser for your
existing file format that loads the data into the appropriate ROS
messages. Someone else may be able to provide you with some more
advice on that front.
Once you have the data extracted from your current format and loaded
into an appropraite ROS message, dumping it into the bag is trivial.
You can take a look at: http://www.ros.org/wiki/rosbag/cturtle for
some information on writing to bagfiles using the C++ or python APIs.
In C++, you should basically be able to do something like:
for ( ... )
SomeMsg m = readNextFromRAWSEEDS();
bag.write("topic", m.header.stamp, m);
Obviously there might be slightly fancier logic required if you are
reading different message types, but that's still all going to be in
> ros-users mailing list
> ros-users at code.ros.org
More information about the ros-users