lejos.robotics.navigation
Interface MoveController

All Superinterfaces:
MoveProvider
All Known Subinterfaces:
ArcMoveController, ArcRotateMoveController, RotateMoveController
All Known Implementing Classes:
CompassPilot, DifferentialPilot, OmniPilot, SegowayPilot, SteeringPilot

public interface MoveController
extends MoveProvider


Field Summary
static double WHEEL_SIZE_NXT1
          NXT 1.0 kit wheel diameter, in centimeters
static double WHEEL_SIZE_NXT2
          NXT 2.0 kit wheel diameter, in centimeters
static double WHEEL_SIZE_RCX
          White RCX "motorcycle" wheel diameter, in centimeters
 
Method Summary
 void backward()
          Starts the NXT robot moving backwards.
 void forward()
          Starts the NXT robot moving forward.
 double getMaxTravelSpeed()
          Returns the maximum speed at which this robot is capable of traveling forward and backward.
 double getTravelSpeed()
          Returns the speed at which the robot will travel forward and backward (and to some extent arcs, although actual arc speed is slightly less).
 boolean isMoving()
          true if the robot is moving
 void setTravelSpeed(double speed)
          Sets the speed at which the robot will travel forward and backward (and to some extent arcs, although actual arc speed is slightly less).
 void stop()
          Halts the NXT robot
 void travel(double distance)
          Moves the NXT robot a specific distance.
 void travel(double distance, boolean immediateReturn)
          Moves the NXT robot a specific distance.
 
Methods inherited from interface lejos.robotics.navigation.MoveProvider
addMoveListener, getMovement
 

Field Detail

WHEEL_SIZE_NXT1

static final double WHEEL_SIZE_NXT1
NXT 1.0 kit wheel diameter, in centimeters

See Also:
Constant Field Values

WHEEL_SIZE_NXT2

static final double WHEEL_SIZE_NXT2
NXT 2.0 kit wheel diameter, in centimeters

See Also:
Constant Field Values

WHEEL_SIZE_RCX

static final double WHEEL_SIZE_RCX
White RCX "motorcycle" wheel diameter, in centimeters

See Also:
Constant Field Values
Method Detail

forward

void forward()
Starts the NXT robot moving forward.


backward

void backward()
Starts the NXT robot moving backwards.


stop

void stop()
Halts the NXT robot


isMoving

boolean isMoving()
true if the robot is moving

Returns:
true if the robot is moving under power.

travel

void travel(double distance)
Moves the NXT robot a specific distance. A positive value moves it forward and a negative value moves it backward. Method returns when movement is done.

Parameters:
distance - The positive or negative distance to move the robot.

travel

void travel(double distance,
            boolean immediateReturn)
Moves the NXT robot a specific distance. A positive value moves it forward and a negative value moves it backward.

Parameters:
distance - The positive or negative distance to move the robot, in wheel diameter units.
immediateReturn - If immediateReturn is true then the method returns immediately.

setTravelSpeed

void setTravelSpeed(double speed)
Sets the speed at which the robot will travel forward and backward (and to some extent arcs, although actual arc speed is slightly less). Speed is measured in units/second. e.g. If wheel diameter is cm, then speed is cm/sec.

Parameters:
speed - In chosen units per second (e.g. cm/sec)

getTravelSpeed

double getTravelSpeed()
Returns the speed at which the robot will travel forward and backward (and to some extent arcs, although actual arc speed is slightly less). Speed is measured in units/second. e.g. If wheel diameter is cm, then speed is cm/sec.

Returns:
Speed in chosen units per second (e.g. cm/sec)

getMaxTravelSpeed

double getMaxTravelSpeed()
Returns the maximum speed at which this robot is capable of traveling forward and backward. Speed is measured in units/second. e.g. If wheel diameter is cm, then speed is cm/sec.

Returns:
Speed in chosen units per second (e.g. cm/sec)