Package com.crossbotics.ftchelper.robot
Class Parts
java.lang.Object
com.crossbotics.ftchelper.robot.Parts
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")
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classOne wheel or roller: its size in millimetres. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringChecks a servo's catalog id.servos()Every servo id, in catalog order (read only).static Parts.WheelA wheel or roller by its catalog id.static Map<String, Parts.Wheel> wheels()Every wheel and roller, in catalog order (read only).
-
Method Details
-
wheel
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
Every wheel and roller, in catalog order (read only). -
servo
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
Every servo id, in catalog order (read only).
-