About error of helperVisualizeMotionAndStructureStereo
1 回表示 (過去 30 日間)
古いコメントを表示
I am the following site
https://jp.mathworks.com/help/vision/ug/stereo-visual-simultaneous-localization-mapping.html
For reference, I'm thinking of running SLAM with my own stereo camera with the file name "stereoslam.m".
No error occurred up to the "Map Initialization" item, but the following error occurs in the "Data Management and Visualization" item.
Error: pointclouds.internal.pcui.validateAndParseInputsXYZC (line 47)
The input must be non-empty.
Error: pcplayer / parseInputs (line 518)
[X, Y, Z, C, map, ptCloud] =
pointclouds.internal.pcui.validateAndParseInputsXYZC (mfilename, varargin {:});
Error: pcplayer / view (line 199)
[X, Y, Z, C, map, ptCloud] = pcplayer.parseInputs (varargin {:});
Error: helperVisualizeMotionAndStructureStereo (line 41)
obj.MapPointsPlot.view (xyzPoints, color);
Error: stereoslam (line 79)
mapPlot = helperVisualizeMotionAndStructureStereo (vSetKeyFrames, mapPointSet);
I suspect that the "color" value of the helperVisualizeMotionAndStructureStereo function is the cause,
The following code on line 39 of the actual helperVisualizeMotionAndStructureStereo function
color = xyzPoints(:, 3);
When I checked the value of this color, it became the following value.
color =
0 × 1 empty single column vector
However, since xyzPoints of the workspace in "stereoslam.m" that I am making is written as "264x3 single", I think that the color value should be a sequence of all the values in the third column.
The following xyzPoints in the helperVisualizeMotionAndStructureStereo function
[xyzPoints, currPose, trajectory] = retrievePlottedData(obj, vSetKeyFrames, mapPoints);
How can I enter the value of xyzPoints in my workspace instead of this?
Also, if my thinking is wrong and the error is another cause, please let me know about the cause.
0 件のコメント
回答 (1 件)
Qu Cao
2021 年 11 月 22 日
In helperVisualizeMotionAndStructureStereo.m, please note the following code in retrievePlottedData which discards xyzPoints outside the axis limits.
% Only plot the points within the limit
inPlotRange = xyzPoints(:, 1) > obj.XLim(1) & ...
xyzPoints(:, 1) < obj.XLim(2) & xyzPoints(:, 2) > obj.YLim(1) & ...
xyzPoints(:, 2) < obj.YLim(2) & xyzPoints(:, 3) > obj.ZLim(1) & ...
xyzPoints(:, 3) < obj.ZLim(2);
xyzPoints = xyzPoints(inPlotRange, :);
You can change the following properties in helperVisualizeMotionAndStructureStereo for your use case.
XLim = [-20 100]
YLim = [-100 40]
ZLim = [-5 15]
参考
カテゴリ
Help Center および File Exchange で Point Cloud Processing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!