RRTstar with own occupancy map
조회 수: 16 (최근 30일)
이전 댓글 표시
I´m a beginner and i think there is an easy way to solve my problem, but I don´t find a solution.
I´m trying to generate my own occupancy map and run the RRTstar algorithm on it (2D). I use those two cites in the help center and want to connect both codes, Create an optimal RRT path planner (RRT*) - MATLAB - MathWorks Deutschland, Create occupancy grid with binary values - MATLAB - MathWorks Deutschland (Image to Binary Occupancy Grid Example). I can run my occupancy map, but when i want to connect it to the rrtstar code, its not possible, because this code needs an .mat map and not .png.
Do you have a solution? Is my aproach useful or is there an simpler way to model this?
댓글 수: 0
답변 (1개)
Sakshay
2023년 3월 14일
Hello Michael,
As per my understanding, you want to use a Custom Occupancy Map with the RRT* Path Planning algorithm.
The Binary Occupancy Map that you are creating using the mentioned documentation can be directly used with the RRT* algorithm. An example code for the same would look like:
% Create Binary Occupancy Map
map = binaryOccupancyMap(10,10,10);
% Initialize Path Planning
ss = stateSpaceSE2;
sv = validatorOccupancyMap(ss);
sv.Map = map;
sv.ValidationDistance = 0.01;
ss.StateBounds = [map.XWorldLimits; map.YWorldLimits; [-pi pi]];
% Initialize Planner
planner = plannerRRTStar(ss,sv, ...
ContinueAfterGoalReached=true, ...
MaxIterations=2500, ...
MaxConnectionDistance=0.3);
% Plan Path
start = [0.5 0.5 0];
goal = [2.5 0.2 0];
[pthObj,solnInfo] = plan(planner,start,goal);
For more information on Occupany Grids, you can refer to the following documentation:
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Mapping에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!