Valkyrie 2026
Loading...
Searching...
No Matches
Limelight.h
1#pragma once
2#include <LimelightHelpers.h>
3
4#include <frc/geometry/Pose3d.h>
5#include <frc/util/Color.h>
6#include <units/angle.h>
7#include <units/angular_acceleration.h>
8#include <units/angular_velocity.h>
9#include <units/time.h>
10#include <valkyrie/Loggable.h>
11#include <wpi/struct/Struct.h>
12
13namespace valor {
14
15namespace cameras {
16
17class Limelight : public Loggable {
18 public:
36
54
76
78 enum class StreamMode {
85 };
86
94 units::millisecond_t targetLatency;
96 units::millisecond_t captureLatency;
98 units::degree_t tx;
100 units::degree_t ty;
102 units::degree_t txnc;
104 units::degree_t tync;
106 double ta;
108 int tid;
122 units::degree_t targetSkew;
123 };
124
128 double x0;
130 double y0;
132 double x1;
134 double y1;
135 };
136
138 struct IMUData {
140 units::degree_t robotYaw;
142 units::degree_t roll;
144 units::degree_t pitch;
146 units::degree_t yaw;
148 units::degrees_per_second_t gyroX;
150 units::degrees_per_second_t gyroY;
152 units::degrees_per_second_t gyroZ;
154 units::degrees_per_second_squared_t accelX;
156 units::degrees_per_second_squared_t accelY;
158 units::degrees_per_second_squared_t accelZ;
159
160 constexpr IMUData(LimelightHelpers::IMUData data)
161 : robotYaw{data.robotYaw},
162 roll{data.roll},
163 pitch{data.pitch},
164 yaw{data.yaw},
165 gyroX{data.gyroX},
166 gyroY{data.gyroY},
167 gyroZ{data.gyroZ},
168 accelX{data.accelX},
169 accelY{data.accelY},
170 accelZ{data.accelZ} {}
171
172 constexpr IMUData() = default;
173 };
174
176 struct RawTarget : LimelightHelpers::RawTarget {
178 units::degree_t txnc;
180 units::degree_t tync;
181
182 constexpr RawTarget(LimelightHelpers::RawTarget data) : LimelightHelpers::RawTarget{data}, txnc{data.txnc}, tync{data.tync} {}
183
184 constexpr RawTarget() = default;
185 };
186
188 struct RawFiducial : LimelightHelpers::RawFiducial {
190 units::degree_t txnc;
192 units::degree_t tync;
194 units::meter_t distToCamera;
196 units::meter_t distToRobot;
197
198 constexpr RawFiducial(LimelightHelpers::RawFiducial data)
199 : LimelightHelpers::RawFiducial{data},
200 txnc{data.txnc},
201 tync{data.tync},
203 distToRobot{data.distToRobot} {}
204
205 constexpr RawFiducial() = default;
206 };
207
209 struct RawDetection : LimelightHelpers::RawDetection {
211 units::degree_t txnc;
213 units::degree_t tync;
214
215 constexpr RawDetection(LimelightHelpers::RawDetection data)
216 : LimelightHelpers::RawDetection{data}, txnc{data.txnc}, tync{data.tync} {}
217
218 constexpr RawDetection() = default;
219 };
220
222 struct PoseEstimate : LimelightHelpers::PoseEstimate {
224 units::second_t timestamp;
226 units::millisecond_t latency;
228 units::meter_t tagSpan;
230 units::meter_t avgTagDist;
232 std::vector<RawFiducial> rawFiducials;
233
234 constexpr PoseEstimate(LimelightHelpers::PoseEstimate data)
235 : LimelightHelpers::PoseEstimate{data},
236 timestamp{data.timestampSeconds},
237 latency{data.latency},
238 tagSpan{data.tagSpan},
240 rawFiducials{data.rawFiducials.begin(), data.rawFiducials.end()} {}
241
242 constexpr bool IsValid() const { return !rawFiducials.empty(); }
243
244 private:
245 using LimelightHelpers::PoseEstimate::timestampSeconds;
246 };
247
253 inline explicit Limelight(std::string_view name) : name{name} {}
254
260 inline bool GetTV() const { return LimelightHelpers::getTV(name); }
261
267 inline units::degree_t GetTX() const { return units::degree_t{LimelightHelpers::getTX(name)}; }
268
274 inline units::degree_t GetTY() const { return units::degree_t{LimelightHelpers::getTY(name)}; }
275
282 inline units::degree_t GetTXNC() const { return units::degree_t{LimelightHelpers::getTXNC(name)}; }
283
290 inline units::degree_t GetTYNC() const { return units::degree_t{LimelightHelpers::getTYNC(name)}; }
291
297 inline double GetTA() const { return LimelightHelpers::getTA(name); }
298
306
312 inline int GetTargetCount() const { return LimelightHelpers::getTargetCount(name); };
313
319 inline int GetClassifierClassIndex() const { return LimelightHelpers::getClassifierClassIndex(name); }
320
326 inline int GetDetectorClassIndex() const { return LimelightHelpers::getDetectorClassIndex(name); }
327
333 inline std::string GetClassifierClass() const { return LimelightHelpers::getClassifierClass(name); }
334
340 inline std::string GetDetectorClass() const { return LimelightHelpers::getDetectorClass(name); }
341
347 inline units::millisecond_t GetLatencyPipeline() const { return units::millisecond_t{LimelightHelpers::getLatency_Pipeline(name)}; }
348
354 inline units::millisecond_t GetLatencyCapture() const { return units::millisecond_t{LimelightHelpers::getLatency_Capture(name)}; }
355
361 inline int GetCurrentPipelineIndex() const { return LimelightHelpers::getCurrentPipelineIndex(name); }
362
368 inline std::string GetCurrentPipelineType() const { return LimelightHelpers::getCurrentPipelineType(name); }
369
375 inline std::string GetJSONDump() const { return LimelightHelpers::getJSONDump(name); }
376
382 inline frc::Pose3d GetBotPose() const { return LimelightHelpers::getBotPose3d(name); }
383
389 inline frc::Pose3d GetBotPoseWpiRed() const { return LimelightHelpers::getBotPose3d_wpiRed(name); }
390
396 inline frc::Pose3d GetBotPoseWpiBlue() const { return LimelightHelpers::getBotPose3d_wpiBlue(name); }
397
403 inline frc::Pose3d GetBotPoseTargetSpace() const { return LimelightHelpers::getBotPose3d_TargetSpace(name); }
404
410 inline frc::Pose3d GetCameraPoseTargetSpace() const { return LimelightHelpers::getCameraPose3d_TargetSpace(name); }
411
417 inline frc::Pose3d GetCameraPoseRobotSpace() const { return LimelightHelpers::getCameraPose3d_RobotSpace(name); }
418
424 inline frc::Pose3d GetTargetPoseCameraSpace() const { return LimelightHelpers::getTargetPose3d_CameraSpace(name); }
425
431 inline frc::Pose3d GetTargetPoseRobotSpace() const { return LimelightHelpers::getTargetPose3d_RobotSpace(name); }
432
438 frc::Color GetTargetColor() const;
439
445 std::optional<int> GetFiducialID() const;
446
452 inline std::string GetNeuralClassID() const { return LimelightHelpers::getNeuralClassID(name); }
453
459 inline std::vector<std::string> GetRawBarcodeData() const { return LimelightHelpers::getRawBarcodeData(name); }
460
467 inline int GetHeartbeat() const { return LimelightHelpers::getHeartbeat(name); }
468
476 std::vector<CornerCoordinates> GetCornerCoordinates() const;
477
483 inline void SetPipelineIndex(int index) { LimelightHelpers::setPipelineIndex(name, index); }
484
490 inline void SetPriorityTagID(int ID) { LimelightHelpers::setPriorityTagID(name, ID); }
491
497 void SetLEDMode(LEDMode mode);
498
505
514 void SetCropWindow(double xMin, double xMax, double yMin, double yMax);
515
528 void SetRobotOrientation(units::degree_t yaw, units::degrees_per_second_t yawRate, units::degree_t pitch,
529 units::degrees_per_second_t pitchRate, units::degree_t roll, units::degrees_per_second_t rollRate,
530 bool flush = true);
531
538 inline void SetKeystone(double horizontal, double vertical) { LimelightHelpers::setKeystone(name, horizontal, vertical); }
539
547 inline void SetIMUMode(IMUMode mode) { LimelightHelpers::SetIMUMode(name, static_cast<int>(mode)); }
548
555 inline void SetIMUAssistAlpha(double alpha) { LimelightHelpers::SetIMUAssistAlpha(name, alpha); }
556
562 inline void SetThrottle(int throttle) { LimelightHelpers::SetThrottle(name, throttle); }
563
572 void SetFiducial3DOffset(const frc::Translation3d& offset);
573
580 inline void SetFiducialIDFiltersOverride(std::vector<int> validIDs) { LimelightHelpers::SetFiducialIDFiltersOverride(name, validIDs); }
581
589 inline void SetFiducialDownscalingOverride(float downscale) { LimelightHelpers::SetFiducialDownscalingOverride(name, downscale); }
590
597 void SetCameraPoseRobotSpace(const frc::Pose3d& pose);
598
604 inline void SetPythonScriptData(const std::vector<double>& outgoingData) { LimelightHelpers::setPythonScriptData(name, outgoingData); }
605
611 inline std::vector<double> GetPythonScriptData() const { return LimelightHelpers::getPythonScriptData(name); }
612
617 inline void TriggerSnapshot() { LimelightHelpers::triggerSnapshot(name); }
618
624 inline void SetRewindEnabled(bool enabled) { LimelightHelpers::setRewindEnabled(name, enabled); }
625
632 inline void TriggerRewindCapture(units::second_t duration) { LimelightHelpers::triggerRewindCapture(name, duration.value()); }
633
642
650
657 std::vector<RawFiducial> GetRawFiducials() const;
658
665 std::vector<RawDetection> GetRawDetections() const;
666
674 std::vector<RawTarget> GetRawTargets() const;
675
684 inline IMUData GetIMUData() const { return LimelightHelpers::getIMUData(name); }
685
691 inline void SetupPortForwarding() { LimelightHelpers::SetupPortForwarding(name); }
692
701 LimelightHelpers::LimelightResultsClass GetLatestResults(bool profile = false) const;
702
703 void LoggablePeriodic() override;
704
720 static inline void SetupPortForwardingUSB(int usbIndex) { LimelightHelpers::SetupPortForwardingUSB(usbIndex); }
721
729 static constexpr std::pair<units::degree_t, units::degree_t> GetFOV(Model model) {
730 switch (model) {
731 case Model::One:
732 return {54_deg, 41_deg};
733 case Model::Two:
734 case Model::TwoPlus:
735 return {62.5_deg, 48.9_deg};
736 case Model::Three:
737 return {62.5_deg, 48.9_deg};
738 case Model::ThreeA:
739 return {54.5_deg, 42_deg};
740 case Model::ThreeG:
741 return {82_deg, 56.2_deg};
742 default:
743 return {82_deg, 56.2_deg};
744 }
745 }
746
747 private:
748 std::string name;
749};
750
751} // namespace cameras
752
753} // namespace valor
754
755template <>
756struct wpi::Struct<valor::cameras::Limelight::TargetMetrics> {
757 static constexpr std::string_view GetTypeName() { return "LimelightTargetMetrics"; }
758
759 static constexpr size_t GetSize() { return 97; }
760
761 static constexpr std::string_view GetSchema() {
762 return "bool targetValid; int32 targetCount; double targetLatency; double captureLatency; double tx; double ty; double txnc; "
763 "double tync; double ta; int32 tid; int32 targetClassIndexDetector; int32 targetClassIndexClassifier; int32 "
764 "targetLongSidePixels; int32 targetShortSidePixels; int32 targetHorizontalExtentPixels; int32 targetVerticalExtentPixels; "
765 "double targetSkew";
766 }
767
768 static void Pack(std::span<uint8_t> data, const valor::cameras::Limelight::TargetMetrics& value);
769 static valor::cameras::Limelight::TargetMetrics Unpack(std::span<const uint8_t> data);
770};
771
772template <>
773struct wpi::Struct<valor::cameras::Limelight::CornerCoordinates> {
774 static constexpr std::string_view GetTypeName() { return "LimelightCornerCoordinates"; }
775
776 static constexpr size_t GetSize() { return sizeof(valor::cameras::Limelight::CornerCoordinates); }
777
778 static constexpr std::string_view GetSchema() { return "double x0; double y0; double x1; double y1"; }
779
780 static void Pack(std::span<uint8_t> data, const valor::cameras::Limelight::CornerCoordinates& value);
781 static valor::cameras::Limelight::CornerCoordinates Unpack(std::span<const uint8_t> data);
782};
783
784template <>
785struct wpi::Struct<valor::cameras::Limelight::IMUData> {
786 static constexpr std::string_view GetTypeName() { return "LimelightIMUData"; }
787
788 static constexpr size_t GetSize() { return sizeof(double) * 10; }
789
790 static constexpr std::string_view GetSchema() {
791 return "double robotYaw; double roll; double pitch; double yaw; double gyroX; double gyroY; double gyroZ; double accelX; double "
792 "accelY; double accelZ";
793 }
794
795 static void Pack(std::span<uint8_t> data, const valor::cameras::Limelight::IMUData& value);
796 static valor::cameras::Limelight::IMUData Unpack(std::span<const uint8_t> data);
797};
798
799template <>
800struct wpi::Struct<valor::cameras::Limelight::RawTarget> {
801 static constexpr std::string_view GetTypeName() { return "LimelightRawTarget"; }
802
803 static constexpr size_t GetSize() { return sizeof(double) * 3; }
804
805 static constexpr std::string_view GetSchema() { return "double txnc; double tync; double ta"; }
806
807 static void Pack(std::span<uint8_t> data, const valor::cameras::Limelight::RawTarget& value);
808 static valor::cameras::Limelight::RawTarget Unpack(std::span<const uint8_t> data);
809};
810
811template <>
812struct wpi::Struct<valor::cameras::Limelight::RawFiducial> {
813 static constexpr std::string_view GetTypeName() { return "LimelightRawFiducial"; }
814
815 static constexpr size_t GetSize() { return sizeof(int) + sizeof(double) * 6; }
816
817 static constexpr std::string_view GetSchema() {
818 return "int32 id; double txnc; double tync; double ta; double distToCamera; double distToRobot; double ambiguity";
819 }
820
821 static void Pack(std::span<uint8_t> data, const valor::cameras::Limelight::RawFiducial& value);
822 static valor::cameras::Limelight::RawFiducial Unpack(std::span<const uint8_t> data);
823};
824
825template <>
826struct wpi::Struct<valor::cameras::Limelight::RawDetection> {
827 static constexpr std::string_view GetTypeName() { return "LimelightRawDetection"; }
828
829 static constexpr size_t GetSize() { return sizeof(int) + sizeof(double) * 11; }
830
831 static constexpr std::string_view GetSchema() {
832 return "int32 classId; double txnc; double tync; double ta; double corner0_X; double corner0_Y; double corner1_X; double "
833 "corner1_Y; double corner2_X; double corner2_Y; double corner3_X; double corner3_Y";
834 }
835
836 static void Pack(std::span<uint8_t> data, const valor::cameras::Limelight::RawDetection& value);
837 static valor::cameras::Limelight::RawDetection Unpack(std::span<const uint8_t> data);
838};
Loggable(std::string_view name)
Construct a Loggable that registers a top-level table name.
int GetCurrentPipelineIndex() const
Definition Limelight.h:361
void SetRobotOrientation(units::degree_t yaw, units::degrees_per_second_t yawRate, units::degree_t pitch, units::degrees_per_second_t pitchRate, units::degree_t roll, units::degrees_per_second_t rollRate, bool flush=true)
void SetRewindEnabled(bool enabled)
Definition Limelight.h:624
void SetKeystone(double horizontal, double vertical)
Definition Limelight.h:538
frc::Pose3d GetCameraPoseRobotSpace() const
Definition Limelight.h:417
units::millisecond_t GetLatencyCapture() const
Definition Limelight.h:354
std::vector< RawDetection > GetRawDetections() const
TargetMetrics GetTargetMetrics() const
void SetIMUMode(IMUMode mode)
Definition Limelight.h:547
std::string GetJSONDump() const
Definition Limelight.h:375
frc::Pose3d GetCameraPoseTargetSpace() const
Definition Limelight.h:410
frc::Pose3d GetBotPoseWpiBlue() const
Definition Limelight.h:396
PoseEstimate GetBotPoseEstimateWpiBlue(bool mt2) const
int GetClassifierClassIndex() const
Definition Limelight.h:319
std::vector< RawFiducial > GetRawFiducials() const
std::vector< std::string > GetRawBarcodeData() const
Definition Limelight.h:459
units::degree_t GetTY() const
Definition Limelight.h:274
std::string GetNeuralClassID() const
Definition Limelight.h:452
void SetLEDMode(LEDMode mode)
frc::Color GetTargetColor() const
void SetPythonScriptData(const std::vector< double > &outgoingData)
Definition Limelight.h:604
static constexpr std::pair< units::degree_t, units::degree_t > GetFOV(Model model)
Definition Limelight.h:729
PoseEstimate GetBotPoseEstimateWpiRed(bool mt2) const
Limelight(std::string_view name)
Definition Limelight.h:253
int GetTargetCount() const
Definition Limelight.h:312
frc::Pose3d GetBotPose() const
Definition Limelight.h:382
std::optional< int > GetFiducialID() const
units::degree_t GetTYNC() const
Definition Limelight.h:290
void LoggablePeriodic() override
Periodic callback for logging updates.
frc::Pose3d GetTargetPoseRobotSpace() const
Definition Limelight.h:431
units::degree_t GetTX() const
Definition Limelight.h:267
std::string GetClassifierClass() const
Definition Limelight.h:333
Model
Model of the physical Limelight.
Definition Limelight.h:20
@ One
Limelight 1.
Definition Limelight.h:22
@ Four
Limelight 4.
Definition Limelight.h:34
@ Two
Limelight 2.
Definition Limelight.h:24
@ Three
Limelight 3.
Definition Limelight.h:28
@ ThreeA
Limelight 3A.
Definition Limelight.h:30
@ ThreeG
Limelight 3G.
Definition Limelight.h:32
@ TwoPlus
Limelight 2+.
Definition Limelight.h:26
bool GetTV() const
Definition Limelight.h:260
std::string GetDetectorClass() const
Definition Limelight.h:340
IMUData GetIMUData() const
Definition Limelight.h:684
void TriggerRewindCapture(units::second_t duration)
Definition Limelight.h:632
std::vector< CornerCoordinates > GetCornerCoordinates() const
void SetThrottle(int throttle)
Definition Limelight.h:562
void SetFiducial3DOffset(const frc::Translation3d &offset)
void SetPipelineIndex(int index)
Definition Limelight.h:483
void SetCameraPoseRobotSpace(const frc::Pose3d &pose)
StreamMode
Limelight streaming mode.
Definition Limelight.h:78
@ PiPSecondary
The primary camera stream is placed in the lower-right corner of the secondary camera stream.
Definition Limelight.h:84
@ PiPMain
The secondary camera stream is placed in the lower-right corner of the primary camera stream.
Definition Limelight.h:82
@ Standard
Side-by-side streams if a webcam is attached to the Limelight.
Definition Limelight.h:80
LEDMode
LED mode of the Limelight.
Definition Limelight.h:56
@ ForceOnRight
Force on (right LEDs only).
Definition Limelight.h:68
@ ForceOff
Force off the LEDs.
Definition Limelight.h:60
@ ForceBlinkRight
Force blink (right LEDs only).
Definition Limelight.h:74
@ ForceBlink
Force blink the LEDs.
Definition Limelight.h:62
@ ForceOn
Force on the LEDs.
Definition Limelight.h:64
@ ForceOnLeft
Force on (left LEDs only).
Definition Limelight.h:66
@ ForceBlinkLeft
Force blink (left LEDs only).
Definition Limelight.h:72
@ BounceHalves
Bounce the halves of the LEDs.
Definition Limelight.h:70
@ PipelineControl
Use the LED mode set in the current pipeline.
Definition Limelight.h:58
std::string GetCurrentPipelineType() const
Definition Limelight.h:368
frc::Pose3d GetBotPoseTargetSpace() const
Definition Limelight.h:403
frc::Pose3d GetTargetPoseCameraSpace() const
Definition Limelight.h:424
double GetTA() const
Definition Limelight.h:297
void SetPriorityTagID(int ID)
Definition Limelight.h:490
void SetStreamMode(StreamMode mode)
int GetHeartbeat() const
Definition Limelight.h:467
void SetCropWindow(double xMin, double xMax, double yMin, double yMax)
units::millisecond_t GetLatencyPipeline() const
Definition Limelight.h:347
units::degree_t GetTXNC() const
Definition Limelight.h:282
void TriggerSnapshot()
Definition Limelight.h:617
std::vector< double > GetPythonScriptData() const
Definition Limelight.h:611
void SetIMUAssistAlpha(double alpha)
Definition Limelight.h:555
void SetFiducialIDFiltersOverride(std::vector< int > validIDs)
Definition Limelight.h:580
std::vector< RawTarget > GetRawTargets() const
LimelightHelpers::LimelightResultsClass GetLatestResults(bool profile=false) const
int GetDetectorClassIndex() const
Definition Limelight.h:326
frc::Pose3d GetBotPoseWpiRed() const
Definition Limelight.h:389
IMUMode
Definition Limelight.h:42
@ InternalMT1Assist
Use the internal IMU with MT1 assisted convergence.
Definition Limelight.h:50
@ ExternalOnly
Use the external IMU (robot yaw) only.
Definition Limelight.h:44
@ ExternalSeed
Use the external IMU (robot yaw) and seed the internal IMU.
Definition Limelight.h:46
@ InternalExternalAssist
Use the internal IMU with external IMU assisted convergence.
Definition Limelight.h:52
@ InternalOnly
Use the internal IMU only.
Definition Limelight.h:48
static void SetupPortForwardingUSB(int usbIndex)
Definition Limelight.h:720
void SetFiducialDownscalingOverride(float downscale)
Definition Limelight.h:589
void SetupPortForwarding()
Definition Limelight.h:691
Structure representing coordinates of a target.
Definition Limelight.h:126
double y0
Top left corner Y in pixels.
Definition Limelight.h:130
double x1
Bottom right corner X in pixels.
Definition Limelight.h:132
double y1
Bottom right corner Y in pixels.
Definition Limelight.h:134
double x0
Top left corner X in pixels.
Definition Limelight.h:128
IMU data of the Limelight.
Definition Limelight.h:138
units::degree_t robotYaw
Robot yaw.
Definition Limelight.h:140
units::degrees_per_second_squared_t accelX
Roll acceleration of the IMU.
Definition Limelight.h:154
units::degrees_per_second_t gyroX
Roll velocity of the IMU.
Definition Limelight.h:148
units::degrees_per_second_squared_t accelY
Pitch acceleration of the IMU.
Definition Limelight.h:156
units::degree_t pitch
Pitch of the IMU.
Definition Limelight.h:144
units::degree_t roll
Roll of the IMU.
Definition Limelight.h:142
units::degrees_per_second_t gyroZ
Yaw velocity of the IMU.
Definition Limelight.h:152
units::degrees_per_second_squared_t accelZ
Yaw acceleration of the IMU.
Definition Limelight.h:158
units::degree_t yaw
Yaw of the IMU.
Definition Limelight.h:146
units::degrees_per_second_t gyroY
Pitch velocity of the IMU.
Definition Limelight.h:150
Pose Estimate of the Limelight.
Definition Limelight.h:222
std::vector< RawFiducial > rawFiducials
Array of the raw fiducials.
Definition Limelight.h:232
units::second_t timestamp
Timestamp of the measurement (NT time base).
Definition Limelight.h:224
units::millisecond_t latency
Latency of the measurement.
Definition Limelight.h:226
units::meter_t avgTagDist
Average tag distance from camera.
Definition Limelight.h:230
units::meter_t tagSpan
Average tag width.
Definition Limelight.h:228
Raw detection result of the Limelight.
Definition Limelight.h:209
units::degree_t tync
Vertical offset from principal pixel to target.
Definition Limelight.h:213
units::degree_t txnc
Horizontal offset from principal pixel to target.
Definition Limelight.h:211
Raw fiducial result of the Limelight.
Definition Limelight.h:188
units::degree_t tync
Vertical offset from principal pixel to target.
Definition Limelight.h:192
units::meter_t distToRobot
Distance from target to robot.
Definition Limelight.h:196
units::meter_t distToCamera
Distance from target to camera.
Definition Limelight.h:194
units::degree_t txnc
Horizontal offset principal pixel to target.
Definition Limelight.h:190
Raw target result of the Limelight.
Definition Limelight.h:176
units::degree_t txnc
Horizontal offset from principal pixel to target.
Definition Limelight.h:178
units::degree_t tync
Vertical offset from principal pixel to target.
Definition Limelight.h:180
Targeting metrics of the Limelight.
Definition Limelight.h:88
int targetHorizontalExtentPixels
Number of pixels horizontally of the target.
Definition Limelight.h:118
int targetCount
How many targets are being detected.
Definition Limelight.h:92
int targetVerticalExtentPixels
Number of pixels vertically of the tagret.
Definition Limelight.h:120
units::degree_t tx
Horizontal offset from crosshair to target.
Definition Limelight.h:98
double ta
Target area of image (0% to 100%).
Definition Limelight.h:106
units::degree_t tync
Vertical offset from principle pixel to target.
Definition Limelight.h:104
int targetLongSidePixels
Number of pixels on the target long side.
Definition Limelight.h:114
units::degree_t ty
Vertical offset from crosshair to target.
Definition Limelight.h:100
int targetClassIndexClassifier
Target class index classifier.
Definition Limelight.h:112
int targetShortSidePixels
Number of pixels on the target short side.
Definition Limelight.h:116
units::millisecond_t targetLatency
The pipeline latency.
Definition Limelight.h:94
bool targetValid
Whether the target is valid or not.
Definition Limelight.h:90
int targetClassIndexDetector
Target class index detector.
Definition Limelight.h:110
int tid
ID of the primary in-view AprilTag.
Definition Limelight.h:108
units::degree_t txnc
Horizontal offset from principle pixel to target.
Definition Limelight.h:102
units::degree_t targetSkew
Skew of the target.
Definition Limelight.h:122
units::millisecond_t captureLatency
The capture latency.
Definition Limelight.h:96