Skip to content

Library for easily leveraging in-the-box FTC mechanisms and sensors

License

Notifications You must be signed in to change notification settings

Collegiate-Edu-Nation/easy-ftc

Repository files navigation

easy-ftc

Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge

Library for easily leveraging in-the-box FTC mechanisms and sensors, including

Name Type
Arm Motor Mechanism
Claw Servo Mechanism
Drive Motor Mechanism
Intake Motor Mechanism
Lift Motor Mechanism
Trigger Servo Mechanism
Color Sensor
Distance Sensor
Touch Sensor

Overview

What does this do?

This library greatly simplifies the implementation of common FTC robotics subsystems and features by abstracting away low-level decisions and providing a simplified, façade pattern API. As such, users will only need to use a few methods (command(), control(), and state()) due to a reliance on sane defaults and the builder design pattern

Who is this for?

The target audience is beginner-level FTC teams and hobbyists, but even advanced users can elect to utilize easy-ftc à la carte (e.g. leverage easy-ftc for peripheral devices so you can focus on more complex features like motion planning)

Features

  • Encoders can be used with minimal setup for either time- or distance-based commands
  • Arm, Intake, and Lift optionally feature encoder limits on range-of-motion
  • ROBOT and FIELD-centric driving are supported for MECANUM
  • TANK and ARCADE are supported for DIFFERENTIAL
  • Servo-powered mechanisms can optionally leverage smooth-servo control
  • Lift and Drive optionally feature gamepad deadzones, mitigating stick/trigger drift

Docs

Deployed at https://collegiate-edu-nation.github.io/easy-ftc
Cover Getting Started, Examples, Controls, Naming, Diagrams, and the Javadoc

Install

Download release archive

OnBot Java

  • Upload the .aar using OnBot Java's GUI
  • Press the gear icon on the bottom right with the title 'Build Everything'

Android Studio

  • Add the .aar to FtcRobotController/libs/

  • Add implementation to TeamCode's build.gradle like so

    dependencies {
        implementation project(':FtcRobotController')
        implementation files('../libs/easy-ftc-release.aar')
    }

Blockly

  • While at the previous link, also click on myBlocks.zip
  • Upload the .aar and all relevant Java files from myBlocks using OnBot Java's GUI
    • Each Java file in myBlocks/ will control a specific mechanism/sensor
  • Modify the myBlocks Java files to change behavior
    • e.g. add .layout(Layout.ARCADE) to Drive.Builder in Drive.java
  • Press the gear icon on the bottom right with the title 'Build Everything'
  • A new menu option 'Java Classes' should be visible in the Blockly GUI now
  • Each class listed there will provide relevant methods from easy-ftc, like control(), command(), and state()

Contributing

CONTRIBUTING.md

License

GPLv3