Class AR_PIDController

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

public class AR_PIDController extends Object
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

    Constructors
    Constructor
    Description
    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.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    loop(int target, int iCurrentState, int iLastState)
    This function takes a target value and moves the joint to that position.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 value
      iD - Passed in d value
      iF - 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.