Class AR_Arm

java.lang.Object
org.firstinspires.ftc.teamcode.AR_Arm

public class AR_Arm extends Object
This class create an AR_Arm object that is used to encapsulate all the code used to control and use the 2024-2025 Aerospace Robotics Robot Arm. Instantiate that class for each AR_Arm (Currently just one in our design). Creation Date: 11/3/2024
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static int
     
    static double
     
    static double
     
    static int
     
    static double
     
    static double
     
    static int
    Angle of first Joint Active Position
    static int
    Angle of first Joint Deploy Position
    static int
    Angle of first Joint Grab Position
    static int
    Currently, the arm's rest is at approx.
    static int
    Angle of first Joint Starting Position
    static int
     
    static double
     
    static double
     
    static double
     
    static double
     
    static int
    Angle of second Joint Active Position
    static int
    Angle of second Joint Deploy Position
    static int
    Angle of second Joint Grab Position
    static int
    Angle of second Joint Starting Position
    static int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    AR_Arm(com.qualcomm.robotcore.eventloop.opmode.LinearOpMode iBot)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Return immediately and sets the arm joint angles to the preset ready to travel position.
    void
    setArmCustomPos(int firstJoint, int secondJoint)
    Return immediately and sets the arm joint angles to a custom value.
    void
    Return immediately and sets the arm joint angles to the preset location for deploying a specimen into the upper hopper.
    void
    Return immediately and ets the arm joint angles to the preset location for picking up a specimen.
    void
    Return immediately and sets the arm joint angles to the start position.
    void
    Return immediately and moves the joints to the desired location.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • FIRST_JOINT_REST_ANGLE

      public static int FIRST_JOINT_REST_ANGLE
      Currently, the arm's rest is at approx. 43 degree up pointing straight down. That mean gravity is working the most against the arm (horizontal) at -47 from the rest. So to make the angle align with more realistic angles. the rest should be at 43 degree instead of 0.
    • FIRST_JOINT_START

      public static int FIRST_JOINT_START
      Angle of first Joint Starting Position
    • SECOND_JOINT_START

      public static int SECOND_JOINT_START
      Angle of second Joint Starting Position
    • FIRST_JOINT_ACTIVE

      public static int FIRST_JOINT_ACTIVE
      Angle of first Joint Active Position
    • SECOND_JOINT_ACTIVE

      public static int SECOND_JOINT_ACTIVE
      Angle of second Joint Active Position
    • FIRST_JOINT_DEPLOY

      public static int FIRST_JOINT_DEPLOY
      Angle of first Joint Deploy Position
    • SECOND_JOINT_DEPLOY

      public static int SECOND_JOINT_DEPLOY
      Angle of second Joint Deploy Position
    • FIRST_JOINT_GRAB

      public static int FIRST_JOINT_GRAB
      Angle of first Joint Grab Position
    • SECOND_JOINT_GRAB

      public static int SECOND_JOINT_GRAB
      Angle of second Joint Grab Position
    • P1

      public static double P1
    • I1

      public static double I1
    • D1

      public static double D1
    • F1

      public static double F1
    • P2

      public static double P2
    • I2

      public static double I2
    • D2

      public static double D2
    • F2

      public static double F2
    • START

      public static int START
    • ACTIVE

      public static int ACTIVE
    • GRAB

      public static int GRAB
    • DEPLOY

      public static int DEPLOY
  • Constructor Details

    • AR_Arm

      public AR_Arm(com.qualcomm.robotcore.eventloop.opmode.LinearOpMode iBot)
      Constructor. Gets the arm ready for moving.
      Parameters:
      iBot - Handle to the LinearOpMode.
  • Method Details

    • updateArmPos

      public void updateArmPos()
      Return immediately and moves the joints to the desired location.
    • setArmCustomPos

      public void setArmCustomPos(int firstJoint, int secondJoint)
      Return immediately and sets the arm joint angles to a custom value.
      Parameters:
      firstJoint - The position of the first joint in degrees.
      secondJoint - The position of the second joint in degrees.
    • setArmDeployPos

      public void setArmDeployPos()
      Return immediately and sets the arm joint angles to the preset location for deploying a specimen into the upper hopper.
    • setArmGrabPos

      public void setArmGrabPos()
      Return immediately and ets the arm joint angles to the preset location for picking up a specimen.
    • setArmActivePos

      public void setArmActivePos()
      Return immediately and sets the arm joint angles to the preset ready to travel position.
    • setArmStartPos

      public void setArmStartPos()
      Return immediately and sets the arm joint angles to the start position.