Unable to load .ulg when using Flight Log Analyzer from UAV toolbox

25 visualizaciones (últimos 30 días)
Hello,
I am trying to use the Flight log Analyzer from the UAV toolbox. I have R2021a and the latest UAV Toolbox installed on my laptop running Ubuntu 18.04. Here is the output of "ver"
-----------------------------------------------------------------------------------------------------
MATLAB Version: 9.10.0.1710957 (R2021a) Update 4
MATLAB License Number: 521249
Operating System: Linux 4.15.0-151-generic #157-Ubuntu SMP Fri Jul 9 23:07:57 UTC 2021 x86_64
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
MATLAB Version 9.10 (R2021a)
Robotics System Toolbox Version 3.3 (R2021a)
UAV Toolbox Version 1.1 (R2021a)
When I load the log file in the flight log analyzer, I have the following error, and I am not sure what to do.
However, when load the logfile on the PX4 flight log analyzer, it works fine and I can look at the results. I cannot upload the .ulg here, but it can be downloaded from here https://logs.px4.io/plot_app?log=4bdce979-875c-4741-982e-66f2d246d765 (Top right > Download > Log File). So I do not think the problem is the .ulg file itself, but rather the Flight Log Analyzer tool itself.
Many thanks in advance!
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Warning: Error occurred while executing the listener callback for event ViewChanged defined for class
uav.flightlogapp.internal.view.DataImportView:
Error using array2timetable (line 93)
The VariableNames property must contain one name for each variable in the table.
Error in uav.internal.log.Analyzer/extract (line 291)
tbls{idx} = array2timetable(v(timeFilter,:), 'RowTimes', t(timeFilter), ...
Error in flightLogSignalMapping/extract (line 334)
signals = obj.Analyzer.extract(data, signalNames, ts, te);
Error in uav.flightlogapp.internal.model.DataImportModel/checkAvailabilitySignalBrowserData (line 658)
E = obj.FlightLogPlotter.extract(obj.LogData,sigtable.SignalName(i));
Error in uav.flightlogapp.internal.model.DataImportModel/setLogData (line 206)
success = checkAvailabilitySignalBrowserData(obj);
Error in uav.flightlogapp.internal.model.DataImportModel/readUlogFromFile (line 316)
validLog = obj.setLogData(tempLogData, obj.TypeUlog);
Error in uav.flightlogapp.internal.model.AppModel/newSessionFromUlog (line 113)
if obj.FlightDataStore.readUlogFromFile(logFileName)
Error in uav.flightlogapp.internal.controller.ImportLogController>@(model,view,~)model.newSessionFromUlog(view.LogFileName)
(line 15)
obj.ModelActionMap("UlogFileAvailable") = @(model, view, ~)model.newSessionFromUlog(view.LogFileName);
Error in uav.flightlogapp.internal.controller.Controller/applyViewChangeToModel (line 167)
action(model, view, eventData);
Error in uav.flightlogapp.internal.controller.Controller>@(src,eventData)applyViewChangeToModel(obj,model,src,eventData) (line
62)
@(src, eventData)applyViewChangeToModel(obj, model, src,
eventData));
Error in uav.flightlogapp.internal.view.DataImportView/readUlogFromFile (line 191)
notify(obj,obj.EventName, uav.flightlogapp.internal.event.EventData("UlogFileAvailable"));
Error in uav.flightlogapp.internal.view.Toolstrip>@(~,~)obj.BrowserLogDialog.readUlogFromFile() (line 130)
sub_item1.ItemPushedFcn = @(~,~)obj.BrowserLogDialog.readUlogFromFile();
Error in internal.Callback.execute (line 128)
feval(callback, src, event);
Error in matlab.ui.internal.toolstrip.base.Action/PeerEventCallback (line 832)
internal.Callback.execute(this.PushPerformedFcn, this, eventdata);
Error in matlab.ui.internal.toolstrip.base.ActionInterface>@(event,data)PeerEventCallback(this,event,data) (line 49)
this.PeerEventListener = addlistener(this.Peer, 'peerEvent', @(event, data) PeerEventCallback(this, event, data));
Error in hgfeval (line 62)
feval(fcn{1},varargin{:},fcn{2:end});
Error in javaaddlistener>cbBridge (line 52)
hgfeval(response, java(o), e.JavaEvent)
Error in javaaddlistener>@(o,e)cbBridge(o,e,response) (line 47)
@(o,e) cbBridge(o,e,response));
> In uav.flightlogapp.internal.view/DataImportView/readUlogFromFile (line 191)
In uav.flightlogapp.internal.view.Toolstrip>@(~,~)obj.BrowserLogDialog.readUlogFromFile() (line 130)
In internal/Callback/execute (line 128)
In matlab.ui.internal.toolstrip.base/Action/PeerEventCallback (line 832)
In matlab.ui.internal.toolstrip.base.ActionInterface>@(event,data)PeerEventCallback(this,event,data) (line 49)
In hgfeval (line 62)
In javaaddlistener>cbBridge (line 52)
In javaaddlistener>@(o,e)cbBridge(o,e,response) (line 47)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Respuestas (1)

Jianxin Sun
Jianxin Sun el 5 de Ag. de 2021
Thank you for bringing this issue to our attention. Our development team is closely reviewing this issue and considering solutions. Please check back or set an alert on this post to be made aware of when a fix is available.
  2 comentarios
Venkatesh BalaSubburaman
Venkatesh BalaSubburaman el 1 de Sept. de 2021
Editada: Venkatesh BalaSubburaman el 1 de Sept. de 2021
Hi Anthony,
The issue seems to be comming from the accessing the magnetometer value from the log data.
I have attached a script that will fix the issue to read the log file that you shared.
Run the script in MATLAB and then you should get flsmObj and ulogData in MATLAB workspace. You can change the log file in the script if you need to.
%load the log file in workspace
ulogData = ulogreader("4bdce979-875c-4741-982e-66f2d246d765.ulg");
%create a ulog signal mapping
flsmObj = flightLogSignalMapping("ulog");
%Update the signal mapping for magnetometer
flsmObj.mapSignal("Mag", ...
@(data)getTime(getTable(data, "vehicle_magnetometer")), ...
@(data)getMagValue(getTable(data, "vehicle_magnetometer")));
function v = getMagValue(tbl)
v=[tbl.magnetometer_ga ... %magnetometer_ga
];
end
function tbl = getTable(data, name)
%getTable Extract table from data
indx = strcmp(data.AvailableTopics.TopicNames, name);
tbl = [];
if(any(indx))
temp = data.readTopicMsgs('TopicNames',name);
tbl=temp.TopicMessages{:};
end
end
function t = getTime(tbl)
%getTime Get time column in duration format
t = tbl.timestamp;
t.Format = 's';
end
Once you have the flsmObj and ulogData in workspace, you can import these to flighLogAnalyzer app through "Import -> From workspace".
Select From Workspace
Select flsmobj and ulogData
This should load the log data in the App. Let us know if this works for you.
Thanks
Venkatesh BS

Iniciar sesión para comentar.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by