ROS MATLAB data analysis framework

78 views
Skip to first unread message

Jacob Wagner

unread,
Nov 21, 2014, 1:57:50 PM11/21/14
to ros-sig...@googlegroups.com
Hi,

I am interested in performing analysis of ros data in MATLAB. Currently my group is writing out ros message data to csv files, in python and c++,  and then importing the files into matlab into a custom format that allows us to look at the data for different trial runs and test cases. However, our method is somewhat ad-hoc and requires quite a bit of re-coding to create different plots from the data or perform some statistics on the data. We recently discovered rosbag and the rosbag_matlab toolbox and have been figuring out how to use that to do analysis in MATLAB. 
What I would like to know is if there are any tools that import ros bags into matlab and allow one to easily consolidate the data into different test cases, trial runs, and perform analysis on this data. If something like this doesn't exist, I am planning on implementing something similar. The idea is that this could be used as a research an analysis tool for comparing different algorithm performance. I would like to standardize naming of rosbag files and possible meta data to indicate the specific situation in which the data was collected and what sort of test was being run. Then using this standard the matlab interface would import data meeting criteria that the user selects for the test case and the individual fields that they are interested in viewing. It is also essential that one could perform calculations using the messages and make that available for display just like the raw message data. I know that this isn't very clear yet, but I am in the process of developing an architecture and was wanting to see if what I am doing has already been done to some extent.

Thanks

Remo Pillat

unread,
Nov 25, 2014, 7:59:02 AM11/25/14
to ros-sig...@googlegroups.com
Hi Jacob, 

At the moment, the matlab_rosbag library is your best option for importing rosbag data into MATLAB. I am aware of an additional script that extracts data from a bag file and saves it as a MAT file: starmac_tools.
As you noted, these packages will only give you the raw message data, but do not allow the type of organization or analysis that you are looking for.

Based on your description, I think you are looking for an indexing tool and some way to attach meta-data to rosbags and to retrieve messages by querying that meta-data. That is a terrific idea, but I am not aware of any existing tools to do that. 
If you import the raw message data with one of the libraries above, the Statistics Toolbox might be able to help you with the data analysis.

What sort of data are you trying to analyze? Would each trial run be in a separate rosbag, or would you need to tag specific message ranges in a single rosbag file?

Please keep this group posted if you make any progress in developing your tools.

Thanks,
Remo
Reply all
Reply to author
Forward
0 new messages