Skip to content
Work in progress. This library and its docs are new and still changing, and some parts are not yet tested on a real robot. Something wrong or unclear?Tell us with a short GitHub form.

Every feature of FTC-Helper-Lib

Everything the library does, in plain words, as of version 0.17.4. Most lines link to where the docs explain it.

Parts of the robot

  • Motors and servos in one line. Clear errors at INIT when a name in the configuration is wrong. A servo can use its full turn. Hardware
  • Buttons made easy. Tap, hold, double-tap, tap then hold, pairs and buzzes, several on one button. Every library button can be moved or turned off. The button menu
  • Mecanum and tank drive. Robot-centric or field-centric, slow mode, and autonomous moves and turns. Drive
  • Lifts and arms that cannot hurt themselves. Named positions, soft limits, limit switches and homing, on one motor or two. Robot parts
  • Intakes in one line. A motor, servo wheels, or both. In, out and on/off on any button, and push out while a button is held. With the motor's encoder cable plugged in, a jam is backed out by itself.
  • Game pieces counted. A color or distance sensor at the intake (and one at the launcher) tells the robot how many pieces it holds and which one fires next. The intake stops at 4 (rule G407), and the next piece can pick its own shot table.
  • A light for the drivers. A goBILDA light or a REV Blinkin shows the alliance at INIT, so a wrong pick is seen from the field. Then your own rules: green when ready to fire, a flash for every shot, blinking in the last 20 seconds.
  • Parts that never collide. Interlock rules keep two parts apart (a turret and a lift, a wrist and a claw), whoever moves them, and brake in time even when the code runs slowly. Interlocks

Shooting

  • A full shooter kit. Flywheel in RPM, a hood that follows the shot table, a feeder that waits until the shot is ready, and a speed trim on the D-pad (it offers last match's trim). Launcher
  • Every kind of turret. On a motor, a servo or a CR servo, with a home switch or not, with safe limits or round and round on a slip ring. Setting up a turret
  • Aiming. AprilTags with a webcam or a Limelight 3A. The odometry takes over when the camera loses the goal, robots with no turret turn the whole robot, and the gamepad buzzes when you are on target. Vision
  • Shot Tuner. Shoot, mark each shot a hit or a miss, and it keeps the speed with the best hit ratio. Shooting on the move is there too, off until you tune it.

Autonomous and odometry

  • Autonomous as a list of steps. Before the match, pick your alliance, a start delay and the start spot on the Driver Station. Write the moves once: on fields where the two sides are mirror images, they flip by themselves for the other alliance. A 30-second timer keeps time to park, and a report at the end says how each step went. Autonomous modes, step by step
  • Odometry: know where the robot is. goBILDA Pinpoint, SparkFun OTOS or dead wheels, with a tuner that measures the offsets. Drive to field points, TeleOp starts where autonomous ended, and holding START on a known spot sets the position again. Odometry
  • Smooth paths with Pedro Pathing support. Lines and curves on the field, one after another with no stop. Write a path once, and it works from either alliance's side. Pedro's tuner uses your robot's own setup, so nothing is set up twice. Pedro
  • Plan it on a map. The auto builder places the steps or the path, checks them and writes the Java (see below).

Build, tune and test

  • The whole robot in a few short files. What is on it, its numbers, its buttons and its autonomous modes, each in its own file. Lesson 1
  • Build the robot in steps. Mark a part that is not on the robot yet as optional: INIT goes on, its buttons are off, and autonomous skips it.
  • Live tuning, and one page for every number. Change numbers from the gamepad while the robot runs; saved on the hub. The Tunables reference explains each one, and INIT catches a misspelled one. Every number in Tunables.java
  • Finders and a hardware check. Ready-made OpModes that measure servo ends, lift limits, flywheel gains, the hood, the piece sensors and more, and show the code to copy. One more tests every motor, servo and sensor. Finders
  • Test robot code on a laptop. The test kit's pretend motors, servos and switches run JUnit tests of your five files, with no robot. Test kit

The simulator

Your real OpModes run on a laptop against a pretend Control Hub and Driver Hub, in a browser. No robot, no field, no phone. The simulator guide

  • This season's field in 3D, from the official field CAD, with physics: the robot bumps into field parts and pushes game pieces; intakes take them in and launchers shoot them.
  • The game's rules and a live score: who owns each FLOWER, pieces in the CELLs, the HIVE tip, LEAVE and PARK, and the NECTAR foul.
  • Your robot's real size and parts, from your Robot.java or your CAD. It checks the 18 in start cube and the 18 × 24 × 29 in limits in every pose.
  • Drive it with the keyboard, a real gamepad (USB or Bluetooth) or a phone.
  • See inside: motors, servos, switches, cameras (with the AprilTags they see) and the telemetry on the Driver Hub.
  • Look from every side: your drivers' wall, the red or blue wall, the audience side, the far side, from above, behind the robot, or the HIVE up close. The robot and the balls move smoothly at any frame rate.
  • Layers over the field: the camera's sight lines to each tag (and why it cannot see one), a floor map of where the camera sees tags, the next shot's arc and peak height, ball trails, and a box that shows whether the robot fits its size limits.
  • Shots judged like a referee would: clean, rim, wrong HIVE or miss. Turn on scatter so shots differ like real ones, and get a hit rate from 400 pretend shots from where the robot stands.
  • Odometry and Pedro paths run too: a pretend Pinpoint or OTOS, and you can make it measure wrong to see what bad tuning does.
  • Scripted tests that press buttons and check results, to catch mistakes before a meeting.
  • Four BIOBUZZ starter bots to try, from the goBILDA, REV, AndyMark and Studica kits. The starter bots

Plan an autonomous on the field

Place the steps on a map of the field, see the checks, and get the Java to paste into your project. Two ways, with the same plans and the same Java.

In the simulator (the auto builder guide):

  • The Auto builder button over the 3D field.
  • Simple steps for any robot, or a Pedro path.
  • Run drives it with your real robot code, beside a purple robot that drives the plan.
  • It shows each step's result, where your robot left the plan, and what to change.
  • Copy the Java, save a test file, and print a setup card for the drive team.

On the web, nothing to install (open the path builder):

  • Simple steps for any robot, tank or mecanum: drive, turn, actions, park.
  • Pedro paths: lines and curves; drag the points.
  • Checks for the walls, field parts, the start rules and the 30 seconds.
  • Copy the Java and a test file, and print a setup card.

Help when you need it

  • The Cookbook. More than 100 short answers to “how do I...?”, each with tested code to copy. Cookbook
  • Templates and kit bots. Start from code for a robot like yours: the four BIOBUZZ kit bots, a turret robot, an odometry robot, or five files made from your robot configuration. Pick your template
  • Every module and class. All 21 modules, and search every class and method.

More places to start