Package frc.robot.subsystems
LimeLightSub Documentation
Class LimeLightSub
public class
LimeLightSub
extends SubsystemBase
Implements a LimeLightSubsystem.
Constructor Summary
Constructors
LimeLightSub(String limelight_networktable_name)
 Allocates a LimeLightSub with the given NetworkTable.
Method Summary
Modifer and Type Description
-
boolean
hasTarget()
Returns if there is a detected target. Returns 0 or 1.
-
boolean
getTx()
 Returns the crosshair degree angle from the center of the target (left and right).
-
double
getID()
 Returns the target (Apriltag) ID decremented by 1.
-
double
getTy()
 Returns the crosshair degree angle from the center of the target (top and bottom).
-
double
getTheta()
 Returns the sum angle from robot's constant CAMERA_HEIGHT and ty.
-
double
getAngle()
 Returns tx value but in radians.
-
double
getPipeLine()
 Returns the current pipeline index;
-
void
setPipeline(double pipeline)
 Sets the current pipeline.
-
boolean
checkPipe()
 Returns if is there is a pipeline.
-
void
setPoint()
 Sets the target point of for each respective PIDController
-
double
getDistance()
 Returns the distance of robot from target AprilTag in meters.
-
double
getDistanceX()
 Returns the (forward and backward) distance of the robot from target AprilTag in meters.
-
double
getDistanceY()
 Returns the (left and right) distance of the robot from target AprilTag in meters.
-
double
getErrorX()
 Returns PIDController calculation for distanceX to target point (using botPose values).
-
double
getErrorY()
 Returns PIDController calculation for distanceY to target point (using botPose values).
-
double
getThetaErrorX()
 Returns PIDController calculation for tx to target point.
-
double
getSmoothThetaError()
 Returns PIDController calculation for yaw (left and right) to target point using botPose values.