Class ArmSimulator

java.lang.Object
  |
  +--DHSystem
        |
        +--CRSPlusA150
              |
              +--ArmSimulator

public class ArmSimulator
extends CRSPlusA150

A class to simulate the action of the robot arm


Constructor Summary
ArmSimulator()
          Default constructor purpose : initialize the simulator
 
Method Summary
 Pic3DCanvas getCanvas(int usize, int vsize)
          get the output canvas
 boolean grip(double width)
          purpose : execute the command GRIP of the arm
 void home()
          purpose : home the arm
 boolean ma(double waist, double shoulder, double elbow, double wrist, double twist)
          purpose : execute the command MA of the arm
 boolean madeg(double waist, double shoulder, double elbow, double wrist, double twist)
          purpose : execute the command MA of the arm
 boolean mi(double waist, double shoulder, double elbow, double wrist, double twist)
          purpose : execute command MI of the arm
 boolean mideg(double waist, double shoulder, double elbow, double wrist, double twist)
          purpose : execute command MI of the arm
 boolean openWindow()
          purpose : create an output window
 boolean openWindow(int usize, int vsize)
          purpose : create an output window
 void ready()
          purpose : set the arm to ready position
 boolean speed(int value)
          purpose : execute the command SPEED of the arm
 
Methods inherited from class CRSPlusA150
degToRad, move, radToDeg
 
Methods inherited from class DHSystem
changeA, changeAlpha, changeD, changeTheta, getA, getAlpha, getD, getFramePosition, getTheta, getTransformation, reset, setDH
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArmSimulator

public ArmSimulator()
Default constructor purpose : initialize the simulator
Method Detail

openWindow

public boolean openWindow()
purpose : create an output window
Returns:
true (succeed) or false (fail)

openWindow

public boolean openWindow(int usize,
                          int vsize)
purpose : create an output window
Returns:
true (succeed) or false (fail)

getCanvas

public Pic3DCanvas getCanvas(int usize,
                             int vsize)
get the output canvas
Parameters:
usize - total number of pixels of the output canvas horizontally
vsize - total number of pixels of the output canvas vertically
Returns:
output Pic3DCanvas

home

public void home()
purpose : home the arm
Overrides:
home in class CRSPlusA150

ready

public void ready()
purpose : set the arm to ready position
Overrides:
ready in class CRSPlusA150

ma

public boolean ma(double waist,
                  double shoulder,
                  double elbow,
                  double wrist,
                  double twist)
purpose : execute the command MA of the arm
Parameters:
waist - waist angle in radian
shoulder - shoulder angle in radian
elbow - elbow angle in radian
wrist - wrist's bend angle in radian
twist - wrist's twist angle in radian
Returns:
true (succeed) or false (fail)
Overrides:
ma in class CRSPlusA150

madeg

public boolean madeg(double waist,
                     double shoulder,
                     double elbow,
                     double wrist,
                     double twist)
purpose : execute the command MA of the arm
Parameters:
waist - waist angle in degree
shoulder - shoulder angle in degree
elbow - elbow angle in degree
wrist - wrist's bend angle in degree
twist - wrist's twist angle in degree
Returns:
true (succeed) or false (fail)
Overrides:
madeg in class CRSPlusA150

mi

public boolean mi(double waist,
                  double shoulder,
                  double elbow,
                  double wrist,
                  double twist)
purpose : execute command MI of the arm
Parameters:
waist - increment of waist angle in radian
shoulder - increment of shoulder angle in radian
elbow - increment of elbow angle in radian
wrist - increment of wrist's bend angle in radian
twist - increment of wrist's twist angle in radian
Returns:
true (succeed) or false (fail)
Overrides:
mi in class CRSPlusA150

mideg

public boolean mideg(double waist,
                     double shoulder,
                     double elbow,
                     double wrist,
                     double twist)
purpose : execute command MI of the arm
Parameters:
waist - increment of waist angle in degree
shoulder - increment of shoulder angle in degree
elbow - increment of elbow angle in degree
wrist - increment of wrist's bend angle in degree
twist - increment of wrist's twist angle in degree
Returns:
true (succeed) or false (fail)
Overrides:
mideg in class CRSPlusA150

grip

public boolean grip(double width)
purpose : execute the command GRIP of the arm
Parameters:
width - width between the fingers of the gripper in inch
Returns:
true (succeed) or false (fail)
Overrides:
grip in class CRSPlusA150

speed

public boolean speed(int value)
purpose : execute the command SPEED of the arm
Parameters:
value - speed of the arm
Returns:
true (succeed) or false (fail)
Overrides:
speed in class CRSPlusA150