MATLAB Answers

Does vehicleCostmap this type of map only support pathPlannerRRT object to plan a path? Can I use another algorithm to plan a path?

1 view (last 30 days)
Lee Jessie
Lee Jessie on 21 May 2021
Answered: Ankur Srivastava on 24 May 2021
I really dont know how to use A* algorithm in vehicleCostmap this type of map to finish the path planning.
there's plannerAStarGrid method in Navigation toolbox, unfortunately, which are not allow to use in vehicleCostmap.
so, the question is that vehicleCostmap this type of map only support pathPlannerRRT object to plan a path? Can I use another algorithm to plan a path in vehicleCostmap?
huge thx!

Answers (2)

Qu Cao
Qu Cao on 21 May 2021
You can create an occupancyMap object from a vehicleCostmap object using the following syntax:
map = occupancyMap(p,resolution)
and then pass it to plannerAStarGrid.

Ankur Srivastava
Ankur Srivastava on 24 May 2021
Currently, plannerAStarGrid only supports binaryOccupancyMap and occupancyMap.
Alternatively, you can convert your vehicleCostmap object to occupancyMap using the following syntax:
p = vehicleCostmapObj.Costmap;
resolution = 1/vehicleCostmapObj.CellSize;
map = occupancyMap(p,resolution);
map.FreeThreshold = p.FreeThreshold;
map.OccupiedThreshold = p.OccupiedThreshold;
and then pass it to plannerAStarGrid.

Community Treasure Hunt

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

Start Hunting!