public interface MoveController extends MoveProvider
Modifier and Type | Field and Description |
---|---|
static double |
WHEEL_SIZE_EV3
EV3 kit wheel diameter, in centimeters
|
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
|
Modifier and Type | Method and Description |
---|---|
void |
backward()
Starts the NXT robot moving backwards.
|
void |
forward()
Starts the NXT robot moving forward.
|
double |
getLinearAcceleration()
Returns the acceleration at which the robot accelerates at the start of a move and decelerates at the end of a move.
|
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).
|
double |
getMaxLinearSpeed()
Returns the maximum speed at which this robot is capable of traveling forward and backward.
|
boolean |
isMoving()
true if the robot is moving
|
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.
|
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).
|
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.
|
addMoveListener, getMovement
static final double WHEEL_SIZE_NXT1
static final double WHEEL_SIZE_NXT2
static final double WHEEL_SIZE_EV3
static final double WHEEL_SIZE_RCX
void forward()
void backward()
void stop()
boolean isMoving()
void travel(double distance)
distance
- The positive or negative distance to move the robot.void travel(double distance, boolean immediateReturn)
distance
- The positive or negative distance to move the robot, in wheel diameter units.immediateReturn
- If immediateReturn is true then the method returns immediately.void setLinearSpeed(double speed)
speed
- In chosen units per second (e.g. cm/sec)double getLinearSpeed()
double getMaxLinearSpeed()
void setLinearAcceleration(double acceleration)
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.
acceleration
- in chosen units/second^2double getLinearAcceleration()