WPILibC++ 2023.4.3
frc2 Namespace Reference

Namespaces

namespace  cmd
 Namespace for command factories.
 

Classes

class  Button
 A class used to bind command scheduling to button presses. More...
 
class  Command
 A state machine representing a complete action to be performed by the robot. More...
 
class  CommandBase
 A Sendable base class for Commands. More...
 
class  CommandGenericHID
 A subclass of GenericHID with Trigger factories for command-based. More...
 
class  CommandGroupBase
 A base for CommandGroups. More...
 
class  CommandHelper
 CRTP implementation to allow polymorphic decorator functions in Command. More...
 
class  CommandJoystick
 A version of Joystick with Trigger factories for command-based. More...
 
class  CommandPS4Controller
 A version of PS4Controller with Trigger factories for command-based. More...
 
class  CommandPtr
 A wrapper around std::unique_ptr<Command> so commands have move-only semantics. More...
 
class  CommandScheduler
 The scheduler responsible for running Commands. More...
 
class  CommandXboxController
 A version of XboxController with Trigger factories for command-based. More...
 
class  ConditionalCommand
 A command composition that runs one of two commands, depending on the value of the given condition when this command is initialized. More...
 
class  FunctionalCommand
 A command that allows the user to pass in functions for each of the basic command methods through the constructor. More...
 
class  InstantCommand
 A Command that runs instantly; it will initialize, execute once, and end on the same iteration of the scheduler. More...
 
class  JoystickButton
 A class used to bind command scheduling to joystick button presses. More...
 
class  MecanumControllerCommand
 A command that uses two PID controllers (PIDController) and a profiled PID controller (ProfiledPIDController) to follow a trajectory (Trajectory) with a mecanum drive. More...
 
class  NetworkButton
 A Button that uses a NetworkTable boolean field. More...
 
class  NotifierCommand
 A command that starts a notifier to run the given runnable periodically in a separate thread. More...
 
class  ParallelCommandGroup
 A command composition that runs a set of commands in parallel, ending when the last command ends. More...
 
class  ParallelDeadlineGroup
 A command composition that runs a set of commands in parallel, ending only when a specific command (the "deadline") ends, interrupting all other commands that are still running at that point. More...
 
class  ParallelRaceGroup
 A composition that runs a set of commands in parallel, ending when any one of the commands ends and interrupting all the others. More...
 
class  PerpetualCommand
 A command that runs another command in perpetuity, ignoring that command's end conditions. More...
 
class  PIDCommand
 A command that controls an output with a PIDController. More...
 
class  PIDController
 Implements a PID control loop. More...
 
class  PIDSubsystem
 A subsystem that uses a PIDController to control an output. More...
 
class  POVButton
 A class used to bind command scheduling to joystick POV presses. More...
 
class  PrintCommand
 A command that prints a string when initialized. More...
 
class  ProfiledPIDCommand
 A command that controls an output with a ProfiledPIDController. More...
 
class  ProfiledPIDSubsystem
 A subsystem that uses a ProfiledPIDController to control an output. More...
 
class  ProxyCommand
 Schedules the given command when this command is initialized, and ends when it ends. More...
 
class  ProxyScheduleCommand
 Schedules the given commands when this command is initialized, and ends when all the commands are no longer scheduled. More...
 
class  RamseteCommand
 A command that uses a RAMSETE controller to follow a trajectory with a differential drive. More...
 
class  RepeatCommand
 A command that runs another command repeatedly, restarting it when it ends, until this command is interrupted. More...
 
class  RunCommand
 A command that runs a Runnable continuously. More...
 
class  ScheduleCommand
 Schedules the given commands when this command is initialized. More...
 
class  SelectCommand
 A command composition that runs one of a selection of commands, either using a selector and a key to command mapping, or a supplier that returns the command directly at runtime. More...
 
class  SequentialCommandGroup
 A command composition that runs a list of commands in sequence. More...
 
class  StartEndCommand
 A command that runs a given runnable when it is initialized, and another runnable when it ends. More...
 
class  Subsystem
 A robot subsystem. More...
 
class  SubsystemBase
 A base for subsystems that handles registration in the constructor, and provides a more intuitive method for setting the default command. More...
 
class  SwerveControllerCommand
 A command that uses two PID controllers (PIDController) and a profiled PID controller (ProfiledPIDController) to follow a trajectory (Trajectory) with a swerve drive. More...
 
class  TrapezoidProfileCommand
 A command that runs a TrapezoidProfile. More...
 
class  TrapezoidProfileSubsystem
 A subsystem that generates and runs trapezoidal motion profiles automatically. More...
 
class  Trigger
 This class provides an easy way to link commands to conditions. More...
 
class  WaitCommand
 A command that does nothing but takes a specified amount of time to finish. More...
 
class  WaitUntilCommand
 A command that does nothing but ends after a specified match time or condition. More...
 
class  WrapperCommand
 A class used internally to wrap commands while overriding a specific method; all other methods will call through to the wrapped command. More...
 

Functions

template<typename T >
void SetInsert (wpi::SmallVectorImpl< T * > &vector, std::span< T *const > toAdd)
 
template<typename T >
std::string GetTypeName (const T &type)
 
bool RequirementsDisjoint (Command *first, Command *second)
 Checks if two commands have disjoint requirement sets. More...
 

Variables

const size_t invalid_index = std::numeric_limits<size_t>::max()
 

Function Documentation

◆ GetTypeName()

template<typename T >
std::string frc2::GetTypeName ( const T &  type)

◆ RequirementsDisjoint()

bool frc2::RequirementsDisjoint ( Command first,
Command second 
)

Checks if two commands have disjoint requirement sets.

Parameters
firstThe first command to check.
secondThe second command to check.
Returns
False if first and second share a requirement.

◆ SetInsert()

template<typename T >
void frc2::SetInsert ( wpi::SmallVectorImpl< T * > &  vector,
std::span< T *const >  toAdd 
)

Variable Documentation

◆ invalid_index

const size_t frc2::invalid_index = std::numeric_limits<size_t>::max()