PoseEstimate methods
These methods return aPoseEstimate object that bundles the 2D pose with a latency-adjusted timestamp, tag metadata, and per-fiducial details. They are the recommended way to feed vision measurements into WPILib’s SwerveDrivePoseEstimator or DifferentialDrivePoseEstimator.
getBotPoseEstimate_wpiBlue
Returns a MegaTag1 pose estimate in the WPILib Blue Alliance coordinate system.
Name of the Limelight NetworkTables table.
MegaTag1 pose estimate in the WPILib Blue Alliance origin. Fields:
pose (Pose2d), timestampSeconds (latency-adjusted), latency (ms), tagCount, tagSpan (m), avgTagDist (m), avgTagArea (%), rawFiducials (RawFiducial[]), isMegaTag2 (false).getBotPoseEstimate_wpiRed
Returns a MegaTag1 pose estimate in the WPILib Red Alliance coordinate system.
Name of the Limelight NetworkTables table.
MegaTag1 pose estimate in the WPILib Red Alliance origin.
isMegaTag2 is false.getBotPoseEstimate_wpiBlue_MegaTag2
Returns a MegaTag2 pose estimate in the WPILib Blue Alliance coordinate system. MegaTag2 uses your robot’s reported yaw to constrain the pose solve, producing lower rotational ambiguity at the cost of requiring an accurate gyro input.
Name of the Limelight NetworkTables table.
MegaTag2 pose estimate in the WPILib Blue Alliance origin.
isMegaTag2 is true.getBotPoseEstimate_wpiRed_MegaTag2
Returns a MegaTag2 pose estimate in the WPILib Red Alliance coordinate system.
Name of the Limelight NetworkTables table.
MegaTag2 pose estimate in the WPILib Red Alliance origin.
isMegaTag2 is true.3D pose methods
These methods return aPose3d object. They are useful for 3D visualization and for computing spatial relationships between the robot, camera, and target.
getBotPose3d
Returns the robot’s 3D pose in the field-centric coordinate system used internally by the Limelight. This is not the WPILib standard origin.
Name of the Limelight NetworkTables table.
Robot pose in Limelight field-centric space. Use
getBotPose3d_wpiBlue for WPILib-compatible coordinates.getBotPose3d_wpiBlue
(Recommended) Returns the robot’s 3D pose in the WPILib Blue Alliance coordinate system.
Name of the Limelight NetworkTables table.
Robot pose in the WPILib Blue Alliance origin. Origin is the Blue Alliance corner of the field.
getBotPose3d_wpiRed
(Not recommended) Returns the robot’s 3D pose in the WPILib Red Alliance coordinate system.
Name of the Limelight NetworkTables table.
Robot pose in the WPILib Red Alliance origin. Prefer
getBotPose3d_wpiBlue for most use cases.getBotPose3d_TargetSpace
Returns the robot’s 3D pose relative to the currently tracked target’s coordinate system.
Name of the Limelight NetworkTables table.
Robot pose expressed in the target’s coordinate frame.
getCameraPose3d_TargetSpace
Returns the camera’s 3D pose relative to the currently tracked target’s coordinate system.
Name of the Limelight NetworkTables table.
Camera pose expressed in the target’s coordinate frame.
getTargetPose3d_CameraSpace
Returns the primary target’s 3D pose in the camera’s coordinate system.
Name of the Limelight NetworkTables table.
Target pose expressed in the camera’s coordinate frame.
getTargetPose3d_RobotSpace
Returns the primary target’s 3D pose in the robot’s coordinate system.
Name of the Limelight NetworkTables table.
Target pose expressed in the robot’s coordinate frame.
getCameraPose3d_RobotSpace
Returns the camera’s 3D pose in the robot’s coordinate system.
Name of the Limelight NetworkTables table.
Camera pose expressed in the robot’s coordinate frame.
2D pose methods
These methods return aPose2d derived from the raw 6-element pose array. They use x, y, and yaw only; z, roll, and pitch are discarded.
getBotPose2d
Returns the robot’s 2D pose in the Limelight field-centric coordinate system (not WPILib-standard).
Name of the Limelight NetworkTables table.
Robot 2D pose in Limelight field-centric space.
getBotPose2d_wpiBlue
Returns the robot’s 2D pose in the WPILib Blue Alliance coordinate system.
Name of the Limelight NetworkTables table.
Robot 2D pose in the WPILib Blue Alliance origin.
getBotPose2d_wpiRed
Returns the robot’s 2D pose in the WPILib Red Alliance coordinate system.
Name of the Limelight NetworkTables table.
Robot 2D pose in the WPILib Red Alliance origin.
Raw pose array methods
These methods return a 6-elementdouble[] in the format [x, y, z, roll, pitch, yaw] where translations are in meters and angles are in degrees. They are lower-level than the Pose3d/Pose2d variants. Use toPose3D or toPose2D to convert them.
The deprecated lowercase variants (
getBotpose, getBotpose_wpiBlue, getBotpose_wpiRed) are aliases for these methods. Use the capitalized versions shown below.getBotPose
Name of the Limelight NetworkTables table.
6-element array
[x, y, z, roll, pitch, yaw] in Limelight field-centric space.getBotPose_wpiBlue
Name of the Limelight NetworkTables table.
6-element array
[x, y, z, roll, pitch, yaw] in the WPILib Blue Alliance origin.getBotPose_wpiRed
Name of the Limelight NetworkTables table.
6-element array
[x, y, z, roll, pitch, yaw] in the WPILib Red Alliance origin.getBotPose_TargetSpace
Name of the Limelight NetworkTables table.
6-element array representing the robot pose in the target’s coordinate frame.
getCameraPose_TargetSpace
Name of the Limelight NetworkTables table.
6-element array representing the camera pose in the target’s coordinate frame.
getTargetPose_CameraSpace
Name of the Limelight NetworkTables table.
6-element array representing the target pose in the camera’s coordinate frame.
getTargetPose_RobotSpace
Name of the Limelight NetworkTables table.
6-element array representing the target pose in the robot’s coordinate frame.
Deprecated methods
| Deprecated | Replacement |
|---|---|
getBotpose(String) | getBotPose(String) |
getBotpose_wpiBlue(String) | getBotPose_wpiBlue(String) |
getBotpose_wpiRed(String) | getBotPose_wpiRed(String) |