WPILibC++ 2024.3.2
|
A command that controls an output with a ProfiledPIDController. More...
#include <frc2/command/ProfiledPIDCommand.h>
Public Member Functions | |
ProfiledPIDCommand (frc::ProfiledPIDController< Distance > controller, std::function< Distance_t()> measurementSource, std::function< State()> goalSource, std::function< void(double, State)> useOutput, Requirements requirements={}) | |
Creates a new PIDCommand, which controls the given output with a ProfiledPIDController. More... | |
ProfiledPIDCommand (frc::ProfiledPIDController< Distance > controller, std::function< Distance_t()> measurementSource, std::function< Distance_t()> goalSource, std::function< void(double, State)> useOutput, Requirements requirements={}) | |
Creates a new PIDCommand, which controls the given output with a ProfiledPIDController. More... | |
ProfiledPIDCommand (frc::ProfiledPIDController< Distance > controller, std::function< Distance_t()> measurementSource, State goal, std::function< void(double, State)> useOutput, Requirements requirements={}) | |
Creates a new PIDCommand, which controls the given output with a ProfiledPIDController with a constant goal. More... | |
ProfiledPIDCommand (frc::ProfiledPIDController< Distance > controller, std::function< Distance_t()> measurementSource, Distance_t goal, std::function< void(double, State)> useOutput, Requirements requirements={}) | |
Creates a new PIDCommand, which controls the given output with a ProfiledPIDController with a constant goal. More... | |
ProfiledPIDCommand (ProfiledPIDCommand &&other)=default | |
ProfiledPIDCommand (const ProfiledPIDCommand &other)=default | |
void | Initialize () override |
void | Execute () override |
void | End (bool interrupted) override |
frc::ProfiledPIDController< Distance > & | GetController () |
Returns the ProfiledPIDController used by the command. More... | |
Public Member Functions inherited from frc2::CommandHelper< Command, ProfiledPIDCommand< Distance > > | |
CommandHelper ()=default | |
CommandPtr | ToPtr () &&override |
Protected Attributes | |
frc::ProfiledPIDController< Distance > | m_controller |
Profiled PID controller. More... | |
std::function< Distance_t()> | m_measurement |
Measurement getter. More... | |
std::function< State()> | m_goal |
Goal getter. More... | |
std::function< void(double, State)> | m_useOutput |
Profiled PID controller output consumer. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from frc2::CommandHelper< Command, ProfiledPIDCommand< Distance > > | |
std::unique_ptr< Command > | TransferOwnership () &&override |
A command that controls an output with a ProfiledPIDController.
Runs forever by default - to add exit conditions and/or other behavior, subclass this class. The controller calculation and output are performed synchronously in the command's execute() method.
This class is provided by the NewCommands VendorDep
|
inline |
Creates a new PIDCommand, which controls the given output with a ProfiledPIDController.
controller | the controller that controls the output. |
measurementSource | the measurement of the process variable |
goalSource | the controller's goal |
useOutput | the controller's output |
requirements | the subsystems required by this command |
|
inline |
Creates a new PIDCommand, which controls the given output with a ProfiledPIDController.
controller | the controller that controls the output. |
measurementSource | the measurement of the process variable |
goalSource | the controller's goal |
useOutput | the controller's output |
requirements | the subsystems required by this command |
|
inline |
Creates a new PIDCommand, which controls the given output with a ProfiledPIDController with a constant goal.
controller | the controller that controls the output. |
measurementSource | the measurement of the process variable |
goal | the controller's goal |
useOutput | the controller's output |
requirements | the subsystems required by this command |
|
inline |
Creates a new PIDCommand, which controls the given output with a ProfiledPIDController with a constant goal.
controller | the controller that controls the output. |
measurementSource | the measurement of the process variable |
goal | the controller's goal |
useOutput | the controller's output |
requirements | the subsystems required by this command |
|
default |
|
default |
|
inlineoverride |
|
inlineoverride |
|
inline |
Returns the ProfiledPIDController used by the command.
|
inlineoverride |
|
protected |
Profiled PID controller.
|
protected |
Goal getter.
|
protected |
Measurement getter.
|
protected |
Profiled PID controller output consumer.