Apriltag Wrong Measurement

Hi ı am using pi cam v2 and measurement is so wrong.
I am giving the camera height, target height and camera pıtch radıans but these 3 values are not real in fact. I am changing these 3 values until my measurement is correct but when ı drive my robot forward or backward the measurement is goes wrong. Any body can help please


1 Like

Probably a couple things going on here. My first question is why aren’t you using 3d mode?

this code is from photonvision’s example code ı dont now whole photonvision lib

You aren’t using the 3d pose estimation of the tag, but instead you are using a pid loop to move until the tag is at the specified pitch.

can you give me a example code for how to use 3d pose

1 Like

have you read the docs?

1 Like

yes but i didn’t get anything

Getting in Range of the Target - PhotonVision Docs Here is an example that uses the pose estimate of the tag.

this example isn’t usiing 3d

Elaborate please. Not to be rude but the “robot code interface” portion of the docs is more or less an end to end tutorial. What is piece is missing?

My bad, the getCameraToTarget() method is what you are looking for.

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