Package lejos.robotics.navigation
Interface RotateMoveController
-
- All Superinterfaces:
MoveController,MoveProvider
- All Known Subinterfaces:
ArcRotateMoveController,LineFollowingMoveController
- All Known Implementing Classes:
CompassPilot,DifferentialPilot,MovePilot,OmniPilot,RemoteRequestPilot
public interface RotateMoveController extends MoveController
-
-
Field Summary
-
Fields inherited from interface lejos.robotics.navigation.MoveController
WHEEL_SIZE_EV3, WHEEL_SIZE_NXT1, WHEEL_SIZE_NXT2, WHEEL_SIZE_RCX
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description doublegetAngularAcceleration()Returns the acceleration at which the robot accelerates at the start of a move and decelerates at the end of a move.doublegetAngularSpeed()Returns the value of the rotation speeddoublegetMaxAngularSpeed()returns the maximum value of the rotation speed;voidrotate(double angle)Rotates the NXT robot the specified number of degrees; direction determined by the sign of the parameter.voidrotate(double angle, boolean immediateReturn)Rotates the NXT robot the specified number of degrees; direction determined by the sign of the parameter.voidrotateLeft()voidrotateRight()voidsetAngularAcceleration(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.voidsetAngularSpeed(double speed)sets the rotation speed of the robot (the angular velocity of the rotate() methods)-
Methods inherited from interface lejos.robotics.navigation.MoveController
backward, forward, getLinearAcceleration, getLinearSpeed, getMaxLinearSpeed, isMoving, setLinearAcceleration, setLinearSpeed, stop, travel, travel
-
Methods inherited from interface lejos.robotics.navigation.MoveProvider
addMoveListener, getMovement
-
-
-
-
Method Detail
-
rotate
void rotate(double angle)
Rotates the NXT robot the specified number of degrees; direction determined by the sign of the parameter. Method returns when rotation is done.- Parameters:
angle- The angle to rotate in degrees. A positive value rotates left, a negative value right (clockwise).
-
rotate
void rotate(double angle, boolean immediateReturn)Rotates the NXT robot the specified number of degrees; direction determined by the sign of the parameter. Method returns immediately if immediateReturn flag is true, otherwise returns when rotation is done.- Parameters:
angle- The angle to rotate in degrees. A positive value rotates left, a negative value right (clockwise).immediateReturn- If true, method returns immediately, otherwise blocks until rotation is complete.
-
setAngularSpeed
void setAngularSpeed(double speed)
sets the rotation speed of the robot (the angular velocity of the rotate() methods)- Parameters:
speed- in degrees per second
-
getAngularSpeed
double getAngularSpeed()
Returns the value of the rotation speed- Returns:
- the rotate speed in degrees per second
-
getMaxAngularSpeed
double getMaxAngularSpeed()
returns the maximum value of the rotation speed;- Returns:
- max rotation speed
-
setAngularAcceleration
void setAngularAcceleration(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
-
getAngularAcceleration
double getAngularAcceleration()
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
-
rotateRight
void rotateRight()
-
rotateLeft
void rotateLeft()
-
-