How to get a cell array with lidarScan data for addScan?
이전 댓글 표시
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});
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Labeling, Segmentation, and Detection에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!