Skip to main content
Using CommandKit inside OpModes is straightforward. The library provides a set of pre-built commands that you can combine and extend to build complex robot behaviors. These commands are designed to be flexible and familiar — especially if you’ve used other command-based frameworks like FTCLib.

Built-In Commands

Command NameDescription
ConditionalCommandRuns one of two commands depending on a condition.
DeadlineCommandGroupRuns multiple commands in parallel, ending when one specific command finishes.
ParallelCommandGroupRuns multiple commands in parallel until all of them finish.
ParallelRaceGroupRuns multiple commands in parallel, but ends when any command finishes.
ProxyCommandDefers command creation until runtime, useful for dynamic behaviors.
RepeatCommandRepeats a command a given number of times (or indefinitely).
RunnableCommandWraps a lambda or function as a one-off command.
SequentialCommandGroupRuns a list of commands in sequence, one after the other.
SwitchCommandChooses which command to run at runtime based on a key or condition.
WaitCommandWaits for a fixed amount of time before finishing.
WaitUntilCommandWaits until a condition is met before finishing.

These building blocks let you focus on describing what your robot should do, instead of writing boilerplate control logic for every loop in your OpMode.

Command-Based OpModes

CommandKit ships with generic command-based extensions of the default FTC LinearOpMode. If you don’t want to create your own abstract OpMode base, you can use one of these directly:
  • CommandOpMode – A Java-friendly base OpMode that integrates with the CommandScheduler.
  • DSLOpMode – A Kotlin-friendly base OpMode that provides a DSL for defining and scheduling commands.

Example OpModes

@Autonomous(name = "ExampleAuto", group = "CommandKit")
public class ExampleAuto extends CommandOpMode {

    @Override
    public void prerun() {
        telemetry.addLine("Initialized, waiting for start...");
        telemetry.update();
    }

    @Override
    public void run() {
        Command autoSequence = new SequentialCommandGroup(
            new RunnableCommand(() -> {
                telemetry.addLine("Step 1: Drive forward");
                telemetry.update();
            }, true),
            new WaitCommand(2 * 1000),
            new RunnableCommand(() -> {
                telemetry.addLine("Step 2: Turn right");
                telemetry.update();
            }, true),
            new WaitCommand(1.5 * 1000),
            new RunnableCommand(() -> {
                telemetry.addLine("Step 3: Place game piece");
                telemetry.update();
            }, true)
        );

        schedule(autoSequence);
    }

    @Override
    public void end() {
        telemetry.addLine("Autonomous finished!");
        telemetry.update();
    }
}
We do not provide built-in Gamepad support. This is intentional: we want you to have complete control over your gamepad mappings and configurations. Every team’s needs are different. You might want multiple gamepad layers, custom input handling, or integration with coroutines. By leaving this open-ended, CommandKit allows you to build a custom gamepad extension tailored to your specific requirements.