package Grasping;

import Carmen.*;

/**
 * <p>Clears state of arm by sending 0 pwm to all servos.  Useful while
 * developing to reset the arm between runs.<\p>
 **/

public class ClearArm {

  /**
   * <p>Constructs a ClearArm Object. Sends 0 PWM to all servos and exits<\p>
   */
  public ClearArm() {
    Arm.move(new double[]{0,0,0});
    System.exit(0);
  }


  /**
   * <p>Main application method<\p>
   */
  public static void main(String argv[]) {
    String centralHost = "localhost";
    if (argv.length > 0) {
      centralHost = argv[0];
    }
    System.err.println("Initializing ClearArm");
    Robot.initialize("ClearArm", centralHost);
    ClearArm clearArm = new ClearArm();
    Robot.dispatch();
  }



}
