PhotonVisionCamera - Team537/RobotCode2024 GitHub Wiki
Purpose
This class serves the purpose of providing more functionality to PhotonVision's PhotonCamera
class. It contains various functions that aid in the usage and management of cameras.
How to use
Using the PhotonVisionCamera
is incredibly easy. Firstly, create a PhotonVisionCamera
object. Your code should look similar to the following example:
PhotonVisionCamera myCamera = new PhotonVisionCamera();
After you have something similar to the above code, all that's left to do is fill in the object's parameters. This consists of providing the camera's name, which is specified in the PhotonVision dashboard, and the camera's distance from the center of the robot, as a Transform3D. Once you fill in these parameters, your code should look similar to the below example:
PhotonVisionCamera myCamera = new PhotonVisionCamera(Constants.CameraConstants.COLOR_CAMERA_NAME, Constants.CameraConstants.COLOR_CAMERA_OFFSET);