External Libraries in FTC

intermediate25 min

Understanding External Libraries in FTC

External libraries are JARs or Gradle dependencies you add to TeamCode. They package patterns—command scheduling, math, path following—that teams would otherwise rewrite each season.

Why Use External Libraries?

  • Time: Reuse tested abstractions instead of building everything from scratch.
  • Reliability: Popular libraries are exercised by many teams; bugs get reported and fixed.
  • Features: Access path planning, command-based structure, and utilities beyond the bare SDK.
  • Community: Docs, Discord servers, and example repos speed up onboarding.
  • Learning: Reading library source shows how experienced teams structure projects.

Library Integration Considerations

Before you adopt a library, ask:

  • Learning curve: Can your team learn it this season?
  • Documentation: Are setup steps and examples current for your SDK?
  • Community: Is help available when you are stuck at 11 p.m. before a meet?
  • Updates: Does the project release for new FTC SDK versions?
  • Compatibility: Does it match your min SDK and Gradle setup?
  • Performance: Will it fit in your OpMode loop budget on the Control Hub?

FTC Library Comparison

The sections below summarize common choices. None is mandatory; many winning teams use only the SDK.

TRCLib Deep Dive

TRCLib is a command-based framework modeled on FRC-style subsystems and commands.

Key features:

  • Command-based organization (commands, subsystems, schedulers)
  • State helpers and telemetry hooks
  • Large example set and long-running community

When to consider it: multi-subsystem robots, mentors who want FRC-like structure, or teams planning to grow code complexity over years.

NextFTC Deep Dive

NextFTC is a newer framework with a smaller surface area than full TRCLib.

Key features:

  • Modern Kotlin/Java-friendly APIs
  • Built-in helpers for common FTC tasks
  • Documentation aimed at intermediate teams

When to consider it: you want structure without the heaviest command framework, or you prefer readable APIs over maximum flexibility.

Dairy Deep Dive

Dairy is a utility library, not a full robot framework.

Key features:

  • Small footprint; import only what you need
  • Helpers for math, units, and repetitive SDK boilerplate
  • Easy to mix with your own architecture

When to consider it: you like writing your own OpMode flow but want vetted math and utilities.

SolversLib Deep Dive

SolversLib focuses on motion control and path following math.

Key features:

  • Trajectory and path tooling
  • Control-theory-oriented APIs
  • Tuned for autonomous movement

When to consider it: autonomous performance is the priority and you already understand odometry and PID basics.

FTCLib Deep Dive

FTCLib bundles a wide set of features—commands, vision helpers, math, and more—in one project.

Key features:

  • Broad feature set in a single dependency
  • Active releases aligned with FTC seasons
  • Large user community

When to consider it: you want one ecosystem for most robot software rather than stitching several small libs.

Making the Right Choice

Beginners: Start with SDK-only or Dairy-style utilities; add a framework when teleop and basic auto are stable.

Intermediate: NextFTC or TRCLib depending on whether you want a lighter or more FRC-like model.

Advanced: TRCLib, FTCLib, or SolversLib for movement; you may combine a framework with a motion library for auto.

Match the library to this year’s robot goals—not every library on the list.

Integration Best Practices

Setup

  • Follow the library’s official Gradle steps for your FTC SDK version.
  • Build a hello-world OpMode before porting the whole robot.
  • Commit or branch before large merges.

Development

  • Port one subsystem at a time.
  • Keep team-specific logic in your packages; avoid forking vendor code when possible.
  • Document version numbers in README or team wiki.

Testing

  • Bench-test new library code at low power.
  • Have a fallback OpMode without the library for competition day.
  • Update when the library ships SDK-compatible releases—not mid-meet unless required.

Library Evaluation Exercise

Evaluate which library would be best for your team's current robot design and programming experience level.

  • List your robot’s main subsystems and features
  • Assess your team’s programming experience level
  • Identify your primary development goals (learning, competition performance, etc.)
  • Research the libraries that match your needs
  • Create a simple test project with your chosen library
  • Document your findings and decision process

Further Reading Resources