WPILibC++ 2025.3.1
Loading...
Searching...
No Matches
frc2::TrapezoidProfileCommand< Distance > Class Template Reference

A command that runs a TrapezoidProfile. More...

#include <frc2/command/TrapezoidProfileCommand.h>

Inheritance diagram for frc2::TrapezoidProfileCommand< Distance >:
frc2::CommandHelper< Command, TrapezoidProfileCommand< Distance > >

Public Member Functions

 TrapezoidProfileCommand (frc::TrapezoidProfile< Distance > profile, std::function< void(State)> output, std::function< State()> goal, std::function< State()> currentState, Requirements requirements={})
 Creates a new TrapezoidProfileCommand that will execute the given TrapezoidalProfile.
 
void Initialize () override
 
void Execute () override
 
void End (bool interrupted) override
 
bool IsFinished () override
 
- Public Member Functions inherited from frc2::CommandHelper< Command, TrapezoidProfileCommand< Distance > >
 CommandHelper ()=default
 
CommandPtr ToPtr () &&override
 

Detailed Description

template<class Distance>
class frc2::TrapezoidProfileCommand< Distance >

A command that runs a TrapezoidProfile.

Useful for smoothly controlling mechanism motion.

This class is provided by the NewCommands VendorDep

See also
TrapezoidProfile

Constructor & Destructor Documentation

◆ TrapezoidProfileCommand()

template<class Distance >
frc2::TrapezoidProfileCommand< Distance >::TrapezoidProfileCommand ( frc::TrapezoidProfile< Distance > profile,
std::function< void(State)> output,
std::function< State()> goal,
std::function< State()> currentState,
Requirements requirements = {} )
inline

Creates a new TrapezoidProfileCommand that will execute the given TrapezoidalProfile.

Output will be piped to the provided consumer function.

Parameters
profileThe motion profile to execute.
outputThe consumer for the profile output.
goalThe supplier for the desired state
currentStateThe current state
requirementsThe list of requirements.
Deprecated
Use a TrapezoidProfile instead

Member Function Documentation

◆ End()

template<class Distance >
void frc2::TrapezoidProfileCommand< Distance >::End ( bool interrupted)
inlineoverride

◆ Execute()

template<class Distance >
void frc2::TrapezoidProfileCommand< Distance >::Execute ( )
inlineoverride

◆ Initialize()

template<class Distance >
void frc2::TrapezoidProfileCommand< Distance >::Initialize ( )
inlineoverride

◆ IsFinished()

template<class Distance >
bool frc2::TrapezoidProfileCommand< Distance >::IsFinished ( )
inlineoverride

The documentation for this class was generated from the following file: