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.

ConditionalCommand(onTrue, onFalse, condition)

A command composition that 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 (PIDController) and a profiled PID controller (ProfiledPIDController) to follow a trajectory (Trajectory) with a mecanum drive.

NotifierCommand(toRun, period[, requirements])

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 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.

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[, ...])

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.

RepeatCommand(command)

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 Runnable 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 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 (PIDController) and a profiled PID controller (ProfiledPIDController) to follow a trajectory (Trajectory) with a swerve drive.

Swerve3ControllerCommand(*args, **kwargs)

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

Swerve4ControllerCommand(*args, **kwargs)

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

Swerve6ControllerCommand(*args, **kwargs)

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

TimedCommandRobot([period])

TimedCommandRobot implements the IterativeRobotBase robot program framework.

TrapezoidProfileCommand(profile, output[, ...])

A command that runs a TrapezoidProfile.

TrapezoidProfileCommandRadians(profile, output)

A command that runs a TrapezoidProfile.

TrapezoidProfileSubsystem(constraints[, ...])

A subsystem that generates and runs trapezoidal motion profiles automatically.

TrapezoidProfileSubsystemRadians(constraints)

A subsystem that generates and runs trapezoidal motion profiles automatically.

Trigger(*args, **kwargs)

This class provides an easy way to link commands to conditions.

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.