Package com.crossbotics.ftchelper.util
Class FieldPose
java.lang.Object
com.crossbotics.ftchelper.util.FieldPose
Where the robot is on the field: x and y in inches, heading in degrees
(counterclockwise is positive, like the IMU).
A "pose" is the robot's place AND the way it is pointing, together.
The library does not choose where (0, 0) is. Your team decides that for each game and writes it down. Docs: docs/modules/util.md. Signs: docs/conventions.md.
-
Field Summary
FieldsModifier and TypeFieldDescriptiondoubleDegrees, counterclockwise positive.doubleInches.doubleInches. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
x
public double xInches. -
y
public double yInches. -
headingDeg
public double headingDegDegrees, counterclockwise positive.
-
-
Constructor Details
-
FieldPose
public FieldPose()A pose at (0, 0), heading 0. -
FieldPose
public FieldPose(double x, double y, double headingDeg) Makes a pose from three numbers.- Parameters:
x- inchesy- inchesheadingDeg- degrees, counterclockwise positive
-
-
Method Details
-
copy
A new pose with the same numbers. Changing the copy does not change this one. (In Java, passing an object around shares the SAME object; a copy keeps them apart.) -
toString
The pose as text for telemetry, e.g. "(12.0 in, -36.5 in, 90.0 deg)". "@Override" means this replaces Java's built-in toString, which would print gibberish.
-