Import and Adapt any image to a 3D plot grid for a path planning problem
이전 댓글 표시
Currently working on a 3D path planning algorithm for a project,to learn path planning,I took a 2D tutorial A* algorithm, adapted it to my project circumstances(changed the expansion n number to 3 and added a dimension to have 3D path planning algorithm).
I would like to further upgrade this code into a non binary 1 or 0 obstacle path planning with a global function cost, since I didn't find any base algorithm on the internet.
While I'm pretty sure I can adapt the algorithm from binary obstacles to function cost constraint weights I would first want to know if it is possible to import any kind of map( for now 2D and with different colours and shapes to help me implement a costraint cost) and transform it into a grid based image that matlab can read and feed to the algorithm to exploit.
The algorithm for now uses a matrix generated from this code:
%DEFINE THE 2-D MAP ARRAY
MAX_X=10;
MAX_Y=10;
MAX_VAL=10;
%This array stores the coordinates of the map and the
%Objects in each coordinate
MAP=2*(ones(MAX_X,MAX_Y));
all of the nodes will be stored as coordinates and maybe later into indexes, the code will surely be used in 3D where one of the dimension is a derivative of the one of the dimensions(angle and angular rate) so I'm also pretty confused on how to implement that but it's a question for another time.
I'm kind of a beginner in MATLAB sorry if this is a trivial question and thank you for whoever takes the time to answer.
The very useful and easy to manipulate base algorithm comes from here:
Paul Premakumar (2023). A* (A Star) search for path planning tutorial (https://www.mathworks.com/matlabcentral/fileexchange/26248-a-a-star-search-for-path-planning-tutorial), MATLAB Central File Exchange. Retrieved May 11, 2023.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Robotics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
