31#include <networktables/BooleanTopic.h>
32#include <networktables/DoubleArrayTopic.h>
33#include <networktables/DoubleTopic.h>
34#include <networktables/IntegerTopic.h>
35#include <networktables/MultiSubscriber.h>
36#include <networktables/NetworkTable.h>
37#include <networktables/NetworkTableInstance.h>
38#include <networktables/RawTopic.h>
39#include <networktables/StringTopic.h>
40#include <units/time.h>
212 units::second_t lastVersionCheckTime = 0_s;
213 static bool VERSION_CHECK_ENABLED;
214 inline static int InstanceCount = 0;
216 void VerifyVersion();
218 std::vector<std::string> tablesThatLookLikePhotonCameras();
Represents a camera that is connected to PhotonVision.
Definition PhotonCamera.h:55
nt::IntegerSubscriber pipelineIndexSub
Definition PhotonCamera.h:194
std::shared_ptr< nt::NetworkTable > rootTable
Definition PhotonCamera.h:187
std::optional< CameraMatrix > GetCameraMatrix()
Get the camera calibration matrix, in standard OpenCV form.
nt::IntegerPublisher outputSaveImgEntry
Definition PhotonCamera.h:191
PhotonPipelineResult GetLatestResult()
bool test
Definition PhotonCamera.h:182
const std::string_view GetCameraName() const
Returns the name of the camera.
static void SetVersionCheckEnabled(bool enabled)
Eigen::Matrix< double, 8, 1 > DistortionMatrix
Definition PhotonCamera.h:160
nt::BooleanPublisher driverModePublisher
Definition PhotonCamera.h:203
void SetDriverMode(bool driverMode)
Toggles driver mode.
PhotonCamera(nt::NetworkTableInstance instance, const std::string_view cameraName)
Constructs a PhotonCamera from a root table.
nt::IntegerSubscriber ledModeSubscriber
Definition PhotonCamera.h:204
nt::DoubleArraySubscriber cameraIntrinsicsSubscriber
Definition PhotonCamera.h:199
void TakeInputSnapshot(void)
Request the camera to save a new image file from the input camera stream with overlays.
nt::DoubleArraySubscriber cameraDistortionSubscriber
Definition PhotonCamera.h:200
PhotonCamera(const std::string_view cameraName)
Constructs a PhotonCamera from the name of the camera.
std::shared_ptr< nt::NetworkTable > mainTable
Definition PhotonCamera.h:186
bool GetDriverMode() const
Returns whether the camera is in driver mode.
void SetPipelineIndex(int index)
Allows the user to select the active pipeline index.
nt::IntegerPublisher ledModePub
Definition PhotonCamera.h:195
LEDMode GetLEDMode() const
Returns the current LED mode.
nt::StringSubscriber versionEntry
Definition PhotonCamera.h:197
nt::IntegerSubscriber ledModeSub
Definition PhotonCamera.h:196
void SetLEDMode(LEDMode led)
Sets the LED mode.
std::vector< PhotonPipelineResult > GetAllUnreadResults()
The list of pipeline results sent by PhotonVision since the last call to GetAllUnreadResults().
std::string cameraName
Definition PhotonCamera.h:209
std::vector< PhotonPipelineResult > testResult
Definition PhotonCamera.h:183
nt::IntegerSubscriber inputSaveImgSubscriber
Definition PhotonCamera.h:190
void TakeOutputSnapshot(void)
Request the camera to save a new image file from the output stream with overlays.
nt::IntegerPublisher inputSaveImgEntry
Definition PhotonCamera.h:189
std::shared_ptr< nt::NetworkTable > GetCameraTable() const
Definition PhotonCamera.h:179
nt::MultiSubscriber topicNameSubscriber
Definition PhotonCamera.h:206
nt::RawSubscriber rawBytesEntry
Definition PhotonCamera.h:188
std::string path
Definition PhotonCamera.h:208
nt::BooleanSubscriber driverModeSubscriber
Definition PhotonCamera.h:202
std::optional< DistortionMatrix > GetDistCoeffs()
Get the camera calibration distortion coefficients, in OPENCV8 form.
PhotonCamera(PhotonCamera &&)=default
nt::IntegerSubscriber outputSaveImgSubscriber
Definition PhotonCamera.h:192
int GetPipelineIndex() const
Returns the active pipeline index.
nt::IntegerPublisher pipelineIndexPub
Definition PhotonCamera.h:193
Eigen::Matrix< double, 3, 3 > CameraMatrix
Definition PhotonCamera.h:159
Represents a pipeline result from a PhotonCamera.
Definition PhotonPipelineResult.h:37
Definition PhotonCamera.h:44
Definition VisionEstimation.h:32
LEDMode
Definition PhotonCamera.h:50
@ kOff
Definition PhotonCamera.h:50
@ kBlink
Definition PhotonCamera.h:50
@ kOn
Definition PhotonCamera.h:50
@ kDefault
Definition PhotonCamera.h:50