Package org.firstinspires.ftc.teamcode
Class AR_PIDController
java.lang.Object
org.firstinspires.ftc.teamcode.AR_PIDController
This class creates a PID Controller to use with each joint.
Instantiate this class for each JOINT in the ARM object.
Creation Date: 11/3/2024
-
Constructor Summary
ConstructorsConstructorDescriptionAR_PIDController(com.qualcomm.robotcore.eventloop.opmode.LinearOpMode iBot, com.qualcomm.robotcore.hardware.DcMotor iMotor, String iJointName, double iP, double iI, double iD, double iF) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidloop(int target, int iCurrentState, int iLastState) This function takes a target value and moves the joint to that position.
-
Constructor Details
-
AR_PIDController
public AR_PIDController(com.qualcomm.robotcore.eventloop.opmode.LinearOpMode iBot, com.qualcomm.robotcore.hardware.DcMotor iMotor, String iJointName, double iP, double iI, double iD, double iF) Constructor. Perform the setup of the PID Controller. // ToDo: We are passing in the PID values here but I still think there needs to be some customizations for our particular usage with double joints, built off of each other.- Parameters:
iBot- Object to OpMode so you can access HardwareMap, etc.iMotor- Motor object that is being used in the joint.iJointName- Name of Object to OpMode so you can access HardwareMap, etc.iP- Passed in p value.iI- Passed in i valueiD- Passed in d valueiF- Passed in f value
-
-
Method Details
-
loop
public void loop(int target, int iCurrentState, int iLastState) This function takes a target value and moves the joint to that position.- Parameters:
target- Value that the joint should move to.iLastState- The last state of the Arm.
-