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

lejos.robotics.navigation.LineFollowingMoveController 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;

public interface LineFollowingMoveController extends ArcRotateMoveController {
  /** Moves the robot forward while making a curve specified by turnRate. 

* * This move is suited for line following as it executes immediately without stopping the move that the robot is currently executing. * It is also non blocking, control goes back to the main program right way. *

* The turnRate specifies the sharpness of the turn. Use values * between -200 and +200.
* A positive value means that center of the turn is on the left. If the * robot is traveling toward the top of the page the arc looks like this: * ).
* A negative value means that center of the turn is on the right so the arc * looks this: (.
* . In this class, this parameter determines the ratio of inner wheel speed * to outer wheel speed as a percent.
* Formula: ratio = 100 - abs(turnRate).
* When the ratio is negative, the outer and inner wheels rotate in opposite * directions. Examples of how the formula works: *

    *
  • steer(0) -> inner and outer wheels turn at the same * speed, travel straight *
  • steer(25) -> the inner wheel turns at 75% of the speed * of the outer wheel, turn left *
  • steer(100) -> the inner wheel stops and the outer wheel * is at 100 percent, turn left *
  • steer(200) -> the inner wheel turns at the same speed as * the outer wheel - a zero radius turn. *
*

* Note: If you have specified a drift correction in the constructor it will * not be applied in this method. * * @param turnRate * If positive, the left side of the robot is on the inside of * the turn. If negative, the left side is on the outside. */ public void steer(double turnRate); /** Moves the robot backward while making a curve specified by turnRate.

* * This move is suited for line following as it executes immediately without stopping the move that the robot is currently executing. * It is also non blocking, control goes back to the main program right way. *

* The turnRate specifies the sharpness of the turn. Use values * between -200 and +200.
* A positive value means that center of the turn is on the left. If the * robot is traveling toward the top of the page the arc looks like this: * ).
* A negative value means that center of the turn is on the right so the arc * looks this: (.
* . In this class, this parameter determines the ratio of inner wheel speed * to outer wheel speed as a percent.
* Formula: ratio = 100 - abs(turnRate).
* When the ratio is negative, the outer and inner wheels rotate in opposite * directions. Examples of how the formula works: *

    *
  • steer(0) -> inner and outer wheels turn at the same * speed, travel straight *
  • steer(25) -> the inner wheel turns at 75% of the speed * of the outer wheel, turn left *
  • steer(100) -> the inner wheel stops and the outer wheel * is at 100 percent, turn left *
  • steer(200) -> the inner wheel turns at the same speed as * the outer wheel - a zero radius turn. *
*

* Note: If you have specified a drift correction in the constructor it will * not be applied in this method. * * @param steerRatio * If positive, the left side of the robot is on the inside of * the turn. If negative, the left side is on the outside. */ public void steerBackward(double steerRatio); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy