Interface ArcMoveController
-
- All Superinterfaces:
MoveController,MoveProvider
- All Known Subinterfaces:
ArcRotateMoveController,LineFollowingMoveController
- All Known Implementing Classes:
CompassPilot,DifferentialPilot,MovePilot,OmniPilot,RemoteRequestPilot,SteeringPilot
public interface ArcMoveController extends MoveController
An enhanced MoveController that is capable of traveling in arcs.- Author:
- NXJ Team
-
-
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 voidarc(double radius, double angle)Moves the NXT robot along an arc with a specified radius and angle, after which the robot stops moving.voidarc(double radius, double angle, boolean immediateReturn)Moves the NXT robot along an arc with a specified radius and angle, after which the robot stops moving.voidarcBackward(double radius)Starts the NXT robot moving backward along an arc with a specified radius.voidarcForward(double radius)Starts the NXT robot moving forward along an arc with a specified radius.doublegetMinRadius()The minimum steering radius this vehicle is capable of when traveling in an arc.voidsetMinRadius(double radius)Set the radius of the minimum turning circle.voidtravelArc(double radius, double distance)Moves the NXT robot a specified distance along an arc of specified radius, after which the robot stops moving.voidtravelArc(double radius, double distance, boolean immediateReturn)Moves the NXT robot a specified distance along an arc of specified radius, after which the robot stops moving.-
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
-
getMinRadius
double getMinRadius()
The minimum steering radius this vehicle is capable of when traveling in an arc. Theoretically this should be identical for both forward and reverse travel. In practice?- Returns:
- the radius in degrees
-
setMinRadius
void setMinRadius(double radius)
Set the radius of the minimum turning circle.- Parameters:
radius- the radius in degrees
-
arcForward
void arcForward(double radius)
Starts the NXT robot moving forward along an arc with a specified radius.If
radiusis positive, the robot arcs left, and the center of the turning circle is on the left side of the robot.
Ifradiusis negative, the robot arcs right, and the center of the turning circle is on the right side of the robot.
Ifradiusis zero, the robot rotates in place.Postcondition: Motor speeds are unpredictable.
Note: If you have specified a drift correction in the constructor it will not be applied in this method.
- Parameters:
radius- of the arc path. If positive, the left side of the robot is on the inside of the turn. If negative, the left side of the robot is on the outside of the turn.
-
arcBackward
void arcBackward(double radius)
Starts the NXT robot moving backward along an arc with a specified radius.If
radiusis positive, the robot arcs left, and the center of the turning circle is on the left side of the robot.
Ifradiusis negative, the robot arcs right, and the center of the turning circle is on the right side of the robot.
Ifradiusis zero, the robot rotates in place.Postcondition: Motor speeds are unpredictable.
Note: If you have specified a drift correction in the constructor it will not be applied in this method.
- Parameters:
radius- of the arc path. If positive, the left side of the robot is on the inside of the turn. If negative, the left side of the robot is on the outside of the turn.
-
arc
void arc(double radius, double angle)Moves the NXT robot along an arc with a specified radius and angle, after which the robot stops moving. This method does not return until the robot has completed movingangledegrees along the arc.If
radiusis positive, the robot arcs left, and the center of the turning circle is on the left side of the robot.
Ifradiusis negative, the robot arcs right, and the center of the turning circle is on the right side of the robot.
Ifradiusis zero, is zero, the robot rotates in place.Robot will stop when the degrees it has moved along the arc equals
angle.
Ifangleis positive, the robot will turn to the left (anti-clockwise).
Ifangleis negative, the robot will turn to the right (clockwise). Ifangleis zero, the robot will not move and the method returns immediately.Postcondition: Motor speeds are unpredictable.
Note: If you have specified a drift correction in the constructor it will not be applied in this method.
- Parameters:
radius- of the arc path. If positive, the left side of the robot is on the inside of the turn. If negative, the left side of the robot is on the outside of the turn.angle- The sign of the angle determines the direction of the robot turns: Positive is anti-clockwise, negative is clockwise.- See Also:
travelArc(double, double)
-
arc
void arc(double radius, double angle, boolean immediateReturn)Moves the NXT robot along an arc with a specified radius and angle, after which the robot stops moving. This method has the ability to return immediately by using theimmediateReturnparameter.If
radiusis positive, the robot arcs left, and the center of the turning circle is on the left side of the robot.
Ifradiusis negative, the robot arcs right, and the center of the turning circle is on the right side of the robot.
Ifradiusis zero, is zero, the robot rotates in place.The robot will stop when the degrees it has moved along the arc equals
angle.
Ifangleis positive, the robot will turn to the left (anti-clockwise).
Ifangleis negative, the robot will turn to the right (clockwise). Ifangleis zero, the robot will not move and the method returns immediately.Postcondition: Motor speeds are unpredictable.
Note: If you have specified a drift correction in the constructor it will not be applied in this method.
- Parameters:
radius- of the arc path. If positive, the left side of the robot is on the inside of the turn. If negative, the left side of the robot is on the outside of the turn.angle- The sign of the angle determines the direction of the robot turns: Positive is anti-clockwise, negative is clockwise.immediateReturn- If immediateReturn is true then the method returns immediately.- See Also:
travelArc(double, double, boolean)
-
travelArc
void travelArc(double radius, double distance)Moves the NXT robot a specified distance along an arc of specified radius, after which the robot stops moving. This method does not return until the robot has completed movingdistancealong the arc. The units (inches, cm) fordistancemust be the same as the units used forradius.If
radiusis positive, the robot arcs left, and the center of the turning circle is on the left side of the robot.
Ifradiusis negative, the robot arcs right, and the center of the turning circle is on the right side of the robot.
Ifradiusis zero, the robot rotates in placeThe robot will stop when it has moved along the arc
distanceunits.
Ifdistanceis positive, the robot will move travel forwards.
Ifdistanceis negative, the robot will move travel backwards.
Ifdistanceis zero, the robot will not move and the method returns immediately.Postcondition: Motor speeds are unpredictable.
- Parameters:
radius- of the arc path. If positive, the left side of the robot is on the inside of the turn. If negative, the left side of the robot is on the outside of the turn.distance- to travel, in same units asradius. The sign of the distance determines the direction of robot motion. Positive drives the robot forward, negative drives it backward.- See Also:
arc(double, double)
-
travelArc
void travelArc(double radius, double distance, boolean immediateReturn)Moves the NXT robot a specified distance along an arc of specified radius, after which the robot stops moving. This method has the ability to return immediately by using theimmediateReturnparameter. The units (inches, cm) fordistanceshould be the same as the units used forradius.If
radiusis positive, the robot arcs left, and the center of the turning circle is on the left side of the robot.
Ifradiusis negative, the robot arcs right, and the center of the turning circle is on the right side of the robot.
Ifradiusis zero, the robot rotates in place.The robot will stop when it has moved along the arc
distanceunits.
Ifdistanceis positive, the robot will move travel forwards.
Ifdistanceis negative, the robot will move travel backwards.
Ifdistanceis zero, the robot will not move and the method returns immediately.Postcondition: Motor speeds are unpredictable.
- Parameters:
radius- of the arc path. If positive, the left side of the robot is on the inside of the turn. If negative, the left side of the robot is on the outside of the turn.distance- to travel, in same units asradius. The sign of the distance determines the direction of robot motion. Positive drives the robot forward, negative drives it backward.immediateReturn- If immediateReturn is true then the method returns immediately.- See Also:
arc(double, double, boolean)
-
-