Package frc.reefscape
Class Zones
java.lang.Object
frc.reefscape.Zones
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
atReef()
static double
static double
static double
static double
double
Calls ScoreReefPose to get Pose of Target Reefdouble
Calls ScoreReefPose to get Pose of Target Reefdouble
Calls ScoreReefPose to get Pose of Target Reefdouble
getTagAngleOffset
(int tag) double
getTagOffset
(int tag) Depending on the offsets file used, change the tag offsets here.static boolean
withinReefRange
(double range)
-
Field Details
-
blueFieldSide
-
opponentFieldSide
-
topLeftZone
-
topRightZone
-
bottomLeftZone
-
bottomRightZone
-
netAlgaeZone
-
isCloseToReef
-
-
Constructor Details
-
Zones
public Zones()
-
-
Method Details
-
getTagOffset
public double getTagOffset(int tag) Depending on the offsets file used, change the tag offsets here.getTagOffset automatically checks if the offset taken is < 0 or greater than the given tag limit. If the tag is blue (> 16), it subtracts 17 from the given tag
- Parameters:
tag
-- Returns:
-
getTagAngleOffset
public double getTagAngleOffset(int tag) -
getScoreReefPoseX
public double getScoreReefPoseX()Calls ScoreReefPose to get Pose of Target Reef- Returns:
- X of Target Reef
-
getScoreReefPoseY
public double getScoreReefPoseY()Calls ScoreReefPose to get Pose of Target Reef- Returns:
- Y of Target Reef
-
getScoreReefPoseAngle
public double getScoreReefPoseAngle()Calls ScoreReefPose to get Pose of Target Reef- Returns:
- Returns Target Reef Pose Angle value based on robot heading hence adding PI is needed since the target reef face is pi radians from robot heading
-
atReef
public static boolean atReef() -
withinReefRange
public static boolean withinReefRange(double range) -
getAtReefXYTolerance
public static double getAtReefXYTolerance() -
getAtReefRotationTolerance
public static double getAtReefRotationTolerance() -
getNetAlgaeX
public static double getNetAlgaeX() -
getNetAlgaeZoneTolerance
public static double getNetAlgaeZoneTolerance()
-