Class PipelineDataCollator
java.lang.Object
io.github.roboblazers7617.limelight.PipelineDataCollator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the robot's 3D pose with respect to the currently tracked target's coordinate system.Gets the camera's 3D pose with respect to the robot's coordinate system.Gets the camera's 3D pose with respect to the currently tracked target's coordinate system.Gets the current neural classifier result class name.int
Gets the classifier class index from the currently running neural classifier pipelinedouble
Gets the active pipeline index.Gets the current pipeline type.Gets the primary neural detector result class name.int
Gets the detector class index from the primary result of the currently running neural detector pipeline.double
Gets the full JSON results dump.double
Gets the capture latency.double
Gets the pipeline's processing latency contribution.getLatestResults
(boolean showParseTime) Gets the latest JSON results output and returns a LimelightResults object.String[]
Gets the latest raw neural detector results from NetworkTables nameGets the latest raw fiducial/AprilTag detection results from NetworkTables.double[]
T2D is an array that contains several targeting metrcisdouble
getTA()
Gets the target area as a percentage of the image (0-100%).double[]
int
Gets the number of targets currently detected.Gets the target's 3D pose with respect to the camera's coordinate system.Gets the target's 3D pose with respect to the robot's coordinate system.boolean
getTV()
Does the Limelight have a valid target?double
getTX()
Gets the horizontal offset from the crosshair to the target in degrees.double
getTXNC()
Gets the horizontal offset from the principal pixel/point to the target in degrees.double
getTY()
Gets the vertical offset from the crosshair to the target in degrees.double
getTYNC()
Gets the vertical offset from the principal pixel/point to the target in degrees.
-
Constructor Details
-
PipelineDataCollator
-
-
Method Details
-
getRawDetections
Gets the latest raw neural detector results from NetworkTables name- Returns:
- Array of RawDetection objects containing detection details
-
getRawFiducialTargets
Gets the latest raw fiducial/AprilTag detection results from NetworkTables. name- Returns:
- Array of RawFiducialTarget objects containing detection details
-
getLatestResults
Gets the latest JSON results output and returns a LimelightResults object.- Returns:
- LimelightResults object containing all current target data
-
getTV
public boolean getTV()Does the Limelight have a valid target?- Returns:
- True if a valid target is present, false otherwise
-
getTX
public double getTX()Gets the horizontal offset from the crosshair to the target in degrees.- Returns:
- Horizontal offset angle in degrees
-
getTY
public double getTY()Gets the vertical offset from the crosshair to the target in degrees.- Returns:
- Vertical offset angle in degrees
-
getTXNC
public double getTXNC()Gets the horizontal offset from the principal pixel/point to the target in degrees. This is the most accurate 2d metric if you are using a calibrated camera and you don't need adjustable crosshair functionality.- Returns:
- Horizontal offset angle in degrees
-
getTYNC
public double getTYNC()Gets the vertical offset from the principal pixel/point to the target in degrees. This is the most accurate 2d metric if you are using a calibrated camera and you don't need adjustable crosshair functionality.- Returns:
- Vertical offset angle in degrees
-
getTA
public double getTA()Gets the target area as a percentage of the image (0-100%).- Returns:
- Target area percentage (0-100)
-
getT2DArray
public double[] getT2DArray()T2D is an array that contains several targeting metrcis- Returns:
- Array containing [targetValid, targetCount, targetLatency, captureLatency, tx, ty, txnc, tync, ta, tid, targetClassIndexDetector, targetClassIndexClassifier, targetLongSidePixels, targetShortSidePixels, targetHorizontalExtentPixels, targetVerticalExtentPixels, targetSkewDegrees]
-
getTargetCount
public int getTargetCount()Gets the number of targets currently detected.- Returns:
- Number of detected targets
-
getClassifierClassIndex
public int getClassifierClassIndex()Gets the classifier class index from the currently running neural classifier pipeline- Returns:
- Class index from classifier pipeline
-
getDetectorClassIndex
public int getDetectorClassIndex()Gets the detector class index from the primary result of the currently running neural detector pipeline.- Returns:
- Class index from detector pipeline
-
getClassifierClass
Gets the current neural classifier result class name.- Returns:
- Class name string from classifier pipeline
-
getDetectorClass
Gets the primary neural detector result class name.- Returns:
- Class name string from detector pipeline
-
getLatency_Pipeline
public double getLatency_Pipeline()Gets the pipeline's processing latency contribution.- Returns:
- Pipeline latency in milliseconds
-
getLatency_Capture
public double getLatency_Capture()Gets the capture latency.- Returns:
- Capture latency in milliseconds
-
getCurrentPipelineIndex
public double getCurrentPipelineIndex()Gets the active pipeline index.- Returns:
- Current pipeline index (0-9)
-
getCurrentPipelineType
Gets the current pipeline type.- Returns:
- Pipeline type string (e.g. "retro", "apriltag", etc)
-
getJSONDump
Gets the full JSON results dump.- Returns:
- JSON string containing all current results
-
getBotPose3d_TargetSpace
Gets the robot's 3D pose with respect to the currently tracked target's coordinate system.- Returns:
- Pose3d object representing the robot's position and orientation relative to the target
-
getCameraPose3d_TargetSpace
Gets the camera's 3D pose with respect to the currently tracked target's coordinate system.- Returns:
- Pose3d object representing the camera's position and orientation relative to the target
-
getTargetPose3d_CameraSpace
Gets the target's 3D pose with respect to the camera's coordinate system.- Returns:
- Pose3d object representing the target's position and orientation relative to the camera
-
getTargetPose3d_RobotSpace
Gets the target's 3D pose with respect to the robot's coordinate system.- Returns:
- Pose3d object representing the target's position and orientation relative to the robot
-
getCameraPose3d_RobotSpace
Gets the camera's 3D pose with respect to the robot's coordinate system.- Returns:
- Pose3d object representing the camera's position and orientation relative to the robot
-
getTargetColor
public double[] getTargetColor() -
getFiducialID
public double getFiducialID() -
getNeuralClassID
-
getRawBarcodeData
-