lejos.robotics.proposal
Class MapPathFinder

java.lang.Object
  extended by java.util.ArrayList<WayPoint>
      extended by lejos.robotics.proposal.MapPathFinder
All Implemented Interfaces:
Iterable<WayPoint>, Collection<WayPoint>, List<WayPoint>, RandomAccess, PathFinder

public class MapPathFinder
extends ArrayList<WayPoint>
implements PathFinder

PathFinder that takes a map and a dummy set of range readings. It finds a path that is in short moves, has no obstacles in the way and where valid range readings can be taken from each waypoint. The algorithm is not deterministic so each time it is called a new route will be found.

Author:
Lawrie Griffiths

Field Summary
 
Fields inherited from class java.util.ArrayList
modCount
 
Constructor Summary
MapPathFinder(RangeMap map, RangeReadings readings)
           
 
Method Summary
 boolean contains(Object o)
           
 boolean containsAll(Collection<?> c)
           
 boolean equals(Object o)
           
 Collection<WayPoint> findRoute(Pose start, Point destination)
           
 Collection<WayPoint> findRoute(Pose start, Pose destination)
           
 boolean isEmpty()
           
 Iterator<E> iterator()
           
 ListIterator<E> listIterator()
           
 boolean removeAll(Collection<?> c)
           
 boolean retainAll(Collection<?> c)
           
 Object[] toArray()
           
<T> T[]
toArray(T[] dest)
           
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, addAll, addAll, clear, ensureCapacity, get, indexOf, lastIndexOf, listIterator, remove, remove, removeRange, set, size, subList, trimToSize
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Collection
containsAll, hashCode, isEmpty, removeAll, retainAll, toArray, toArray
 

Constructor Detail

MapPathFinder

public MapPathFinder(RangeMap map,
                     RangeReadings readings)
Method Detail

findRoute

public Collection<WayPoint> findRoute(Pose start,
                                      Point destination)
                               throws DestinationUnreachableException
Specified by:
findRoute in interface PathFinder
Throws:
DestinationUnreachableException

findRoute

public Collection<WayPoint> findRoute(Pose start,
                                      Pose destination)
                               throws DestinationUnreachableException
Specified by:
findRoute in interface PathFinder
Throws:
DestinationUnreachableException

contains

public boolean contains(Object o)
Specified by:
contains in interface Collection<E>

equals

public boolean equals(Object o)
Specified by:
equals in interface Collection<E>
Overrides:
equals in class Object

iterator

public Iterator<E> iterator()
Specified by:
iterator in interface Iterable<E>
Specified by:
iterator in interface Collection<E>

listIterator

public ListIterator<E> listIterator()
Specified by:
listIterator in interface List<E>

containsAll

public boolean containsAll(Collection<?> c)
Specified by:
containsAll in interface Collection<E>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection<E>

removeAll

public boolean removeAll(Collection<?> c)
Specified by:
removeAll in interface Collection<E>

retainAll

public boolean retainAll(Collection<?> c)
Specified by:
retainAll in interface Collection<E>

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection<E>

toArray

public <T> T[] toArray(T[] dest)
Specified by:
toArray in interface Collection<E>