Class Parts

java.lang.Object
com.crossbotics.ftchelper.robot.Parts

public final class Parts extends Object
The wheels and rollers (and the servo ids) of the simulator's parts catalog (sim/parts/parts.json, docs/guides/parts-catalog.md), by the same ids: "gobilda-hogback-96", "offset-tubing-90"... A Shape uses it to draw a part at its real size: Robot.java names the part, and the size comes from here. Motors are in Motors.

The numbers are copied from the parts catalog, which has each seller's page and the date it was checked; a test checks that they still match it. Docs: docs/modules/robot.md (section "Shapes")

  • Method Details

    • wheel

      public static Parts.Wheel wheel(String id)
      A wheel or roller by its catalog id.
      Parameters:
      id - e.g. "offset-tubing-90"
      Throws:
      IllegalArgumentException - for an unknown id (the message lists the known ones)
    • wheels

      public static Map<String,Parts.Wheel> wheels()
      Every wheel and roller, in catalog order (read only).
    • servo

      public static String servo(String id)
      Checks a servo's catalog id.
      Parameters:
      id - e.g. "gobilda-2000-speed"
      Returns:
      the same id
      Throws:
      IllegalArgumentException - for an unknown id (the message lists the known ones)
    • servos

      public static Set<String> servos()
      Every servo id, in catalog order (read only).