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.

SET-03: DEFAULT_FROM_CATALOG, MEASURE and a part not in the catalog

medium prioritySimulator only (no robot needed)about 20 minSetup and Hardware Check

Why

A new robot's Tunables.java can name every setting from day one: DEFAULT_FROM_CATALOG for "use the library's default" and MEASURE for "a number to find on the robot". A motor or servo the catalog does not have can be described in Robot.java (Motors.custom, Parts.customServo). We want to know the INIT messages make clear what was used, where it came from and what to do next.

Safety

  • Simulator only: nothing moves on a real robot.

Setup

  • Your robot's five files, or ./gradlew :sim:newRobot from your configuration (it writes the words).
  • import static com.crossbotics.ftchelper.robot.Starting.*; at the top of Tunables.java.

Steps

  1. Write DEFAULT_FROM_CATALOG for a few numbers (a launcher's kF, a lift's kP, a claw's travelSec). ./gradlew :sim:fromRobot, start the simulator, INIT. Write down each "defaults from ..." note.
  2. Write MEASURE for one number (a lift's max, or a claw position). INIT: write down the message.
  3. Write DEFAULT_FROM_CATALOG for a lift's max. INIT: write down the message. Put your number back.
  4. In Robot.java, give one part a motor of your own: Motors.custom("my-motor", 28, 5000) (or a servo: Parts.customServo("my-servo", 270, 0.16)). :sim:fromRobot again: find its numbers in the robot file. INIT: write down its note.
  5. Change it to Motors.unknown("my-motor") on a lift's .part(...). INIT: write down the note.

Pass rule

Step 1 lists each value and where it came from; steps 2 and 3 stop INIT with a message that names the number and what to do (the tool for MEASURE, "a safety number" for step 3); step 4 shows the custom numbers in the robot file and "(custom)" in the note; step 5 says "general defaults" and how to do better.

Record

Write these down while you test. The report form has them as a list to fill in.

  • each message, as shown
  • anything in a message that was unclear, and what you did next

If your robot is different

No lift or launcher: use the parts you have (any Claw, Wrist, Hood, servo Turret or Indexer reads a travelSec-like time).

Report your result

Pass, fail, or could not run: every result helps. The form opens on GitHub with this test filled in (a free GitHub account is needed). No student names, please.

Report result

No reports for this test yet: yours would be the first. Every test's reports.

All tests · Next: CTL-02 Move or free the library's buttons

Something wrong on this page? Tell us with a short GitHub form.