Changes between Version 3 and Version 4 of ControlSystems/SoftwareTeam/Training/GettingStarted/CameraSwitching
- Timestamp:
- Feb 14, 2020, 9:56:00 AM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ControlSystems/SoftwareTeam/Training/GettingStarted/CameraSwitching
v3 v4 1 Often it's desirable to have more than one camera on a robot, for example to provide front and back views. As always, camera code should alwaysrun in its own thread to prevent camera errors from taking down the main robot thread. The example below shows how to create a new thread class called Cameras that creates two cameras and lets you switch between them using an Xbox controller.1 Often it's desirable to have more than one camera on a robot, for example to provide front and back views. As always, camera code should run in its own thread to prevent camera errors from taking down the main robot thread. The example below shows how to create a new thread class called Cameras that creates two cameras and lets you switch between them using an Xbox controller. 2 2 3 3 WPILib provides a great helper class called [https://first.wpi.edu/FRC/roborio/release/docs/java/edu/wpi/first/cameraserver/CameraServer.html CameraServer] that does most of the heavy lifting. You can read about it [https://docs.wpilib.org/en/latest/docs/software/vision-processing/introduction/cameraserver-class.html here] and [https://s3.amazonaws.com/screensteps_live/exported/Wpilib/2078/6264/Read_and_process_video_CameraServer_class.pdf?1483739157 here]