Questions about limelight's botpose features / Only returning 0

So in the limelight docs it talks about the botpose key in the network tables API and how it can can determine the robot’s position based on apriltags. On the default dashboard it returns a comma separated list of doubles, however, when I try to acess the value using std::cout << m_table->GetNumber("botpose", 0.0) << "\n"; it returns 0 no matter what. Does anyone know how I can get the values and what type it returns? The only thing regarding it I could find in the docs doesn’t really explain what exactly botpose returns.

If the datatype in NT is an array, you need to use GetDoubleArray, not GetNumber. On type mismatch the GetX() functions simply return the provided default value (in this case 0).

Thanks, I’ll try that the next time I see the bot

we have the same issue, even when looking at Shuffleboard we are getting an array with all 0’s. We can see the pose on the limelight interface website, but the data is not being sent into the network table


If you’re seeing an array with all 0’s in a dashboard or outlineviewer, then the issue almost certainly lies with the Limelight side. Do other values update?

Could you try with the default dashboard’s network tables viewer?

Have you open the OutlineView in the 2023/Tools/ directory or used the view on your ShuffleBoard to examine the data that is published on the Network Table?

Is the Robot Pos Updating there?

If it is NOT then I suspect you need to enable the 3D Pos option on the Lime Lights Advanced Tab, then configure the camera position relative to the robot chassis.

1 Like

You also need to add field images and change settings

Good point. I was assuming they where successfully detecting Tags with the Web interface. The field 2023 field map is already loaded with the 2023 image.

Responding for @GriffM here, but yes we are seeing every other value update correctly. The values are properly showing up in the interface as well. We visualized the network tables in both Shuffleboard and Outline Viewer and the array for botpose will be empty if no tag is in view, and will be an array of 6 zeros if any tag is in view. We also made sure to enable the 3D setting in the advanced tab in the limelight interface.

See my response above this one, but just to further explain we are seeing a transform 3D and rotation 3D output IN the interface, all 6 variables are visible and accurate as we move the tag in space. The limelight seems to not be sending it to the network table though.

Something to try

Added to limelight library from

private DoubleArraySubscriber camtransub;
private DoubleArraySubscriber posesub;

private Translation3d tran3d;
private Rotation3d r3d;
private Pose3d p3d;

 * Using the Default Lime Light NT table
public LimeLight() {
    m_tableName = "limelight";
    m_table = NetworkTableInstance.getDefault().getTable(m_tableName);
    posesub = m_table.getDoubleArrayTopic("botpose").subscribe(new double[] {});

public Pose3d getRobotPose() {

    double[] result = posesub.get();
    tran3d = new Translation3d(result[0], result[1], result[2]);
    r3d = new Rotation3d(result[3], result[4], result[5]);
    p3d = new Pose3d(tran3d, r3d);

    return p3d;

I have not updated or tested this for the 2023 firmware. I can try to get to it.

I plan on updating it and publishing it here.

Sure, or fork the repo and create a pull request.

Idealy i would like to create a proper library that could be simply added to a project either like the 3rd party librarys.

Right, I see what youre posting here but the thing is the data does not appear even in Outline Viewer. The arrays are being incorrectly populated by the Limelight itself. We are able to pull the value that is being shown in Outline Viewer just fine though, which is an array of zeros when a tag is in range, and an empty array when there is no tag.

Basically, if we ran this code to get the Pose3D, we would be returned a Pose3D object where every component is zeros.

Apologies for the image quality but they show the Limelight Network Table ‘botpose’ with values and then them being shown on SmartDashboard. You need to have the pipeline type as FiducialMarkers and Full 3D Targeting on.