Email: helpdesk@telkomuniversity.ac.id

This Portal for internal use only!

  • My Download
  • Checkout
Application Package Repository Telkom University
All Categories

All Categories

  • Visual Paradigm
  • IBM
  • Adobe
  • Google
  • Matlab
  • Microsoft
    • Microsoft Apps
    • Analytics
    • AI + Machine Learning
    • Compute
    • Database
    • Developer Tools
    • Internet Of Things
    • Learning Services
    • Middleware System
    • Networking
    • Operating System
    • Productivity Tools
    • Security
    • VLS
      • Office
      • Windows
  • Opensource
  • Wordpress
    • Plugin WP
    • Themes WP
  • Others

Search

0 Wishlist

Cart

Categories
  • Microsoft
    • Microsoft Apps
    • Office
    • Operating System
    • VLS
    • Developer Tools
    • Productivity Tools
    • Database
    • AI + Machine Learning
    • Middleware System
    • Learning Services
    • Analytics
    • Networking
    • Compute
    • Security
    • Internet Of Things
  • Adobe
  • Matlab
  • Google
  • Visual Paradigm
  • WordPress
    • Plugin WP
    • Themes WP
  • Opensource
  • Others
More Categories Less Categories
  • Get Pack
    • Product Category
    • Simple Product
    • Grouped Product
    • Variable Product
    • External Product
  • My Account
    • Download
    • Cart
    • Checkout
    • Login
  • About Us
    • Contact
    • Forum
    • Frequently Questions
    • Privacy Policy
  • Forum
    • News
      • Category
      • News Tag

iconTicket Service Desk

  • My Download
  • Checkout
Application Package Repository Telkom University
All Categories

All Categories

  • Visual Paradigm
  • IBM
  • Adobe
  • Google
  • Matlab
  • Microsoft
    • Microsoft Apps
    • Analytics
    • AI + Machine Learning
    • Compute
    • Database
    • Developer Tools
    • Internet Of Things
    • Learning Services
    • Middleware System
    • Networking
    • Operating System
    • Productivity Tools
    • Security
    • VLS
      • Office
      • Windows
  • Opensource
  • Wordpress
    • Plugin WP
    • Themes WP
  • Others

Search

0 Wishlist

Cart

Menu
  • Home
    • Download Application Package Repository Telkom University
    • Application Package Repository Telkom University
    • Download Official License Telkom University
    • Download Installer Application Pack
    • Product Category
    • Simple Product
    • Grouped Product
    • Variable Product
    • External Product
  • All Pack
    • Microsoft
      • Operating System
      • Productivity Tools
      • Developer Tools
      • Database
      • AI + Machine Learning
      • Middleware System
      • Networking
      • Compute
      • Security
      • Analytics
      • Internet Of Things
      • Learning Services
    • Microsoft Apps
      • VLS
    • Adobe
    • Matlab
    • WordPress
      • Themes WP
      • Plugin WP
    • Google
    • Opensource
    • Others
  • My account
    • Download
    • Get Pack
    • Cart
    • Checkout
  • News
    • Category
    • News Tag
  • Forum
  • About Us
    • Privacy Policy
    • Frequently Questions
    • Contact
Home/Matlab/Why does my system object get an assertion failure error

Why does my system object get an assertion failure error

PuTI / 2025-02-01
Why does my system object get an assertion failure error
Matlab News

Hello all
I am kinda new in MATLAB/Simulink,and learning the multi-object tracking task based on simulink by Track Closely Spaced Targets Under Ambiguity in Simulink. I want to finish image tracking task. I already have the target detection result based on YOLO. When I was writing based on the HelperDataLogReader class in the example, an assertion failure occurred. But I have looked up a lot of relevant materials but can’t solve it, and I hope someone can help me. Here is my code and the target detection result of YOLO, thank you so much!
classdef (StrictDefaults)HelperDataReader < …
matlabshared.tracking.internal.SimulinkBusUtilities

% This is a helper block for example purposes and may be removed or
% modified in the future.
%
% Copyright 2019 The MathWorks, Inc.

properties(Constant, Access=protected)
pBusPrefix = ‘BusDataLogReader’
end
properties(Access = public, Nontunable)
Data
end

properties(Nontunable)
Frame = fusionCoordinateFrameType.Rectangular
end

properties(Access = private)
%pCurrentIndex
pCurrentIndex = 0

%pMaxIndex Saved the maximum time step index in the data file
pMaxIndex

end

methods
function obj = HelperDataReader(varargin)
% Constructor
setProperties(obj,nargin,varargin{:});
end
end

methods(Access=protected)

function [out, argsToBus] = defaultOutput(obj)
objAtt = struct(‘Score’,double(1));
out = struct(‘Time’,double(1),…
‘Measurement’,double(zeros(1, 4)),…
‘MeasurementNoise’,double(zeros(4)),…
‘SensorIndex’,double(0),…
‘ObjectClassID’,double(0),…
‘ObjectClassParameters’, [],…
‘ObjectAttributes’,objAtt);
argsToBus = {out};
end

% Currently only support simulink environment, so nothing to do
% here
function y = sendToBus(~,x,varargin)
[newx,num] = objDet2Struct(x);
y = struct(‘Detections’,newx,’NumDetections’,num);
end

function [det, time] = stepImpl(obj)
if ~obj.isEndOfData()
obj.pCurrentIndex = obj.pCurrentIndex + 1;
end
newDet = obj.Data.detections{obj.pCurrentIndex};
det = sendToBus(obj,newDet);
time = newDet(1).Time;
end

function setupImpl(obj, varargin)
obj.Data = load(‘PedestrianTrackingYOLODetections.mat’);
obj.pMaxIndex =numel(obj.Data.detections);
end
function loadObjectImpl(obj,s,wasLocked)
% Set properties in object obj to values in structure s

% Set public properties and states
loadObjectImpl@matlab.System(obj,s,wasLocked);
end

function status = isEndOfData(obj)
% Return true if end of data has been reached
status = (obj.pCurrentIndex == obj.pMaxIndex);
end

function s = saveObjectImpl(obj)
% Set properties in structure s to values in object obj

% Set public properties and states
s = saveObjectImpl@matlab.System(obj);
end

% function varargout = getOutputDataTypeImpl(obj)
% varargout{1} = getOutputDataTypeImpl@matlabshared.tracking.internal.SimulinkBusUtilities(obj);
% varargout{2} = "double";
% end

function str = getIconImpl(~)
str = sprintf(‘HelpernDataLognReader’);
end

function varargout = getOutputNamesImpl(~)
varargout{1} = sprintf(‘Detections’);
varargout{2} = sprintf(‘Time’);
end
function varargout = getInputNamesImpl(~)
varargout{1} = sprintf(‘In’);
end
function [out1,out2] = isOutputFixedSizeImpl(~)
out1 = true;
out2 = true;
end
function [out1,out2] = getOutputSizeImpl(~)
out1 = [1 1];
out2 = [1 1];
end

function [out1,out2] = isOutputComplexImpl(~)
out1 = false;
out2 = false;
end
end
methods(Static, Hidden)
function flag = isAllowedInSystemBlock
flag = true;
end

end
methods(Static, Access=protected)
function header = getHeaderImpl
% Define header panel for System block dialog
header = matlab.system.display.Header(…
‘Title’, ‘DataLogReader’, …
‘Text’, getHeaderText());
end
function simMode = getSimulateUsingImpl
% Return only allowed simulation mode in System block dialog
simMode = ‘Interpreted execution’;
end
function flag = showSimulateUsingImpl
% Return false if simulation mode hidden in System block dialog
flag = false;
end
end

end
function str = getHeaderText
str = sprintf(‘The DataLog reader reads a struct file and it outputs the detection and time.’);
end
function [yDet,num] = objDet2Struct(det)
num = numel(det);
for i =1:num
yDet(i) = struct(‘Time’,det(i).Time,…
‘Measurement’,det(i).Measurement,…
‘MeasurementNoise’,det(i).MeasurementNoise,…
‘SensorIndex’,det(i).SensorIndex,…
‘ObjectClassID’,det(i).ObjectClassID,…
‘ObjectClassParameters’, [],…
‘ObjectAttributes’,det(i).ObjectAttributes); %#ok<AGROW>
end
endHello all
I am kinda new in MATLAB/Simulink,and learning the multi-object tracking task based on simulink by Track Closely Spaced Targets Under Ambiguity in Simulink. I want to finish image tracking task. I already have the target detection result based on YOLO. When I was writing based on the HelperDataLogReader class in the example, an assertion failure occurred. But I have looked up a lot of relevant materials but can’t solve it, and I hope someone can help me. Here is my code and the target detection result of YOLO, thank you so much!
classdef (StrictDefaults)HelperDataReader < …
matlabshared.tracking.internal.SimulinkBusUtilities

% This is a helper block for example purposes and may be removed or
% modified in the future.
%
% Copyright 2019 The MathWorks, Inc.

properties(Constant, Access=protected)
pBusPrefix = ‘BusDataLogReader’
end
properties(Access = public, Nontunable)
Data
end

properties(Nontunable)
Frame = fusionCoordinateFrameType.Rectangular
end

properties(Access = private)
%pCurrentIndex
pCurrentIndex = 0

%pMaxIndex Saved the maximum time step index in the data file
pMaxIndex

end

methods
function obj = HelperDataReader(varargin)
% Constructor
setProperties(obj,nargin,varargin{:});
end
end

methods(Access=protected)

function [out, argsToBus] = defaultOutput(obj)
objAtt = struct(‘Score’,double(1));
out = struct(‘Time’,double(1),…
‘Measurement’,double(zeros(1, 4)),…
‘MeasurementNoise’,double(zeros(4)),…
‘SensorIndex’,double(0),…
‘ObjectClassID’,double(0),…
‘ObjectClassParameters’, [],…
‘ObjectAttributes’,objAtt);
argsToBus = {out};
end

% Currently only support simulink environment, so nothing to do
% here
function y = sendToBus(~,x,varargin)
[newx,num] = objDet2Struct(x);
y = struct(‘Detections’,newx,’NumDetections’,num);
end

function [det, time] = stepImpl(obj)
if ~obj.isEndOfData()
obj.pCurrentIndex = obj.pCurrentIndex + 1;
end
newDet = obj.Data.detections{obj.pCurrentIndex};
det = sendToBus(obj,newDet);
time = newDet(1).Time;
end

function setupImpl(obj, varargin)
obj.Data = load(‘PedestrianTrackingYOLODetections.mat’);
obj.pMaxIndex =numel(obj.Data.detections);
end
function loadObjectImpl(obj,s,wasLocked)
% Set properties in object obj to values in structure s

% Set public properties and states
loadObjectImpl@matlab.System(obj,s,wasLocked);
end

function status = isEndOfData(obj)
% Return true if end of data has been reached
status = (obj.pCurrentIndex == obj.pMaxIndex);
end

function s = saveObjectImpl(obj)
% Set properties in structure s to values in object obj

% Set public properties and states
s = saveObjectImpl@matlab.System(obj);
end

% function varargout = getOutputDataTypeImpl(obj)
% varargout{1} = getOutputDataTypeImpl@matlabshared.tracking.internal.SimulinkBusUtilities(obj);
% varargout{2} = "double";
% end

function str = getIconImpl(~)
str = sprintf(‘HelpernDataLognReader’);
end

function varargout = getOutputNamesImpl(~)
varargout{1} = sprintf(‘Detections’);
varargout{2} = sprintf(‘Time’);
end
function varargout = getInputNamesImpl(~)
varargout{1} = sprintf(‘In’);
end
function [out1,out2] = isOutputFixedSizeImpl(~)
out1 = true;
out2 = true;
end
function [out1,out2] = getOutputSizeImpl(~)
out1 = [1 1];
out2 = [1 1];
end

function [out1,out2] = isOutputComplexImpl(~)
out1 = false;
out2 = false;
end
end
methods(Static, Hidden)
function flag = isAllowedInSystemBlock
flag = true;
end

end
methods(Static, Access=protected)
function header = getHeaderImpl
% Define header panel for System block dialog
header = matlab.system.display.Header(…
‘Title’, ‘DataLogReader’, …
‘Text’, getHeaderText());
end
function simMode = getSimulateUsingImpl
% Return only allowed simulation mode in System block dialog
simMode = ‘Interpreted execution’;
end
function flag = showSimulateUsingImpl
% Return false if simulation mode hidden in System block dialog
flag = false;
end
end

end
function str = getHeaderText
str = sprintf(‘The DataLog reader reads a struct file and it outputs the detection and time.’);
end
function [yDet,num] = objDet2Struct(det)
num = numel(det);
for i =1:num
yDet(i) = struct(‘Time’,det(i).Time,…
‘Measurement’,det(i).Measurement,…
‘MeasurementNoise’,det(i).MeasurementNoise,…
‘SensorIndex’,det(i).SensorIndex,…
‘ObjectClassID’,det(i).ObjectClassID,…
‘ObjectClassParameters’, [],…
‘ObjectAttributes’,det(i).ObjectAttributes); %#ok<AGROW>
end
end Hello all
I am kinda new in MATLAB/Simulink,and learning the multi-object tracking task based on simulink by Track Closely Spaced Targets Under Ambiguity in Simulink. I want to finish image tracking task. I already have the target detection result based on YOLO. When I was writing based on the HelperDataLogReader class in the example, an assertion failure occurred. But I have looked up a lot of relevant materials but can’t solve it, and I hope someone can help me. Here is my code and the target detection result of YOLO, thank you so much!
classdef (StrictDefaults)HelperDataReader < …
matlabshared.tracking.internal.SimulinkBusUtilities

% This is a helper block for example purposes and may be removed or
% modified in the future.
%
% Copyright 2019 The MathWorks, Inc.

properties(Constant, Access=protected)
pBusPrefix = ‘BusDataLogReader’
end
properties(Access = public, Nontunable)
Data
end

properties(Nontunable)
Frame = fusionCoordinateFrameType.Rectangular
end

properties(Access = private)
%pCurrentIndex
pCurrentIndex = 0

%pMaxIndex Saved the maximum time step index in the data file
pMaxIndex

end

methods
function obj = HelperDataReader(varargin)
% Constructor
setProperties(obj,nargin,varargin{:});
end
end

methods(Access=protected)

function [out, argsToBus] = defaultOutput(obj)
objAtt = struct(‘Score’,double(1));
out = struct(‘Time’,double(1),…
‘Measurement’,double(zeros(1, 4)),…
‘MeasurementNoise’,double(zeros(4)),…
‘SensorIndex’,double(0),…
‘ObjectClassID’,double(0),…
‘ObjectClassParameters’, [],…
‘ObjectAttributes’,objAtt);
argsToBus = {out};
end

% Currently only support simulink environment, so nothing to do
% here
function y = sendToBus(~,x,varargin)
[newx,num] = objDet2Struct(x);
y = struct(‘Detections’,newx,’NumDetections’,num);
end

function [det, time] = stepImpl(obj)
if ~obj.isEndOfData()
obj.pCurrentIndex = obj.pCurrentIndex + 1;
end
newDet = obj.Data.detections{obj.pCurrentIndex};
det = sendToBus(obj,newDet);
time = newDet(1).Time;
end

function setupImpl(obj, varargin)
obj.Data = load(‘PedestrianTrackingYOLODetections.mat’);
obj.pMaxIndex =numel(obj.Data.detections);
end
function loadObjectImpl(obj,s,wasLocked)
% Set properties in object obj to values in structure s

% Set public properties and states
loadObjectImpl@matlab.System(obj,s,wasLocked);
end

function status = isEndOfData(obj)
% Return true if end of data has been reached
status = (obj.pCurrentIndex == obj.pMaxIndex);
end

function s = saveObjectImpl(obj)
% Set properties in structure s to values in object obj

% Set public properties and states
s = saveObjectImpl@matlab.System(obj);
end

% function varargout = getOutputDataTypeImpl(obj)
% varargout{1} = getOutputDataTypeImpl@matlabshared.tracking.internal.SimulinkBusUtilities(obj);
% varargout{2} = "double";
% end

function str = getIconImpl(~)
str = sprintf(‘HelpernDataLognReader’);
end

function varargout = getOutputNamesImpl(~)
varargout{1} = sprintf(‘Detections’);
varargout{2} = sprintf(‘Time’);
end
function varargout = getInputNamesImpl(~)
varargout{1} = sprintf(‘In’);
end
function [out1,out2] = isOutputFixedSizeImpl(~)
out1 = true;
out2 = true;
end
function [out1,out2] = getOutputSizeImpl(~)
out1 = [1 1];
out2 = [1 1];
end

function [out1,out2] = isOutputComplexImpl(~)
out1 = false;
out2 = false;
end
end
methods(Static, Hidden)
function flag = isAllowedInSystemBlock
flag = true;
end

end
methods(Static, Access=protected)
function header = getHeaderImpl
% Define header panel for System block dialog
header = matlab.system.display.Header(…
‘Title’, ‘DataLogReader’, …
‘Text’, getHeaderText());
end
function simMode = getSimulateUsingImpl
% Return only allowed simulation mode in System block dialog
simMode = ‘Interpreted execution’;
end
function flag = showSimulateUsingImpl
% Return false if simulation mode hidden in System block dialog
flag = false;
end
end

end
function str = getHeaderText
str = sprintf(‘The DataLog reader reads a struct file and it outputs the detection and time.’);
end
function [yDet,num] = objDet2Struct(det)
num = numel(det);
for i =1:num
yDet(i) = struct(‘Time’,det(i).Time,…
‘Measurement’,det(i).Measurement,…
‘MeasurementNoise’,det(i).MeasurementNoise,…
‘SensorIndex’,det(i).SensorIndex,…
‘ObjectClassID’,det(i).ObjectClassID,…
‘ObjectClassParameters’, [],…
‘ObjectAttributes’,det(i).ObjectAttributes); %#ok<AGROW>
end
end multi-object tracking, sensor fusion and tracking toolbox, system object MATLAB Answers — New Questions

​

Tags: matlab

Share this!

Related posts

External Mode Connection Issue with C2000 LaunchPad and Speedgoat System
2025-05-17

External Mode Connection Issue with C2000 LaunchPad and Speedgoat System

how to validate mscohere?
2025-05-17

how to validate mscohere?

Transfer history to MATLAB 2025a
2025-05-17

Transfer history to MATLAB 2025a

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

Categories

  • Matlab
  • Microsoft
  • News
  • Other
Application Package Repository Telkom University

Tags

matlab microsoft opensources
Application Package Download License

Application Package Download License

Adobe
Google for Education
IBM
Matlab
Microsoft
Wordpress
Visual Paradigm
Opensource

Sign Up For Newsletters

Be the First to Know. Sign up for newsletter today

Application Package Repository Telkom University

Portal Application Package Repository Telkom University, for internal use only, empower civitas academica in study and research.

Information

  • Telkom University
  • About Us
  • Contact
  • Forum Discussion
  • FAQ
  • Helpdesk Ticket

Contact Us

  • Ask: Any question please read FAQ
  • Mail: helpdesk@telkomuniversity.ac.id
  • Call: +62 823-1994-9941
  • WA: +62 823-1994-9943
  • Site: Gedung Panambulai. Jl. Telekomunikasi

Copyright © Telkom University. All Rights Reserved. ch

  • FAQ
  • Privacy Policy
  • Term

This Application Package for internal Telkom University only (students and employee). Chiers... Dismiss