commands2 Package

Command()

A state machine representing a complete action to be performed by the robot.

CommandScheduler()

The scheduler responsible for running Commands.

ConditionalCommand(*args, **kwargs)

A command composition that runs one of two commands, depending on the value of the given condition when this command is initialized.

DeferredCommand(*args, **kwargs)

Defers Command construction to runtime.

FunctionalCommand(*args, **kwargs)

A command that allows the user to pass in functions for each of the basic command methods through the constructor.

IllegalCommandUse(msg, **kwargs)

This exception is raised when a command is used in a way that it shouldn't be.

InstantCommand(*args, **kwargs)

A Command that runs instantly; it will initialize, execute once, and end on the same iteration of the scheduler.

InterruptionBehavior(value[, names, module, ...])

An enum describing the command's behavior when another command with a shared requirement is scheduled.

NotifierCommand(*args, **kwargs)

A command that starts a notifier to run the given Callable periodically in a separate thread.

PIDCommand(*args, **kwargs)

A command that controls an output with a wpimath.controller.PIDController.

PIDSubsystem(*arg, **kwargs)

A subsystem that uses a wpimath.controller.PIDController to control an output.

ParallelCommandGroup(*args, **kwargs)

A command composition that runs a set of commands in parallel, ending when the last command ends.

ParallelDeadlineGroup(*args, **kwargs)

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.

ParallelRaceGroup(*args, **kwargs)

A composition that runs a set of commands in parallel, ending when any one of the commands ends and interrupting all the others.

PrintCommand(*args, **kwargs)

A command that prints a string when initialized.

ProfiledPIDCommand(*args, **kwargs)

A command that controls an output with a ProfiledPIDController.

ProfiledPIDSubsystem(*arg, **kwargs)

A subsystem that uses a wpimath.controller.ProfiledPIDController or wpimath.controller.ProfiledPIDControllerRadians to control an output.

ProxyCommand()

Schedules the given command when this command is initialized, and ends when it ends.

RepeatCommand(*args, **kwargs)

A command that runs another command repeatedly, restarting it when it ends, until this command is interrupted.

RunCommand(*args, **kwargs)

A command that runs a Callable continuously.

ScheduleCommand(*args, **kwargs)

Schedules the given commands when this command is initialized.

SelectCommand(*args, **kwargs)

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.

SequentialCommandGroup(*args, **kwargs)

A command composition that runs a list of commands in sequence.

StartEndCommand(*args, **kwargs)

A command that runs a given Callable when it is initialized, and another Callable when it ends.

Subsystem()

A robot subsystem.

SwerveControllerCommand(*args, **kwargs)

A command that uses two PID controllers (wpimath.controller.PIDController) and a HolonomicDriveController (wpimath.controller.HolonomicDriveController) to follow a trajectory (wpimath.trajectory.Trajectory) with a swerve drive.

TimedCommandRobot([period])

Constructor for TimedRobot.

TrapezoidProfileCommand(*args, **kwargs)

A command that runs a wpimath.trajectory.TrapezoidProfile.

TrapezoidProfileSubsystem(*arg, **kwargs)

A subsystem that generates and runs trapezoidal motion profiles automatically.

WaitCommand(*args, **kwargs)

A command that does nothing but takes a specified amount of time to finish.

WaitUntilCommand()

A command that does nothing but ends after a specified match time or condition.

WrapperCommand(*args, **kwargs)

A class used internally to wrap commands while overriding a specific method; all other methods will call through to the wrapped command.