28template <
class Distance>
 
   30    : 
public CommandHelper<Command, ProfiledPIDCommand<Distance>> {
 
   49  [[deprecated(
"Use a ProfiledPIDController instead")]]
 
   52                     std::function<State()> goalSource,
 
   53                     std::function<
void(
double, State)> useOutput,
 
   59    this->AddRequirements(requirements);
 
 
   73  [[deprecated(
"Use a ProfiledPIDController instead")]]
 
   77                     std::function<
void(
double, State)> useOutput,
 
   80            controller, measurementSource,
 
   81            [goalSource = 
std::move(goalSource)]() {
 
   82              return State{goalSource(), Velocity_t{0}};
 
   84            useOutput, requirements) {}
 
 
   98  [[deprecated(
"Use a ProfiledPIDController instead")]]
 
  100                     std::function<
Distance_t()> measurementSource, State goal,
 
  101                     std::function<
void(
double, State)> useOutput,
 
  104            controller, measurementSource, [goal] { 
return goal; }, useOutput,
 
 
  118  [[deprecated(
"Use a ProfiledPIDController instead")]]
 
  120                     std::function<
Distance_t()> measurementSource,
 
  122                     std::function<
void(
double, State)> useOutput,
 
  125            controller, measurementSource, [goal] { 
return goal; }, useOutput,
 
 
  139  void End(
bool interrupted)
 override {
 
 
 
CRTP implementation to allow polymorphic decorator functions in Command.
Definition CommandHelper.h:25
 
A command that controls an output with a ProfiledPIDController.
Definition ProfiledPIDCommand.h:30
 
ProfiledPIDCommand(ProfiledPIDCommand &&other)=default
 
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 constan...
Definition ProfiledPIDCommand.h:99
 
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 constan...
Definition ProfiledPIDCommand.h:119
 
std::function< Distance_t()> m_measurement
Measurement getter.
Definition ProfiledPIDCommand.h:155
 
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.
Definition ProfiledPIDCommand.h:50
 
std::function< void(double, State)> m_useOutput
Profiled PID controller output consumer.
Definition ProfiledPIDCommand.h:161
 
void Initialize() override
Definition ProfiledPIDCommand.h:132
 
std::function< State()> m_goal
Goal getter.
Definition ProfiledPIDCommand.h:158
 
void Execute() override
Definition ProfiledPIDCommand.h:134
 
void End(bool interrupted) override
Definition ProfiledPIDCommand.h:139
 
frc::ProfiledPIDController< Distance > m_controller
Profiled PID controller.
Definition ProfiledPIDCommand.h:152
 
frc::ProfiledPIDController< Distance > & GetController()
Returns the ProfiledPIDController used by the command.
Definition ProfiledPIDCommand.h:148
 
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.
Definition ProfiledPIDCommand.h:74
 
ProfiledPIDCommand(const ProfiledPIDCommand &other)=default
 
Represents requirements for a command, which is a set of (pointers to) subsystems.
Definition Requirements.h:20
 
Implements a PID control loop whose setpoint is constrained by a trapezoid profile.
Definition ProfiledPIDController.h:34
 
Profile state.
Definition TrapezoidProfile.h:96
 
typename units::detail::compound_impl< U, Us... >::type compound_unit
Represents a unit type made up from other units.
Definition base.h:1438
 
Definition FunctionalCommand.h:13
 
Implement std::hash so that hash_code can be used in STL containers.
Definition PointerIntPair.h:280