Package edu.wpi.first.wpilibj2.command
Class ProfiledPIDSubsystem
java.lang.Object
edu.wpi.first.wpilibj2.command.SubsystemBase
edu.wpi.first.wpilibj2.command.ProfiledPIDSubsystem
@Deprecated(forRemoval=true,
since="2025")
public abstract class ProfiledPIDSubsystem
extends SubsystemBase
Deprecated, for removal: This API element is subject to removal in a future version.
Use a ProfiledPIDController instead
A subsystem that uses a
ProfiledPIDController
to control an output. The controller is run
synchronously from the subsystem's periodic() method.
This class is provided by the NewCommands VendorDep
-
Field Summary
Modifier and TypeFieldDescriptionprotected final ProfiledPIDController
Deprecated, for removal: This API element is subject to removal in a future version.Profiled PID controller.protected boolean
Deprecated, for removal: This API element is subject to removal in a future version.Whether the profiled PID controller output is enabled. -
Constructor Summary
ConstructorDescriptionProfiledPIDSubsystem
(ProfiledPIDController controller) Deprecated, for removal: This API element is subject to removal in a future version.Creates a new ProfiledPIDSubsystem.ProfiledPIDSubsystem
(ProfiledPIDController controller, double initialPosition) Deprecated, for removal: This API element is subject to removal in a future version.Creates a new ProfiledPIDSubsystem. -
Method Summary
Modifier and TypeMethodDescriptionvoid
disable()
Deprecated, for removal: This API element is subject to removal in a future version.Disables the PID control.void
enable()
Deprecated, for removal: This API element is subject to removal in a future version.Enables the PID control.Deprecated, for removal: This API element is subject to removal in a future version.Returns the ProfiledPIDController.protected abstract double
Deprecated, for removal: This API element is subject to removal in a future version.Returns the measurement of the process variable used by the ProfiledPIDController.boolean
Deprecated, for removal: This API element is subject to removal in a future version.Returns whether the controller is enabled.void
periodic()
Deprecated, for removal: This API element is subject to removal in a future version.This method is called periodically by theCommandScheduler
.final void
setGoal
(double goal) Deprecated, for removal: This API element is subject to removal in a future version.Sets the goal state for the subsystem.final void
Deprecated, for removal: This API element is subject to removal in a future version.Sets the goal state for the subsystem.protected abstract void
useOutput
(double output, TrapezoidProfile.State setpoint) Deprecated, for removal: This API element is subject to removal in a future version.Uses the output from the ProfiledPIDController.Methods inherited from class edu.wpi.first.wpilibj2.command.SubsystemBase
addChild, getName, getSubsystem, initSendable, setName, setSubsystem
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface edu.wpi.first.wpilibj2.command.Subsystem
defer, getCurrentCommand, getDefaultCommand, register, removeDefaultCommand, run, runEnd, runOnce, setDefaultCommand, simulationPeriodic, startEnd, startRun
-
Field Details
-
m_controller
Deprecated, for removal: This API element is subject to removal in a future version.Profiled PID controller. -
m_enabled
Deprecated, for removal: This API element is subject to removal in a future version.Whether the profiled PID controller output is enabled.
-
-
Constructor Details
-
ProfiledPIDSubsystem
Deprecated, for removal: This API element is subject to removal in a future version.Creates a new ProfiledPIDSubsystem.- Parameters:
controller
- the ProfiledPIDController to useinitialPosition
- the initial goal position of the controller
-
ProfiledPIDSubsystem
Deprecated, for removal: This API element is subject to removal in a future version.Creates a new ProfiledPIDSubsystem. Initial goal position is zero.- Parameters:
controller
- the ProfiledPIDController to use
-
-
Method Details
-
periodic
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:Subsystem
This method is called periodically by theCommandScheduler
. Useful for updating subsystem-specific state that you don't want to offload to aCommand
. Teams should try to be consistent within their own codebases about which responsibilities will be handled by Commands, and which will be handled here. -
getController
Deprecated, for removal: This API element is subject to removal in a future version.Returns the ProfiledPIDController.- Returns:
- The controller.
-
setGoal
Deprecated, for removal: This API element is subject to removal in a future version.Sets the goal state for the subsystem.- Parameters:
goal
- The goal state for the subsystem's motion profile.
-
setGoal
Deprecated, for removal: This API element is subject to removal in a future version.Sets the goal state for the subsystem. Goal velocity assumed to be zero.- Parameters:
goal
- The goal position for the subsystem's motion profile.
-
useOutput
Deprecated, for removal: This API element is subject to removal in a future version.Uses the output from the ProfiledPIDController.- Parameters:
output
- the output of the ProfiledPIDControllersetpoint
- the setpoint state of the ProfiledPIDController, for feedforward
-
getMeasurement
Deprecated, for removal: This API element is subject to removal in a future version.Returns the measurement of the process variable used by the ProfiledPIDController.- Returns:
- the measurement of the process variable
-
enable
Deprecated, for removal: This API element is subject to removal in a future version.Enables the PID control. Resets the controller. -
disable
Deprecated, for removal: This API element is subject to removal in a future version.Disables the PID control. Sets output to zero. -
isEnabled
Deprecated, for removal: This API element is subject to removal in a future version.Returns whether the controller is enabled.- Returns:
- Whether the controller is enabled.
-