Package org.firstinspires.ftc.teamcode
Class AR_Arm
java.lang.Object
org.firstinspires.ftc.teamcode.AR_Arm
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
FieldsModifier and TypeFieldDescriptionstatic intstatic doublestatic doublestatic intstatic doublestatic doublestatic intAngle of first Joint Active Positionstatic intAngle of first Joint Deploy Positionstatic intAngle of first Joint Grab Positionstatic intCurrently, the arm's rest is at approx.static intAngle of first Joint Starting Positionstatic intstatic doublestatic doublestatic doublestatic doublestatic intAngle of second Joint Active Positionstatic intAngle of second Joint Deploy Positionstatic intAngle of second Joint Grab Positionstatic intAngle of second Joint Starting Positionstatic int -
Constructor Summary
ConstructorsConstructorDescriptionAR_Arm(com.qualcomm.robotcore.eventloop.opmode.LinearOpMode iBot) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidReturn immediately and sets the arm joint angles to the preset ready to travel position.voidsetArmCustomPos(int firstJoint, int secondJoint) Return immediately and sets the arm joint angles to a custom value.voidReturn immediately and sets the arm joint angles to the preset location for deploying a specimen into the upper hopper.voidReturn immediately and ets the arm joint angles to the preset location for picking up a specimen.voidReturn immediately and sets the arm joint angles to the start position.voidReturn immediately and moves the joints to the desired location.
-
Field Details
-
FIRST_JOINT_REST_ANGLE
public static int FIRST_JOINT_REST_ANGLECurrently, 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_STARTAngle of first Joint Starting Position -
SECOND_JOINT_START
public static int SECOND_JOINT_STARTAngle of second Joint Starting Position -
FIRST_JOINT_ACTIVE
public static int FIRST_JOINT_ACTIVEAngle of first Joint Active Position -
SECOND_JOINT_ACTIVE
public static int SECOND_JOINT_ACTIVEAngle of second Joint Active Position -
FIRST_JOINT_DEPLOY
public static int FIRST_JOINT_DEPLOYAngle of first Joint Deploy Position -
SECOND_JOINT_DEPLOY
public static int SECOND_JOINT_DEPLOYAngle of second Joint Deploy Position -
FIRST_JOINT_GRAB
public static int FIRST_JOINT_GRABAngle of first Joint Grab Position -
SECOND_JOINT_GRAB
public static int SECOND_JOINT_GRABAngle 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.
-