Shorten path error in Train Deep Learning-Based Sampler for Motion Planning
3 ビュー (過去 30 日間)
古いコメントを表示
Dear MATLAB users
I am using function 'exampleHelperGenerateMazeDataset in Train Deep Learning-Based Sampler for Motion Planning tutorial in Navigation Ttoolbox.
The problem is the function is stopped with the errors below.
I never finished making dataset because of the error
------------------------------------------------------------------------------------------------------------------------------------------------------------
Error using nav.algs.internal.ShortenpathImpl/shorten (line 63)
Unable to shorten the path. Either a path does not exist between two states, or motion constraints prevent a viable path.
Error in shortenpath (line 30)
shortPath = shorten(obj);
Error in exampleHelperGenerateMazeDataset_250319 (line 43)
parfor j=1:numPathsPerMap
--------------------------------------------------------------------------------------------------------------------------------------------------------------
I think the problem is happened while the shortening path from RRT* argorithm.
How can I solve the problem?
0 件のコメント
回答 (1 件)
Ajay Pattassery
2025 年 3 月 19 日
shortenpath is erroring out since the input path that is fed to shortenpath is not collision free when check with stateValidator. The following check can be added to exampleHelperGenerateMazeDataset to shorten only the paths that are valid.
% pathObj path to be shortened
% stateValidator validator used to check whether path is valid or not
isPathValid = true;
for i=1:pathObj.NumStates-1
isvalid = stateValidator.isMotionValid(pathObj.States(i,:), pathObj.States(i+1,:));
if ~isvalid
isPathValid = false;
break;
end
end
if isPathValid
shortenedPath = shortenpath(pathObj, stateValidator);
end
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Motion Planning についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!