All Downloads are FREE. Search and download functionalities are using the official Maven repository.

lejos.robotics.navigation.ArcMoveController Maven / Gradle / Ivy

Go to download

leJOS (pronounced like the Spanish word "lejos" for "far") is a tiny Java Virtual Machine. In 2013 it was ported to the LEGO EV3 brick.

The newest version!
package lejos.robotics.navigation;

/**
 * An enhanced MoveController that is capable of traveling in arcs.
 * @author NXJ Team
 *
 */
public interface ArcMoveController extends MoveController {
	
	/**
	 * 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?
	 * 
	 * @return the radius in degrees
	 */
	public double getMinRadius();
	
	/**
	 * Set the radius of the minimum turning circle.
	 * 
	 * @param radius the radius in degrees
	 */
	public void setMinRadius(double radius);

	/**
	  * Starts the NXT robot moving forward along an arc with a specified radius.
	  * 

* If radius is positive, the robot arcs left, and the center of the turning circle is on the left side of the robot.
* If radius is negative, the robot arcs right, and the center of the turning circle is on the right side of the robot.
* If radius is 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. * * @param 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. */ public void arcForward(double radius); /** * Starts the NXT robot moving backward along an arc with a specified radius. *

* If radius is positive, the robot arcs left, and the center of the turning circle is on the left side of the robot.
* If radius is negative, the robot arcs right, and the center of the turning circle is on the right side of the robot.
* If radius is 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. * * @param 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. */ public void arcBackward(double radius); /** * 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 moving angle degrees along the arc. *

* If radius is positive, the robot arcs left, and the center of the turning circle is on the left side of the robot.
* If radius is negative, the robot arcs right, and the center of the turning circle is on the right side of the robot.
* If radius is zero, is zero, the robot rotates in place. *

* Robot will stop when the degrees it has moved along the arc equals angle.
* If angle is positive, the robot will turn to the left (anti-clockwise).
* If angle is negative, the robot will turn to the right (clockwise). * If angle is 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. * * @param 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. * @param angle The sign of the angle determines the direction of the robot turns: Positive is anti-clockwise, negative is clockwise. * @see #travelArc(double, double) */ public 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 has the ability to return immediately * by using the immediateReturn parameter. *

* If radius is positive, the robot arcs left, and the center of the turning circle is on the left side of the robot.
* If radius is negative, the robot arcs right, and the center of the turning circle is on the right side of the robot.
* If radius is zero, is zero, the robot rotates in place. *

* The robot will stop when the degrees it has moved along the arc equals angle.
* If angle is positive, the robot will turn to the left (anti-clockwise).
* If angle is negative, the robot will turn to the right (clockwise). * If angle is 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. * * @param 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. * @param angle The sign of the angle determines the direction of the robot turns: Positive is anti-clockwise, negative is clockwise. * @param immediateReturn If immediateReturn is true then the method returns immediately. * @see #travelArc(double, double, boolean) */ public void arc(double radius, double angle, boolean immediateReturn); /** * 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 moving distance along the arc. The units (inches, cm) for distance * must be the same as the units used for radius. *

* If radius is positive, the robot arcs left, and the center of the turning circle is on the left side of the robot.
* If radius is negative, the robot arcs right, and the center of the turning circle is on the right side of the robot.
* If radius is zero, the robot rotates in place *

* The robot will stop when it has moved along the arc distance units.
* If distance is positive, the robot will move travel forwards.
* If distance is negative, the robot will move travel backwards.
* If distance is zero, the robot will not move and the method returns immediately. *

* Postcondition: Motor speeds are unpredictable. *

* * @param 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. * @param distance to travel, in same units as radius. The sign of the distance determines the direction of robot motion. Positive drives the robot forward, negative drives it backward. * @see #arc(double, double) * */ public 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 has the ability to return immediately * by using the immediateReturn parameter. * The units (inches, cm) for distance should be the same as the units used for radius. * *

* If radius is positive, the robot arcs left, and the center of the turning circle is on the left side of the robot.
* If radius is negative, the robot arcs right, and the center of the turning circle is on the right side of the robot.
* If radius is zero, the robot rotates in place. *

* The robot will stop when it has moved along the arc distance units.
* If distance is positive, the robot will move travel forwards.
* If distance is negative, the robot will move travel backwards.
* If distance is zero, the robot will not move and the method returns immediately. *

* Postcondition: Motor speeds are unpredictable. *

* * @param 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. * @param distance to travel, in same units as radius. The sign of the distance determines the direction of robot motion. Positive drives the robot forward, negative drives it backward. * @param immediateReturn If immediateReturn is true then the method returns immediately. * @see #arc(double, double, boolean) * */ public void travelArc(double radius, double distance, boolean immediateReturn); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy