RRTstar with own occupancy map

9 ビュー (過去 30 日間)
Michael
Michael 2023 年 1 月 16 日
回答済み: Sakshay 2023 年 3 月 14 日
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?

回答 (1 件)

Sakshay
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:

カテゴリ

Help Center および File ExchangeMapping についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by