Class WaypointNavigator

  extended by lejos.navigation.SimpleNavigator
      extended by lejos.navigation.WaypointNavigator
All Implemented Interfaces:

public class WaypointNavigator
extends SimpleNavigator

The WaypointNavigator class extends the SimpleNavigator allowing the specify a path along a set of coordinates.

Dirk Sturzebecher - 20090131 - initial version

Constructor Summary
WaypointNavigator(Pilot pilot, float x, float y, float heading)
          Create a WaypointNavigator.
Method Summary
 void add(float xpos, float ypos, float turnSpeed, float moveSpeed)
          Add a point to the path to move.
 void clear()
          Stop the robot and clear the queue.
 void execute()
          Start to move along the list of points in the queue.
Methods inherited from class lejos.navigation.SimpleNavigator
angleTo, backward, distanceTo, forward, getAngle, getPilot, getX, getY, goTo, goTo, isMoving, rotate, rotate, rotateLeft, rotateRight, rotateTo, rotateTo, setMoveSpeed, setPosition, setSpeed, setTurnSpeed, stop, travel, travel, turn, turn, turn, updatePosition
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public WaypointNavigator(Pilot pilot,
                         float x,
                         float y,
                         float heading)
Create a WaypointNavigator. Just add points to the queue to determine path.

pilot - The Pilot to use.
x - The starting x position.
y - The starting y position.
heading - The starting heading.
Method Detail


public void clear()
Stop the robot and clear the queue.


public void add(float xpos,
                float ypos,
                float turnSpeed,
                float moveSpeed)
Add a point to the path to move.

xpos - The x coordinate.
ypos - The y coordinate.
turnSpeed - The speed to use for turns.
moveSpeed - The speed to use for moves.


public void execute()
Start to move along the list of points in the queue.