Class ConfigurableProfiledPIDController

java.lang.Object
edu.wpi.first.math.controller.ProfiledPIDController
me.nabdev.oxconfig.sampleClasses.ConfigurableProfiledPIDController
All Implemented Interfaces:
edu.wpi.first.util.sendable.Sendable, ConfigurableClass

public class ConfigurableProfiledPIDController extends edu.wpi.first.math.controller.ProfiledPIDController implements ConfigurableClass
A WPILib ProfiledPIDController that can be configured by OxConfig. This class is an example of implementing ConfigurableClass, but is safe for competition use.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ConfigurableProfiledPIDController(double Kp, double Ki, double Kd, edu.wpi.first.math.trajectory.TrapezoidProfile.Constraints constraints, String key)
    Allocates a ConfigurableProfiledPIDController and registers it to OxConfig with the given constants for kp, ki, and kd and a default period of 0.02 seconds.
    ConfigurableProfiledPIDController(double Kp, double Ki, double Kd, edu.wpi.first.math.trajectory.TrapezoidProfile.Constraints constraints, String key, String prettyName)
    Allocates a ConfigurableProfiledPIDController and registers it to OxConfig with the given constants for kp, ki, and kd and a default period of 0.02 seconds.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the key of the configurable class (e.g.
    Gets the parameters of the configurable class
    Gets the pretty name of the configurable class (e.g.

    Methods inherited from class edu.wpi.first.math.controller.ProfiledPIDController

    atGoal, atSetpoint, calculate, calculate, calculate, calculate, disableContinuousInput, enableContinuousInput, getAccumulatedError, getConstraints, getD, getGoal, getI, getIZone, getP, getPeriod, getPositionError, getPositionTolerance, getSetpoint, getVelocityError, getVelocityTolerance, initSendable, reset, reset, reset, setConstraints, setD, setGoal, setGoal, setI, setIntegratorRange, setIZone, setP, setPID, setTolerance, setTolerance

    Methods inherited from class java.lang.Object

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

    • ConfigurableProfiledPIDController

      public ConfigurableProfiledPIDController(double Kp, double Ki, double Kd, edu.wpi.first.math.trajectory.TrapezoidProfile.Constraints constraints, String key)
      Allocates a ConfigurableProfiledPIDController and registers it to OxConfig with the given constants for kp, ki, and kd and a default period of 0.02 seconds. Unfortunatley, OxConfig is unable to configure the constraints, as they cannot be changed.
      Parameters:
      Kp - The proportional coefficient.
      Ki - The integral coefficient.
      Kd - The derivative coefficient.
      constraints - Velocity and acceleration constraints for goal.
      key - The json key for the controller to be stored in
    • ConfigurableProfiledPIDController

      public ConfigurableProfiledPIDController(double Kp, double Ki, double Kd, edu.wpi.first.math.trajectory.TrapezoidProfile.Constraints constraints, String key, String prettyName)
      Allocates a ConfigurableProfiledPIDController and registers it to OxConfig with the given constants for kp, ki, and kd and a default period of 0.02 seconds. Unfortunatley, OxConfig is unable to configure the constraints, as they cannot be changed.
      Parameters:
      Kp - The proportional coefficient.
      Ki - The integral coefficient.
      Kd - The derivative coefficient.
      constraints - Velocity and acceleration constraints for goal.
      key - The json key for the controller to be stored in
      prettyName - The name to be displayed in the OxConfig GUI
  • Method Details