Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

If you play back the bag, you can use:

rostopic echo -p /topic_name

to display the data in a MatLab-friendly format. You can output this to a text file with:

rostopic echo -p /topic_name > data.txt

Or, you can even convert a topic directly to CSV with:

rostopic echo -b file.bag -p /topic

NOTE: This will only work with simple message types. LaserScans, PointClouds, arrays, etc won't work very well because the entire message is rendered to text.

The other option would be to use the rosbag API, located here to load the data into a C++ program and manipulate it that way.