extend the range of GetNeighbors(), not by one pixel, but by the collision-size of the robot. So the calculated path has enough space to walls.
check the four sides of the robot in case of the obstacles are not at the middle point of each side( which could not be detected by GetNeighbors()). Only the corresponding side in the moving direction will be checked.
solution:
GetNeighbors()
, not by one pixel, but by the collision-size of the robot. So the calculated path has enough space to walls.GetNeighbors()
). Only the corresponding side in the moving direction will be checked.