69 Command, std::remove_reference_t<T>>>>
72 this, std::forward<T>(defaultCommand));
132 std::function<
void()>
end);
142 std::function<
void()>
end);
A state machine representing a complete action to be performed by the robot.
Definition: Command.h:47
A wrapper around std::unique_ptr<Command> so commands have move-only semantics.
Definition: CommandPtr.h:28
static CommandScheduler & GetInstance()
Returns the Scheduler instance.
void SetDefaultCommand(Subsystem *subsystem, T &&defaultCommand)
Sets the default command for a subsystem.
Definition: CommandScheduler.h:180
A robot subsystem.
Definition: Subsystem.h:39
void SetDefaultCommand(T &&defaultCommand)
Sets the default Command of the subsystem.
Definition: Subsystem.h:70
void SetDefaultCommand(CommandPtr &&defaultCommand)
Sets the default Command of the subsystem.
Command * GetCurrentCommand() const
Returns the command currently running on this subsystem.
void Register()
Registers this subsystem with the CommandScheduler, allowing its Periodic() method to be called when ...
CommandPtr RunOnce(std::function< void()> action)
Constructs a command that runs an action once and finishes.
CommandPtr RunEnd(std::function< void()> run, std::function< void()> end)
Constructs a command that runs an action every iteration until interrupted, and then runs a second ac...
virtual void SimulationPeriodic()
This method is called periodically by the CommandScheduler.
virtual void Periodic()
This method is called periodically by the CommandScheduler.
CommandPtr StartEnd(std::function< void()> start, std::function< void()> end)
Constructs a command that runs an action once and another action when the command is interrupted.
Command * GetDefaultCommand() const
Gets the default command for this subsystem.
CommandPtr Run(std::function< void()> action)
Constructs a command that runs an action every iteration until interrupted.
typename std::enable_if< B, T >::type enable_if_t
Definition: core.h:298
static EIGEN_DEPRECATED const end_t end
Definition: IndexedViewHelper.h:181
Definition: RamseteCommand.h:25