Limelight distance estimation is in at a non-constant offset

hi, my team is relatively new to limelight distance estimation and we faced a weird issue this past week.
By following the docs to calculate the distance from the Apriltag to the robot, we did obtain more or less the right distance however, there is a growing gap ranging from 10cm to a meter between the actual length and the one measured by the limelight.
we fixed the limelight angle which is for testing measures is parallel to the floor and we doublechecked height and the correctness of the code, to no avail.
I will be happy if someone may help me out cause I am now beginning to question whether math is broken or the java compiler which is both unlikely.

Are you entering your camera mount location into the Limelight and letting it calculate the robot pose? Or are you calculating it in code? Do you have code you can share?

Maybe your angle is a little off. We usually measure our Limelight mount angle with a cell phone to get a starting point, but then we make small adjustments on the code side until itโ€™s calculating the right distance. Itโ€™s very difficult to measure 1/2 degree.

1 Like