Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

ROS ".msg" files to csv Excel

I been looking forROS msg files to csv Excel files. I am trying to use MATLAB or Python to do that. However, it does not work as I want it to be. For example, I have ROS msg files like
I used MATLAB code as

messageName = 'AdjustXY';
% Read the information about the message and store it in a table
tableMessage = readtable([messageName '.msg'], 'FileType', 'text', 'ReadVariableNames', false);
% Prepare the first Excel column with the name of the message
toAppend = repmat({messageName}, size(tableMessage, 1), 1);
tableMessage = [toAppend tableMessage];
% Output the message information into an Excel file
writetable(tableMessage, [messageName '.xlsx'], 'WriteVariableNames', false)

I do have output in excel as (I do not understand why I am not able to update the photo, but here is the link that I have on MATLAB)

Some msg file does work on this code but some does not. If anyone can help me with it will be great. I want the output without that common text in csv. I did research. But all of them are about getting info from rosbag files to csv. That is not what I am talking about. I do need the info from ROS msg files. Please please help me with it no matter use MATLAB or python. Thank you