27#include <cameraserver/CameraServer.h>
44#include <frc/apriltag/AprilTagFieldLayout.h>
45#include <frc/apriltag/AprilTagFields.h>
46#include <units/math.h>
47#include <wpi/timestamp.h>
55 double minTargetAreaPercent, units::meter_t maxSightRange);
72 minTargetAreaPercent = areaPercent;
80 videoSimWireframeEnabled = enabled;
83 videoSimWireframeResolution = resolution;
86 videoSimProcEnabled = enabled;
89 const frc::Pose3d& cameraPose,
90 std::vector<VisionTargetSim> targets);
94 uint64_t ReceiveTimestamp);
102 int64_t heartbeatCounter{0};
104 uint64_t nextNTEntryTime{wpi::Now()};
106 units::meter_t maxSightRange{std::numeric_limits<double>::max()};
107 static constexpr double kDefaultMinAreaPx{100};
108 double minTargetAreaPercent;
110 frc::AprilTagFieldLayout tagLayout{
111 frc::AprilTagFieldLayout::LoadField(frc::AprilTagField::k2024Crescendo)};
113 cs::CvSource videoSimRaw;
114 cv::Mat videoSimFrameRaw{};
115 bool videoSimRawEnabled{
true};
116 bool videoSimWireframeEnabled{
false};
117 double videoSimWireframeResolution{0.1};
118 cs::CvSource videoSimProcessed;
119 cv::Mat videoSimFrameProcessed{};
120 bool videoSimProcEnabled{
true};
Definition NTTopicSet.h:37
Represents a camera that is connected to PhotonVision.
Definition PhotonCamera.h:55
Definition PhotonCameraSim.h:50
std::optional< uint64_t > ConsumeNextEntryTime()
SimCameraProperties prop
Definition PhotonCameraSim.h:96
void SetWireframeResolution(double resolution)
Definition PhotonCameraSim.h:82
const cs::CvSource & GetVideoSimRaw()
Definition PhotonCameraSim.h:63
const cv::Mat & GetVideoSimFrameRaw()
Definition PhotonCameraSim.h:64
PhotonCamera * GetCamera()
Definition PhotonCameraSim.h:57
void EnableDrawWireframe(bool enabled)
Definition PhotonCameraSim.h:79
double GetMinTargetAreaPixels()
Definition PhotonCameraSim.h:59
PhotonCameraSim(PhotonCamera *camera, const SimCameraProperties &props, double minTargetAreaPercent, units::meter_t maxSightRange)
void EnabledProcessedStream(double enabled)
Definition PhotonCameraSim.h:85
units::meter_t GetMaxSightRange()
Definition PhotonCameraSim.h:62
PhotonPipelineResult Process(units::second_t latency, const frc::Pose3d &cameraPose, std::vector< VisionTargetSim > targets)
void SubmitProcessedFrame(const PhotonPipelineResult &result)
bool CanSeeCorner(const std::vector< cv::Point2f > &points)
void SetMinTargetAreaPixels(double areaPx)
Definition PhotonCameraSim.h:74
void SubmitProcessedFrame(const PhotonPipelineResult &result, uint64_t ReceiveTimestamp)
void EnableRawStream(bool enabled)
Definition PhotonCameraSim.h:78
double GetMinTargetAreaPercent()
Definition PhotonCameraSim.h:58
void SetMaxSightRange(units::meter_t range)
Definition PhotonCameraSim.h:77
bool CanSeeTargetPose(const frc::Pose3d &camPose, const VisionTargetSim &target)
PhotonCameraSim(PhotonCamera *camera)
void SetMinTargetAreaPercent(double areaPercent)
Definition PhotonCameraSim.h:71
PhotonCameraSim(PhotonCamera *camera, const SimCameraProperties &props)
Represents a pipeline result from a PhotonCamera.
Definition PhotonPipelineResult.h:37
Definition SimCameraProperties.h:44
int GetResArea() const
Definition SimCameraProperties.h:80
Definition VisionTargetSim.h:34
Definition VisionEstimation.h:32