Package frc.robot.utils
Class VisionUtils
java.lang.Object
frc.robot.utils.VisionUtils
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic double
static double
static edu.wpi.first.networktables.NetworkTable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic double
static edu.wpi.first.math.geometry.Pose3d
Gets the bots position relative to the field.static edu.wpi.first.math.geometry.Pose3d
Gets the bots position relative to the target.static double
Gets the distance from the first visible AprilTagstatic double
Gets the latency from capturingstatic double
Gets the latency from the pipelinestatic double
static double
static double
static void
visionEnabled
(boolean b) Toggle if vision is enable or notstatic double
static double
-
Field Details
-
noteLimelight
public static edu.wpi.first.networktables.NetworkTable noteLimelight -
height
public static double height -
forward
public static double forward
-
-
Constructor Details
-
VisionUtils
public VisionUtils()
-
-
Method Details
-
visionEnabled
public static void visionEnabled(boolean b) Toggle if vision is enable or not- Parameters:
b
- Set if vision is enabled or not
-
getBotPoseFieldSpace
public static edu.wpi.first.math.geometry.Pose3d getBotPoseFieldSpace()Gets the bots position relative to the field. Used by odometry- Returns:
- The bots position
-
getBotPoseTargetSpace
public static edu.wpi.first.math.geometry.Pose3d getBotPoseTargetSpace()Gets the bots position relative to the target. Used by AlignCommand- Returns:
- The bots position
-
getDistanceFromTag
public static double getDistanceFromTag()Gets the distance from the first visible AprilTag- Returns:
- The distance (in meters) from the AprilTag
-
getLatencyPipeline
public static double getLatencyPipeline()Gets the latency from the pipeline- Returns:
- The latency
-
getLatencyCapture
public static double getLatencyCapture()Gets the latency from capturing- Returns:
- The latency
-
getNoteTX
public static double getNoteTX() -
getNoteTY
public static double getNoteTY() -
getNoteTV
public static double getNoteTV() -
YDistanceToNote
public static double YDistanceToNote() -
XDistanceToNote
public static double XDistanceToNote() -
distanceToNote
public static double distanceToNote()
-