|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.lejon.util.MoveMentor
This class accumulates some support methods to control and debug the movement of the robot. You may use the method
rectifyas follows:
boolean finished = false;
do
{
finished = false;
// Set a defined MotionCommand CURVE or ROTATE
myDrive.setMotionCommand(mMotionCommand);
myDrive.move();
while( !finished )
{
//wait for event MotionFinished
Thread.yield();
}
try
{
// Some time to let the robot stand still
Thread.sleep(500);
}
catch (InterruptedException e)
{}
}
while( MoveMentor.rectify( mMotionCommand, mMotionReport ) );
| Constructor Summary | |
MoveMentor()
|
|
| Method Summary | |
static boolean |
rectify(MotionCommand cmd,
MotionReport report)
Rectifies the motion defined in the MotionCommand. |
static void |
showNumber(int i)
Shows a signed integer on the RCX display. |
static void |
showText(java.lang.String s)
Shows a text on the RCX display. |
static void |
startCounter(int i)
Starts to count a specified number of seconds backwards until 0. |
static void |
waitForRUNPressed()
Waits until the Button RUN is pressed. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public MoveMentor()
| Method Detail |
public static boolean rectify(MotionCommand cmd,
MotionReport report)
cmd - Motion command with the defined motionreport - Motion report with the current local pose
public static void waitForRUNPressed()
public static void startCounter(int i)
i - The number of secondspublic static void showNumber(int i)
i - The number to be displayed.public static void showText(java.lang.String s)
s - The text to be displayed.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||