This is the sixth of a series of posts on leJOS Navigation. It describes how to do path finding.
leJOS has a variety of path finders that all implement the PathFinder interface.
Both of theses implementations require a line map of the environment. How to create this was described in the previous post.
We will look at ShortestPathFinder first.
The constructor for ShortestPathFinder takes a line map a a parameter.
Having constructed your path finder, you call the find the path by calling the findRoute with the initial pose of the robot and the waypoint your want to reach. A Path object is returned which can be used by the followPath method of Navigator.