commands2 Package

commands2 functions

Command()

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

CommandBase()

A Sendable base class for Commands.

CommandGroupBase()

A base for CommandGroups.

CommandScheduler

The scheduler responsible for running Commands.

CommandState(*args, **kwargs)

Class that holds scheduling state for a command.

ConditionalCommand(onTrue, onFalse, …)

Runs one of two commands, depending on the value of the given condition when this command is initialized.

FunctionalCommand(*args, **kwargs)

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

InstantCommand(*args, **kwargs)

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

MecanumControllerCommand(*args, **kwargs)

A command that uses two PID controllers ({@link PIDController}) and a ProfiledPIDController ({@link ProfiledPIDController}) to follow a trajectory {@link Trajectory} with a mecanum drive.

NotifierCommand(toRun, None], period, …)

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

PIDCommand(*args, **kwargs)

A command that controls an output with a PIDController.

PIDSubsystem(controller, initialPosition)

A subsystem that uses a PIDController to control an output.

ParallelCommandGroup(*args, **kwargs)

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

ParallelDeadlineGroup(*args, **kwargs)

A CommandGroup 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 CommandGroup that runs a set of commands in parallel, ending when any one of the commands ends and interrupting all the others.

PerpetualCommand(command)

A command that runs another command in perpetuity, ignoring that command’s end conditions.

PrintCommand(message)

A command that prints a string when initialized.

ProfiledPIDCommand(*args, **kwargs)

A command that controls an output with a ProfiledPIDController.

ProfiledPIDSubsystem(controller, initialPosition)

A subsystem that uses a ProfiledPIDController to control an output.

ProxyScheduleCommand(*args, **kwargs)

Schedules the given commands when this command is initialized, and ends when all the commands are no longer scheduled.

RamseteCommand(*args, **kwargs)

A command that uses a RAMSETE controller to follow a trajectory with a differential drive.

RunCommand(*args, **kwargs)

A command that runs a Runnable continuously.

ScheduleCommand(*args, **kwargs)

Schedules the given commands when this command is initialized.

SequentialCommandGroup(*args, **kwargs)

A CommandGroups that runs a list of commands in sequence.

StartEndCommand(*args, **kwargs)

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

Subsystem()

A robot subsystem.

SubsystemBase()

A base for subsystems that handles registration in the constructor, and provides a more intuitive method for setting the default command.

Swerve2ControllerCommand(*args, **kwargs)

A command that uses two PID controllers ({@link PIDController}) and a ProfiledPIDController ({@link ProfiledPIDController}) to follow a trajectory {@link Trajectory} with a swerve drive.

Swerve3ControllerCommand(*args, **kwargs)

A command that uses two PID controllers ({@link PIDController}) and a ProfiledPIDController ({@link ProfiledPIDController}) to follow a trajectory {@link Trajectory} with a swerve drive.

Swerve4ControllerCommand(*args, **kwargs)

A command that uses two PID controllers ({@link PIDController}) and a ProfiledPIDController ({@link ProfiledPIDController}) to follow a trajectory {@link Trajectory} with a swerve drive.

Swerve6ControllerCommand(*args, **kwargs)

A command that uses two PID controllers ({@link PIDController}) and a ProfiledPIDController ({@link ProfiledPIDController}) to follow a trajectory {@link Trajectory} with a swerve drive.

TimedCommandRobot()

TimedCommandRobot implements the IterativeRobotBase robot program framework.

TrapezoidProfileCommand(profile, output, …)

A command that runs a TrapezoidProfile.

TrapezoidProfileCommandRadians(profile, …)

A command that runs a TrapezoidProfile.

TrapezoidProfileSubsystem(constraints, …)

A subsystem that generates and runs trapezoidal motion profiles automatically.

TrapezoidProfileSubsystemRadians(…)

A subsystem that generates and runs trapezoidal motion profiles automatically.

Trigger(*args, **kwargs)

A class used to bind command scheduling to events.

WaitCommand(duration)

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

WaitUntilCommand(*args, **kwargs)

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