Skip to content

Camera Training

Prerequisites: Github, Java, Robot Code

  1. Read through WPILib Camera Training

  2. Read through Photon Vision

    1. We use Limelights to find AprilTags, which look similar to a QR code. We also can run Photon Vision on a Raspberry Pi, allowing us to add more cameras to our robots.
  3. Once you feel prepared, ask a lead or mentor for a Raspberry Pi, which you will have to flash with Photon Vision
  4. After finishing flashing the Raspberry Pi, insert the micro sd card into the Rasberry Pi, and connect power to the Pi
  5. Connect and calibrate the Pi's camera using the Photon Vision software to make sure it can identify an April Tag, or another element of your choice.
  6. Once this calibration is completed, you can begin working on the code to use the camera feed in your robot code.
  7. In your code, you will need to create a PhotonCamera object, and then use the getLatestResult() method to get the latest result from the camera. This result will contain the position of the April Tag, or other field element, in the camera's field of view. You can then use this information to drive your robot to the target.
  8. To get the Camera certification, put the position returned by the camera in the SmartDashboard.
  9. Show your code and the SmartDashboard to a lead or mentor to be certified!