function data = readCustomPointCloudFile(sourceName, index)
% Reader function for custom point cloud reader
%
% Copyright 2020 The MathWorks, Inc.

if isa(index, 'duration')
index = seconds(index);
end

pcds = fileDatastore(sourceName, 'ReadFcn', @pcread, 'FileExtensions', '.pcd');
data = pcread(pcds.Files{index});
end