How to get a cell array with lidarScan data for addScan?
Afficher commentaires plus anciens
Hello,
I tried to use the code from https://de.mathworks.com/help/nav/ref/lidarslam.addscan.html.
But on Mathworks they have a cell array with the lidarScan data and I have a lidarScan array. How do I change this to cell array?
% piece of code from Mathworks
% load garage_fl1_southend.mat scans
% scans = scans(1:40:end);
% my code
T = readtable('lidar_scan.csv');
for j=2:62
ranges = T{j,9:1088}; % T ist my table with all the given information
% from the LiDAR. So I have measured ranges for every timestamp for every 0.25 step of the 270
% degrees
angles = linspace(-135,135,numel(ranges));
scan(1,j-1) = lidarScan(ranges,angles); % output lidarScan array
end
maxRange = 19.2; % meters
resolution = 10; % cells per meter
slamObj = lidarSLAM(resolution,maxRange);
slamObj.LoopClosureThreshold = 360;
slamObj.LoopClosureSearchRadius = 8;
for i = 1:numel(scans)
addScan(slamObj,scans{i}); % Error here
if rem(i,10) == 0
show(slamObj);
end
end
Brace indexing is not supported for variables of this type.
Error in addScan(slamObj,scans{i});
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Labeling, Segmentation, and Detection dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!