public class Robot
extends java.lang.Object
implements java.lang.Runnable
Constructor and Description |
---|
Robot(java.lang.String serialPort,
GameSpecification specs)
construct the robot controller and connect to the servo controller device
|
Modifier and Type | Method and Description |
---|---|
void |
allLocationsDemo()
shows the user all locations learned by the robot arm, it does it
in a separate thread of course as this method is called from the
button action listener
|
void |
close()
close the communication link to the servo-controller device
|
void |
control()
allows a direct control of the robot using a keyboard in a separate robot control window
|
void |
doTest()
lets the user to enter a simple command for the robot on the standard
input console - this is used only for testing the robot arm
|
void |
goHome()
move the arm away from the sight of the camera
|
void |
goTo(double[] angles)
moves the robot arm to the requested angles configuration, if the previous move has been completed
|
void |
goToDirect(double[] angles)
moves the robot arm to the requested angles configuration, regardless the previous move has been completed
|
void |
grab()
grab the element now
|
void |
initArm()
initialize the arm to its 0 position - a quite stressful operation!
|
void |
moveRobot(Move move)
perform a single move operation with the robot arm including picking and placing an element.
|
void |
pause()
invert the pause mode state
|
void |
performMove()
perform a single move that was requested transporting the element to be moved
|
void |
put()
release the element now
|
void |
run()
performs the demo of showing all locations
|
public Robot(java.lang.String serialPort, GameSpecification specs) throws java.lang.Exception
java.lang.Exception
public void close()
public void moveRobot(Move move) throws java.lang.Exception
java.lang.Exception
public void performMove() throws java.lang.Exception
java.lang.Exception
public void doTest()
public void allLocationsDemo()
public void run()
run
in interface java.lang.Runnable
public void pause()
public void control()
public void goTo(double[] angles) throws java.lang.Exception
java.lang.Exception
public void goToDirect(double[] angles) throws java.lang.Exception
java.lang.Exception
public void grab() throws java.lang.Exception
java.lang.Exception
public void put() throws java.lang.Exception
java.lang.Exception
public void initArm()
public void goHome() throws java.lang.Exception
java.lang.Exception