karlkurzer / path_planner

Hybrid A* Path Planner for the KTH Research Concept Vehicle
http://karlkurzer.github.io/path_planner/
BSD 3-Clause "New" or "Revised" License
1.49k stars 526 forks source link

Planner not working for other maps with map resolution != 1 #43

Closed ppln53 closed 3 years ago

ppln53 commented 3 years ago

Hello all,

I used the path_planner package for indoor robots, but when I'm running it on our maps it's not working, after debugging I finally came to understand that the resolution used inside the code is 1 for internal calculations, and the actual map resolution is not used anywhere for calculations, so I raised the issue who have faced a similar issue.

The modifications you need to do in the code. Go to src/collisiondetection.cpp 1) change "cX = (X + collisionLookup[idx].pos[i].x)" to "cX = (X + collisionLookup[idx].pos[i].x)/mapResolution", similarylfor cY, "cY = (Y + collisionLookup[idx].pos[i].y)/mapResolution". These are the x, y coordinates of the occupancy grid calculated from world coordinates. Since the map resolution was assumed 1 for calculations, there were issues in finding the path.

Please update on this if anyone has more info on this issue.