The goal here is to create a modular A* algorithm library which provides an interface for how the state should be defined and then resolves the path planning problem.
- The start location is marked
?
. - The goal location is marked
@
. - The inaccessible locations are
X
. - Each visited locations on the path to the goal is marked
*
.
Here is a raw map for the robots to use:
? X X 0 0 0 0 0 0 0 X X 0 0 0 0
0 X X 0 0 0 0 0 0 X X 0 0 0 0 0
0 X X 0 0 0 0 0 X X 0 0 0 0 0 0
0 X X 0 0 0 0 X X 0 0 0 X X X 0
0 X X 0 0 0 X X 0 0 0 X X X 0 0
0 X X 0 0 X X 0 0 0 X X X 0 0 0
0 X X 0 X X 0 0 0 X X X 0 0 0 0
0 X X X X 0 0 0 X X X 0 0 0 0 0
0 X X X 0 0 0 X X X 0 0 0 0 0 0
0 X X 0 0 0 X X X 0 0 X X X X X
0 X 0 0 0 X X X 0 0 X X X X X X
0 0 0 0 X X X 0 0 X X X X X X X
0 0 0 X X X 0 0 X X X X X X X X
0 0 X X X 0 0 X X X X X X X X X
0 X X X 0 0 0 0 0 0 0 0 0 0 0 0
X X X 0 0 0 0 0 0 0 0 0 0 0 0 @
In this case I decided to simulate the motion of a robot using the bicycle model.
Some locations seem "jumped" because the speed of the robot is set such that the robot moves by more than the width/height of each square cells each iteration.
Found path to goal in 55843 expansions.
? 0 0 0 0 0 0 0 X X 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
* 0 0 0 0 0 0 0 X X 0 0 0 0 0 0 0 0 0 0 * 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
* 0 0 0 0 0 0 0 X X 0 0 0 0 0 0 0 0 0 * 0 0 * 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 X X 0 0 0 0 0 0 0 * * X X X 0 * 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
* 0 0 0 0 0 0 0 X X 0 0 0 0 0 0 * 0 0 X X X 0 0 * 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0 0 0 0 0 0 0 0 X 0 0 0 0 0 0 0 0 0 X X X 0 0 0 0 0 0 0 0 0 0 * 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 X X 0 0 0 0 0 0 0 0 0 X X X 0 0 0 0 0 0 0 0 0 0 0 * 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 X X X 0 0 0 0 0 0 0 0 0 X X X 0 0 0 0 0 0 0 0 0 0 0 0 * * * 0 * * 0 * @
Maze 4
Found path to goal in 12904 expansions.
? X X 0 0 0 0 0 0 0 X X 0 0 0 0 0 X X 0 0 0 0 0 0 0 0 0 0 0 0 0 0
* X X 0 0 0 0 0 0 X X 0 0 0 0 0 0 X X 0 0 0 0 0 0 0 0 0 0 0 0 0 0
* X X 0 0 0 0 0 X X 0 0 * * 0 0 0 X X 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 X X 0 0 0 0 X X 0 0 * X X X 0 0 X X 0 0 0 0 0 0 0 0 0 0 0 0 0 0
* X X 0 0 0 X X 0 0 * X X X * 0 0 X X 0 0 0 0 0 0 0 0 0 0 0 0 0 0
* X X 0 0 X X 0 0 * X X X * 0 0 0 X X 0 0 0 0 0 0 0 0 0 0 0 0 0 0
* X X 0 X X 0 0 * X X X * * 0 0 0 X X 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 X X X X 0 0 * X X X 0 * 0 0 0 0 X X 0 0 0 0 0 0 0 0 0 0 0 0 0 0
* X X X 0 0 * X X X 0 * 0 0 0 0 0 X X 0 0 0 0 0 0 0 0 0 0 0 0 0 0
* X X 0 0 * X X X 0 * X X X X X X X X 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 X * 0 * X X X 0 * X X X X X X X X X 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 * X X X 0 * X X X X X X X X X X 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 X X X 0 * X X X X X X X X X X X 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 X X X 0 0 X X X X X X X X X X X X 0 0 0 0 0 * * X * * 0 0 0 0
0 X X X 0 0 0 0 * 0 0 0 0 0 0 0 0 0 0 0 0 0 0 * 0 X X X 0 * 0 0 0
X X X 0 0 0 0 0 0 * * * 0 * * 0 * * * 0 * * 0 * X X X X X 0 * * @