diff --git a/source/docs/apriltag-pipelines/coordinate-systems.rst b/source/docs/apriltag-pipelines/coordinate-systems.rst index de40ab2..21dbb8f 100644 --- a/source/docs/apriltag-pipelines/coordinate-systems.rst +++ b/source/docs/apriltag-pipelines/coordinate-systems.rst @@ -11,24 +11,39 @@ You define the camera to robot transform in the robot coordinate frame. Camera Coordinate Frame ----------------------- -The camera coordinate system is defined as follows, relative to the camera sensor itself, and when looking in the same direction as the sensor points: +OpenCV by default uses x-left/y-down/z-out for camera transforms. PhotonVision applies a base rotation to this transformation to make robot to tag transforms more in line with the WPILib coordinate system. The x, y, and z axes are also shown in red, green, and blue in the 3D mini-map and targeting overlay in the UI. -* The origin is the center. -* The x-axis points to the left -* The y-axis points up. -* The z-axis points out toward the subject. +* The origin is the focal point of the camera lens +* The x-axis points out of the camera +* The y-axis points to the left +* The z-axis points upwards + + +.. image:: images/camera-coord.png + :scale: 45 % + :align: center + +| + +.. image:: images/multiple-tags.png + :scale: 45 % + :align: center + +| AprilTag Coordinate Frame ------------------------- -The AprilTag coordinate system is defined as follows, relative to the center of the AprilTag itself, and when viewing the tag as a robot would: +The AprilTag coordinate system is defined as follows, relative to the center of the AprilTag itself, and when viewing the tag as a robot would. Again, PhotonVision changes this coordinate system to be more in line with WPILib. This means that a robot facing a tag head-on would see a robot-to-tag transform with a translation only in x, and a rotation of 180 degrees about z. The tag coordinate system is also shown with x/y/z in red/green/blue in the UI target overlay and mini-map. + +* The origin is the center of the tag +* The x-axis is normal to the plane the tag is printed on, pointing outward from the visible side of the tag. +* The y-axis points to the right +* The z-axis points upwards -* The origin is the center. -* The x-axis points to your right -* The y-axis points upwards. -* The z-axis is normal to the plane the tag is printed on, pointing outward from the visible side of the tag. .. image:: images/apriltag-coords.png + :scale: 45 % :align: center - :scale: 50% - :alt: AprilTag Coordinate System + +| diff --git a/source/docs/apriltag-pipelines/images/apriltag-coords.png b/source/docs/apriltag-pipelines/images/apriltag-coords.png index a70eeca..6e4d1b9 100644 Binary files a/source/docs/apriltag-pipelines/images/apriltag-coords.png and b/source/docs/apriltag-pipelines/images/apriltag-coords.png differ diff --git a/source/docs/apriltag-pipelines/images/multiple-tags.png b/source/docs/apriltag-pipelines/images/multiple-tags.png new file mode 100644 index 0000000..a9e23b4 Binary files /dev/null and b/source/docs/apriltag-pipelines/images/multiple-tags.png differ