AprilRobotics / apriltag

AprilTag is a visual fiducial system popular for robotics research.
https://april.eecs.umich.edu/software/apriltag
Other
1.47k stars 522 forks source link

How to find the linear distance between the camera and the tag in the code of Apriltags? #241

Closed playezio closed 5 months ago

playezio commented 1 year ago

I know that pose.R and pose.t represents the rotation matrix and translation vector of tag relative to the camera coordinate system respectively. The X distance of the tag relative to the camera in the real world is pose.t->data[0].The Y distance of the tag relative to the camera in the real world is pose.t->data[1].The Z distance(heigh) of the tag relative to the camera in the real world is pose.t->data[2]. cout<<" x="<<pose.t->data[0]<<" "<<"y="<<pose.t->data[1]<<" "<<"z="<<pose.t->data[2]<<endl; What's the linear distance of the tag relative to the camera in the real world incode?

christian-rauch commented 1 year ago

If you have the translation, then the distance is just the norm, right?