Matulog - Postprocessing for ulog logfiles in Matlab

Matulog is a GUI implemented in Matlab for the analysis of ulog files. It is not finished yet but I hope people still find it useful.
To try it out just clone or download the repo from here. Matlab and pyulog is needed for it to run. It has only been tested on Linux so far so please create an issue or write here if it does not work.

1 Like

Thank you for your code, I think it is really useful. Then I have try, but some unexpected thing occur below, can you help me? Thank you again.

>matulog
Error using cd
Too many input arguments.

Error in openLogFile (line 2)
eval(['cd ’ handles.current_dir_PathName])

Error in run (line 63)
evalin(‘caller’, [script ‘;’]);

Error in matulog>matulog_OpeningFcn (line 73)
run openLogFile.m

Error in gui_mainfcn (line 220)
feval(gui_State.gui_OpeningFcn, gui_hFigure, , guidata(gui_hFigure), varargin{:});

Error in matulog (line 42)
gui_mainfcn(gui_State, varargin{:});

Hi @huangwen!

Cool that you tried it out, I’m sorry that it did not work for you. Could you tell me what operating system you use, and what version of matlab?

@CarlOlsson Now I use the ubuntu 16.04 and matlab 2014b. It can not work. But I use the matlab2016a , It works. Thank you very much. The tool is cool.

cool!! Better than flightplot

Great that you got it working! I updated the requirements to include Matlab R2016a.

Hi, I am having an issues running the code, this could be because the ulog file i am using is faulty (seems likely after it failed to work in flightplot.

This is the set of errors i am getting:

matulog
Traceback (most recent call last):
File “/usr/local/bin/ulog2csv”, line 9, in
load_entry_point(‘pyulog==0+unknown’, ‘console_scripts’, ‘ulog2csv’)()
File “build/bdist.linux-x86_64/egg/pyulog/ulog2csv.py”, line 43, in main
File “build/bdist.linux-x86_64/egg/pyulog/ulog2csv.py”, line 60, in convert_ulog2csv
File “build/bdist.linux-x86_64/egg/pyulog/core.py”, line 108, in init
File “build/bdist.linux-x86_64/egg/pyulog/core.py”, line 428, in _load_file
File “build/bdist.linux-x86_64/egg/pyulog/core.py”, line 450, in _read_file_header
Exception: Invalid file format (Failed to parse header)
ERROR: failed to run ulog2csv, try: pip install pyulog
Output argument “log” (and maybe others) not assigned during call to “ulg2mat”.

Error in openLogFile (line 6)
log = ulg2mat(handles.current_fileName);

Error in run (line 96)
evalin(‘caller’, [script ‘;’]);

Error in matulog>matulog_OpeningFcn (line 73)
run openLogFile.m

Error in gui_mainfcn (line 220)
feval(gui_State.gui_OpeningFcn, gui_hFigure, [], guidata(gui_hFigure), varargin{:});

Error in matulog (line 42)
gui_mainfcn(gui_State, varargin{:});

This is on matlab 2016b and Ubuntu 16.04

Here is a link to the ulog file aswell:
https://drive.google.com/file/d/1ixekzTTIwdclj-nybcqdxJ8YSTAlYpAd/view?usp=sharing

Thanks, in advance. And you will be happy to know regardless you have made it into the bibliography of my dissertation :slight_smile:

Hi Ethan,

Could you please upload a log which you generated using the same code that you used in the flight when you got the faulty log file?

Haha nice and thank you! :slight_smile: Very happy to hear that you found it useful :slight_smile:

@CarlOlsson I Don’t believe I have that log, as I used sdlog2 to get the data. I am trying to get accelerometer and gyroscope data, from dropping the drone from around 2 meters. It also may be worth mentioning that I did not have the GPS module attached. I am going to redo the test but instead do it by arming the drone with motors disconnected, i will update on the results.

I don’t think I got what you mean. The log you uploaded has a broken header, so if you want to process it we need to replace the header in the binary, to do that we just need a log which is generated with the same code, e.g. short bench test or whatever. But if you are going to redo the tests now anyway that is probably preferable. Hope it works out

Got your program to work now, and re-did the test. So much better than flight plot especially for doing the analysis on the Boolean values given from the free fall variable. Thanks a lot :slight_smile:

Great! No problem, very happy to hear that you find it useful :slight_smile:

I have the same error that @huangwen had. I’m using R2017a under windows.

Could you please upload the log file you are trying to process?

Here is the filehttps://drive.google.com/open?id=1QaRbZafXgDuIIUfa_LsXenpgdjGtBWwh

That log file is corrupt (most likely missing parts of the header).

Thank you for taking a look.

hi i had this errors cant figure out why
‘ulog2csv’ is not recognized as an internal or external command,
operable program or batch file.
ERROR: failed to run ulog2csv, try: pip install pyulog
Output argument “log” (and maybe others) not assigned during call to “ulg2mat”.

Error in openLogFile (line 6)
log = ulg2mat(handles.current_fileName);

Error in run (line 96)
evalin(‘caller’, [script ‘;’]);

Error in matulog>matulog_OpeningFcn (line 73)
run openLogFile.m

Error in gui_mainfcn (line 220)
feval(gui_State.gui_OpeningFcn, gui_hFigure, [], guidata(gui_hFigure), varargin{:});

Error in matulog (line 42)
gui_mainfcn(gui_State, varargin{:});

You need to install pyulog

hi’
i new to python, so i just downloaded python and pylog so i had it on my PC. there is any certain place that it should be placing it ? to run with this code? (directory)