Class Armtty

java.lang.Object
  |
  +--Armtty

public class Armtty
extends java.lang.Object

A class to provide communication facilities to the real robot arm


Constructor Summary
Armtty()
          Default constructor purpose : initialize the Armtty object
 
Method Summary
 boolean connect()
          purpose : open the serial port to communicate with the robot arm
 boolean disconnect()
          purpose : close the connection to the robot arm
 void grip(double width)
          purpose : send the command GRIP to the port
 void home()
          purpose : send the command HOME to the port
 void ma(double waist, double shoulder, double elbow, double wrist, double twist)
          purpose : send the command MA to the port
 void ready()
          purpose : send the command READY to the port
 void speed(int value)
          purpose : send command SPEED to the port
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Armtty

public Armtty()
Default constructor purpose : initialize the Armtty object
Method Detail

connect

public boolean connect()
purpose : open the serial port to communicate with the robot arm
Returns:
true (succeed) or false (fail)

disconnect

public boolean disconnect()
purpose : close the connection to the robot arm
Returns:
true (succeed) or false (fail)

home

public void home()
purpose : send the command HOME to the port

ready

public void ready()
purpose : send the command READY to the port

ma

public void ma(double waist,
               double shoulder,
               double elbow,
               double wrist,
               double twist)
purpose : send the command MA to the port
Parameters:
waist - waist angle measured from horizon
shoulder - shoulder angle measured from horizon
elbow - elbow measured from horizon
wrist - wrist's bend angle measured from horizon
twist - wrist's twist angle

grip

public void grip(double width)
purpose : send the command GRIP to the port
Parameters:
width - width between two fingers of the gripper

speed

public void speed(int value)
purpose : send command SPEED to the port
Parameters:
value - speed of the arm