BinaryOccupancyGrid map created with Image Labeler
Afficher commentaires plus anciens
Dear MATLAB Community,
CONTEXT: I am working on a global planner based on a multilayermap where there is a layer coming from a DEM file and a layer where obstacles are specified (very similar to this example, just for reference -> https://it.mathworks.com/help/nav/ug/offorad-planning-on-digital-elevation-models.html). In a similar way to what has been performed in the use case shown here (webinar: https://it.mathworks.com/videos/design-and-simulating-autonomy-for-construction-vehicles-1679066541903.html) i used the Image Labeler to have a labeled image with obstacles, which then i successfully converted in a binaryOccupancyGrid object.
PROBLEM: after the previous passages, my map is ready to be used for planning. I tried to use PlannerAstrGrid as in the first example. When i specify the start and goal positions (in grid coords because i manually choose them from the displayed map), i check their validity on the map using checkOccupancy(map, start) and for both start and goal i get "0". However, when i call the plan function, i get an error from the plannerAStarGrid/validateStartGoal telling me that the start position is not valid because its occupied (despite the checkOccupancy result).
MY GUESS: to me i seems like the map is good but actually not, like there is some sort of mismatch i cannot directly see (maybe coming from the Labeler itself?) because when i create the multilayermap project eerything works fine, i can even see the occupancygrid map itself and both the start/goal poses to be in free space indeed. It might be me being wrong in defining the coordinates (like messing with word/grid/local reference frames).
Anyway ,here is my code (unfortunatley I am not able to share the map file due to permissions issues)
Thank you in advance for any answer/support!
start = [838 207]; % [x, y] , GRID COORDS
goal = [510 1116];
map = multimap.getLayer('envObstaclesFilt');
dummyplanner = plannerAStarGrid(map);
show(dummyplanner.Map)
path = plan(dummyplanner, start, goal, "grid");
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Motion Planning dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!