Issues with PhotonVision providing incorrect distances

We are working on implementing PhotonVision into our autons and have hit a wall. Any input would be appreciated.

The Issue:
We have a partial field setup and we have made sure our April tags are as correct as we can get them yet when we read the data given to us from PhotonVision the X value is off. We are fairly happy with the Y value but the X value is incorrect and as we drive the offset value changes.

Our Setup:
Our bot has a front-facing camera mounted low near the chassis (6.75in from the ground) and is tilted at an angle (roughly 47 degrees). We are currently running PhotonVision on a Raspberry Pi 4 but have tested this with Orange Pi with similar issues. We have tried calibrating with the checkerboard but received better identification results after calibrating with CalibDB and its charuco board.

Our Testing:
We did some testing to see exactly how far off our values were reading. We measured out points set distances away from the AprilTags, moved the bot, and read the values.

At 1.5m from the AprilTag, the X value we received was .28m farther than the camera was positioned (1.78m reading)
At 2m from the April Tag, the X value was .12m farther than the camera was positioned (2.12m reading)
At 2.5m from the AprilTag, the X value was .02m closer than the camera was positioned. (2.3m reading)
At 2.82m from the AprilTag, the X value was .12m closer than the camera was positioned. (2.7m reading)

We tried at 3m but due to the angle of our camera, it could not see the AprilTags.
As this data appears to be linear we figured we could calculate where we expected the error to be 0 and got roughly 2.4m. Putting the robot in the position we confirmed this.

Our Possible Solution:
Since the issue is linear we could try and compensate for this in code but since this issue is linear we have a feeling that there is something simple we are missing. Is anyone else familiar with these types of issues? What are some other possible solutions? Any possible solutions or suggestions are greatly appreciated.

2 Likes

Have you checked the 3D pose? Maybe your z-value (height) isn’t always around 0 because of some incorrect angles. I mean something like this:
Sorry for my horrible drawing skills

Is the angle between robot and target near zero (180 as reported by PV)? If not your measurement will need to account for that because the distances are robot centric , not field centric .

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.