FtcRobotController icon indicating copy to clipboard operation
FtcRobotController copied to clipboard

AprilTag Axes Rendered Backwards

Open FromenActual opened this issue 1 year ago • 2 comments

The official axis definitions for AprilTags is defined as +x to the right, +y downwards, and +z into the tag. It looks like this:

image

However, AprilTagCanvasAnnotator.java flips each axis when drawAxes is enabled. Not only is this wrong, it also implies a left-handed coordinate system (big no-no!):

image

The render is similarly flipped when drawOutline is enabled, the red and green lines should be joined in the top left corner of the tag, not the bottom right.

Since the orientations of the tags will be updated to be based on the standard AprilTag axis definition (as discussed in #696), it would help to have the axes rendered as such. I'll reiterate from my other comment that this does not conflict with the definition of ftcPose, because that's a redefinition of the camera's axes, not the AprilTag's axes. I also understand that having the z-axis rendered into the tag may look a bit confusing because of a lack of occlusion, but I think correctness is more important in this case. Plus, the axis rendering is disabled by default, so only people who need it will enable it.

FromenActual avatar Sep 23 '23 19:09 FromenActual