Package lejos.robotics.navigation
Interface MoveController
-
- All Superinterfaces:
MoveProvider
- All Known Subinterfaces:
ArcMoveController,ArcRotateMoveController,LineFollowingMoveController,RotateMoveController
- All Known Implementing Classes:
CompassPilot,DifferentialPilot,MovePilot,OmniPilot,RemoteRequestPilot,SteeringPilot
public interface MoveController extends MoveProvider
-
-
Field Summary
Fields Modifier and Type Field Description static doubleWHEEL_SIZE_EV3EV3 kit wheel diameter, in centimetersstatic doubleWHEEL_SIZE_NXT1NXT 1.0 kit wheel diameter, in centimetersstatic doubleWHEEL_SIZE_NXT2NXT 2.0 kit wheel diameter, in centimetersstatic doubleWHEEL_SIZE_RCXWhite RCX "motorcycle" wheel diameter, in centimeters
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidbackward()Starts the NXT robot moving backwards.voidforward()Starts the NXT robot moving forward.doublegetLinearAcceleration()Returns the acceleration at which the robot accelerates at the start of a move and decelerates at the end of a move.doublegetLinearSpeed()Returns the speed at which the robot will travel forward and backward (and to some extent arcs, although actual arc speed is slightly less).doublegetMaxLinearSpeed()Returns the maximum speed at which this robot is capable of traveling forward and backward.booleanisMoving()true if the robot is movingvoidsetLinearAcceleration(double acceleration)Sets the acceleration at which the robot will accelerate at the start of a move and decelerate at the end of a move.voidsetLinearSpeed(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).voidstop()Halts the NXT robotvoidtravel(double distance)Moves the NXT robot a specific distance.voidtravel(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_EV3
static final double WHEEL_SIZE_EV3
EV3 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.
-
setLinearSpeed
void setLinearSpeed(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)
-
getLinearSpeed
double getLinearSpeed()
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)
-
getMaxLinearSpeed
double getMaxLinearSpeed()
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)
-
setLinearAcceleration
void setLinearAcceleration(double acceleration)
Sets the acceleration at which the robot will accelerate at the start of a move and decelerate at the end of a move. Acceleration is measured in units/second^2. e.g. If wheel diameter is cm, then acceleration is cm/sec^2.If acceleration is set during a move it will not be in used for the current move, it will be in effect with the next move.
- Parameters:
acceleration- in chosen units/second^2
-
getLinearAcceleration
double getLinearAcceleration()
Returns the acceleration at which the robot accelerates at the start of a move and decelerates at the end of a move.- Returns:
- acceleration in chosen units/second^2
-
-