Skip to content

NextFTC/NextControl

Repository files navigation

NextControl

GitHub Release GitHub Repo stars GitHub last commit

NextControl is an open-source control library for the FIRST Tech Challenge. It provides a robust system for creating any controller imaginable.

The docs are at nextftc.dev/control.

Getting Started

Prerequisites

Ensure you have a copy of FtcRobotController.

Installing

In build.dependencies.gradle, add the dependency:

implementation 'dev.nextftc:control:VERSION'

Replace VERSION with the latest version (shown at the top of this README).

Basic Usage

Create a PID controller:

Kotlin:

val controlSystem = controlSystem {
    posPid(0.005, 0.0, 0.0)
}

Java:

ControlSystem controlSystem = ControlSystem.builder()
        .posPid(0.005, 0, 0)
        .build();

Then every loop set your motor power:

Kotlin:

motor.power = controlSystem.calculate(
    KineticState(motor.position, motor.velocity)
)

Java:

motor.setPower(
        controlSystem.calculate(
                KineticState(motor.getPosition(),motor.

getVelocity())
        )
        );

For more in-depth usage, read the docs.

Built With

  • Kotlin - A modern, expressive, statically typed, general-purpose programming language for the JVM developed by JetBrains and sponsored by Google.
  • Gradle – Powerful build system for automating compilation, testing, and publishing
  • Kotest – Flexible and expressive testing framework for Kotlin
  • MockK – Mocking library for Kotlin

Contributing

Please read our contributing page for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use Semantic Versioning for versioning. For the versions available, see the releases on this repository.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the GNU General Public License v3.0

You are free to use, modify, and distribute this software under the terms of the GPLv3. Any derivative work must also be distributed under the same license.

See the LICENSE for more information.

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages