Introduction
NextFTC is a command-based library for programming FTC robots, written in Kotlin with full support for Java. It’s designed to let you write robot code that’s expressive, reusable, and easy to reason about, without fighting the FTC SDK.
Why NextFTC?
Section titled “Why NextFTC?”Most FTC teams write robot code as a pile of if statements inside a while (opModeIsActive()) loop.
NextFTC replaces that with mechanisms (your subsystems, like an arm or intake) and commands
(actions those subsystems can perform),
and lets you bind them directly to gamepad input:
class Claw : Mechanism { val servo = NextServo("clawServo")
fun open() = instant { servo.position = 0.2 } fun close() = instant { servo.position = 0.8 }}public class Claw implements Mechanism { NextServo servo = new NextServo("clawServo");
public Command open() { return instant(() -> servo.setPosition(0.2)); } public Command close() { return instant(() -> servo.setPosition(0.8)); }}NextFTC uses the Ivy library as its underlying commands framework. If you already use Ivy, you already know NextFTC’s commands. If you don’t, many of the concepts translate cleanly from other command frameworks, including NextFTC v1.
Kotlin and Java
Section titled “Kotlin and Java”NextFTC is written in Kotlin. Every public API is designed to read naturally from Java, and every code sample in these docs is shown in both languages.
Next steps
Section titled “Next steps”Continue to Installation to add NextFTC to your robot project.