ethz-asl / fw_px4_plottools

Plotting tools for reading and showing Pixhawk uLog logs in Matlab
32 stars 22 forks source link

Undefined function or variable 'sysvector'. #38

Closed Ryanf55 closed 4 years ago

Ryanf55 commented 5 years ago

Hello,

Thanks for writing this script up. We would like to use it in our research; it's my first time using it.

I cannot determine why the script is failing. I have uploaded my logfile and the error output from the command console. sysvector is not in the workspace when line 102 of ImportPX4LogData is reached.

Matlab Version: R2017a Log Filename: Test1.ulg Test1.ulg.tar.gz

Matlab coded filename: fileName = 'Test1';

INFO: Start importing the log data.
/usr/bin/python3: symbol lookup error: /usr/bin/python3: undefined symbol: XML_SetHashSalt
INFO: Converting the ulog file to csv took 0.006154 s.
INFO: Starting to import the csv data into matlab.
INFO: Importing the csv data to matlab took 0.068625 s.
Undefined function or variable 'sysvector'.

Error in ImportPX4LogData (line 102)
        if numel(fieldnames(sysvector)) == 0

Error in logconv (line 207)
        ImportPX4LogData(fileName, fileLocation, '05_csv_files', ...
acfloria commented 5 years ago

Hi,

I just tested the file and it works for me. I vaguely recall that I had a similar issue on my old laptop where I messed up my python environment causing Matlab to not executing the command to convert the log file into csv files. The result is then that no csv file exists and thus the sysvector variable is not created leading to this error which does not really help you. I will have to catch this error and return a better error message.

One way to see this is that the conversion times are way too short (on my machine the csv conversion takes about 0.63523 s and the import into matlab 3.4955 s.

A quick solution to that problem is if you just execute the ulog2csv conversion manually from the terminal and make sure to copy the csv files into the 05_csv_files folder. Then you can execute the script with loadingMode=1 and it should run. A better but probably harder fix would be to fix your installation of Matlab/python to make sure the command is executed properly. Maybe this solution works for you https://ch.mathworks.com/matlabcentral/answers/454343-matlab-2019a-error-xml_sethashsalt.

Ryanf55 commented 5 years ago

Ok thank you. Manual conversion works; we will investigate the matlab/python integration as it is still on default settings.