Package frc.robot.vision
Class Vision
java.lang.Object
frc.robot.vision.Vision
- All Implemented Interfaces:
Subsystem
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classclass -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSet all Limelights to blinkChoose the limelight with the best view of multiple tagsgetName()static AprilTagFieldLayoutbooleanIf at least one LL has an accurate posevoidvoidperiodic()voidreset pose to the best limelight's vision posebooleanresetPoseToVision(boolean targetInView, Pose3d botpose3D, Pose2d megaPose, double poseTimestamp) Set robot pose to vision pose only if LL has good tag readingvoidsetLimelightPipelines(int pipeline) Change all LL pipelines to the same pipelineOnly blinks left limelightbooleanvoidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface edu.wpi.first.wpilibj2.command.Subsystem
defer, getCurrentCommand, getDefaultCommand, idle, register, removeDefaultCommand, run, runEnd, runOnce, setDefaultCommand, simulationPeriodic, startEnd, startRun
-
Field Details
-
backLL
-
leftLL
-
rightLL
-
allLimelights
-
-
Constructor Details
-
Vision
-
-
Method Details
-
getName
-
periodic
public void periodic() -
logTelemetry
public void logTelemetry() -
triggerRewindCaptureForAllCameras
public void triggerRewindCaptureForAllCameras() -
getBackMegaTag1Pose
-
getLeftMegaTag1Pose
-
getRightMegaTag1Pose
-
getBestLimelight
Choose the limelight with the best view of multiple tags- Returns:
- the best limelight
-
resetPoseToVision
public void resetPoseToVision()reset pose to the best limelight's vision pose -
resetPoseToVision
public boolean resetPoseToVision(boolean targetInView, Pose3d botpose3D, Pose2d megaPose, double poseTimestamp) Set robot pose to vision pose only if LL has good tag reading- Returns:
- if the pose was accepted and integrated
-
hasAccuratePose
public boolean hasAccuratePose()If at least one LL has an accurate pose- Returns:
- true if at least one LL has an accurate pose
-
setLimelightPipelines
public void setLimelightPipelines(int pipeline) Change all LL pipelines to the same pipeline -
tagsInView
public boolean tagsInView() -
blinkLimelights
Set all Limelights to blink -
solidLimelight
Only blinks left limelight -
getBackLL
-
getLeftLL
-
getRightLL
-
getTagLayout
-