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 <wpi/struct/Struct.h>
11
12#include "valkyrie/Loggable.h"
13
14namespace valor {
15
16namespace cameras {
17
18class Limelight : public Loggable {
19 public:
37
55
77
79 enum class StreamMode {
86 };
87
95 units::millisecond_t targetLatency;
97 units::millisecond_t captureLatency;
99 units::degree_t tx;
101 units::degree_t ty;
103 units::degree_t txnc;
105 units::degree_t tync;
107 double ta;
109 int tid;
123 units::degree_t targetSkew;
124 };
125
129 double x0;
131 double y0;
133 double x1;
135 double y1;
136 };
137
139 struct IMUData {
141 units::degree_t robotYaw;
143 units::degree_t roll;
145 units::degree_t pitch;
147 units::degree_t yaw;
149 units::degrees_per_second_t gyroX;
151 units::degrees_per_second_t gyroY;
153 units::degrees_per_second_t gyroZ;
155 units::degrees_per_second_squared_t accelX;
157 units::degrees_per_second_squared_t accelY;
159 units::degrees_per_second_squared_t accelZ;
160
161 constexpr IMUData(LimelightHelpers::IMUData data)
162 : robotYaw{data.robotYaw},
163 roll{data.roll},
164 pitch{data.pitch},
165 yaw{data.yaw},
166 gyroX{data.gyroX},
167 gyroY{data.gyroY},
168 gyroZ{data.gyroZ},
169 accelX{data.accelX},
170 accelY{data.accelY},
171 accelZ{data.accelZ} {}
172
173 constexpr IMUData() = default;
174 };
175
177 struct RawTarget : LimelightHelpers::RawTarget {
179 units::degree_t txnc;
181 units::degree_t tync;
182
183 constexpr RawTarget(LimelightHelpers::RawTarget data) : LimelightHelpers::RawTarget{data}, txnc{data.txnc}, tync{data.tync} {}
184
185 constexpr RawTarget() = default;
186 };
187
189 struct RawFiducial : LimelightHelpers::RawFiducial {
191 units::degree_t txnc;
193 units::degree_t tync;
195 units::meter_t distToCamera;
197 units::meter_t distToRobot;
198
199 constexpr RawFiducial(LimelightHelpers::RawFiducial data)
200 : LimelightHelpers::RawFiducial{data},
201 txnc{data.txnc},
202 tync{data.tync},
204 distToRobot{data.distToRobot} {}
205
206 constexpr RawFiducial() = default;
207 };
208
210 struct RawDetection : LimelightHelpers::RawDetection {
212 units::degree_t txnc;
214 units::degree_t tync;
215
216 constexpr RawDetection(LimelightHelpers::RawDetection data)
217 : LimelightHelpers::RawDetection{data}, txnc{data.txnc}, tync{data.tync} {}
218
219 constexpr RawDetection() = default;
220 };
221
223 struct PoseEstimate : LimelightHelpers::PoseEstimate {
225 units::second_t timestamp;
227 units::millisecond_t latency;
229 units::meter_t tagSpan;
231 units::meter_t avgTagDist;
233 std::vector<RawFiducial> rawFiducials;
234
235 constexpr PoseEstimate(LimelightHelpers::PoseEstimate data)
236 : LimelightHelpers::PoseEstimate{data},
237 timestamp{data.timestampSeconds},
238 latency{data.latency},
239 tagSpan{data.tagSpan},
241 rawFiducials{data.rawFiducials.begin(), data.rawFiducials.end()} {}
242
243 constexpr bool IsValid() const { return !rawFiducials.empty(); }
244
245 private:
246 using LimelightHelpers::PoseEstimate::timestampSeconds;
247 };
248
254 inline explicit Limelight(std::string_view name) : name{name} {}
255
261 inline bool GetTV() const { return LimelightHelpers::getTV(name); }
262
268 inline units::degree_t GetTX() const { return units::degree_t{LimelightHelpers::getTX(name)}; }
269
275 inline units::degree_t GetTY() const { return units::degree_t{LimelightHelpers::getTY(name)}; }
276
283 inline units::degree_t GetTXNC() const { return units::degree_t{LimelightHelpers::getTXNC(name)}; }
284
291 inline units::degree_t GetTYNC() const { return units::degree_t{LimelightHelpers::getTYNC(name)}; }
292
298 inline double GetTA() const { return LimelightHelpers::getTA(name); }
299
307
313 inline int GetTargetCount() const { return LimelightHelpers::getTargetCount(name); };
314
320 inline int GetClassifierClassIndex() const { return LimelightHelpers::getClassifierClassIndex(name); }
321
327 inline int GetDetectorClassIndex() const { return LimelightHelpers::getDetectorClassIndex(name); }
328
334 inline std::string GetClassifierClass() const { return LimelightHelpers::getClassifierClass(name); }
335
341 inline std::string GetDetectorClass() const { return LimelightHelpers::getDetectorClass(name); }
342
348 inline units::millisecond_t GetLatencyPipeline() const { return units::millisecond_t{LimelightHelpers::getLatency_Pipeline(name)}; }
349
355 inline units::millisecond_t GetLatencyCapture() const { return units::millisecond_t{LimelightHelpers::getLatency_Capture(name)}; }
356
362 inline int GetCurrentPipelineIndex() const { return LimelightHelpers::getCurrentPipelineIndex(name); }
363
369 inline std::string GetCurrentPipelineType() const { return LimelightHelpers::getCurrentPipelineType(name); }
370
376 inline std::string GetJSONDump() const { return LimelightHelpers::getJSONDump(name); }
377
383 inline frc::Pose3d GetBotPose() const { return LimelightHelpers::getBotPose3d(name); }
384
390 inline frc::Pose3d GetBotPoseWpiRed() const { return LimelightHelpers::getBotPose3d_wpiRed(name); }
391
397 inline frc::Pose3d GetBotPoseWpiBlue() const { return LimelightHelpers::getBotPose3d_wpiBlue(name); }
398
404 inline frc::Pose3d GetBotPoseTargetSpace() const { return LimelightHelpers::getBotPose3d_TargetSpace(name); }
405
411 inline frc::Pose3d GetCameraPoseTargetSpace() const { return LimelightHelpers::getCameraPose3d_TargetSpace(name); }
412
418 inline frc::Pose3d GetCameraPoseRobotSpace() const { return LimelightHelpers::getCameraPose3d_RobotSpace(name); }
419
425 inline frc::Pose3d GetTargetPoseCameraSpace() const { return LimelightHelpers::getTargetPose3d_CameraSpace(name); }
426
432 inline frc::Pose3d GetTargetPoseRobotSpace() const { return LimelightHelpers::getTargetPose3d_RobotSpace(name); }
433
439 frc::Color GetTargetColor() const;
440
446 std::optional<int> GetFiducialID() const;
447
453 inline std::string GetNeuralClassID() const { return LimelightHelpers::getNeuralClassID(name); }
454
460 inline std::vector<std::string> GetRawBarcodeData() const { return LimelightHelpers::getRawBarcodeData(name); }
461
468 inline int GetHeartbeat() const { return LimelightHelpers::getHeartbeat(name); }
469
477 std::vector<CornerCoordinates> GetCornerCoordinates() const;
478
484 inline void SetPipelineIndex(int index) { LimelightHelpers::setPipelineIndex(name, index); }
485
491 inline void SetPriorityTagID(int ID) { LimelightHelpers::setPriorityTagID(name, ID); }
492
498 void SetLEDMode(LEDMode mode);
499
506
515 void SetCropWindow(double xMin, double xMax, double yMin, double yMax);
516
529 void SetRobotOrientation(units::degree_t yaw, units::degrees_per_second_t yawRate, units::degree_t pitch,
530 units::degrees_per_second_t pitchRate, units::degree_t roll, units::degrees_per_second_t rollRate,
531 bool flush = true);
532
539 inline void SetKeystone(double horizontal, double vertical) { LimelightHelpers::setKeystone(name, horizontal, vertical); }
540
548 inline void SetIMUMode(IMUMode mode) { LimelightHelpers::SetIMUMode(name, static_cast<int>(mode)); }
549
556 inline void SetIMUAssistAlpha(double alpha) { LimelightHelpers::SetIMUAssistAlpha(name, alpha); }
557
563 inline void SetThrottle(int throttle) { LimelightHelpers::SetThrottle(name, throttle); }
564
573 void SetFiducial3DOffset(const frc::Translation3d& offset);
574
581 inline void SetFiducialIDFiltersOverride(std::vector<int> validIDs) { LimelightHelpers::SetFiducialIDFiltersOverride(name, validIDs); }
582
590 inline void SetFiducialDownscalingOverride(float downscale) { LimelightHelpers::SetFiducialDownscalingOverride(name, downscale); }
591
598 void SetCameraPoseRobotSpace(const frc::Pose3d& pose);
599
605 inline void SetPythonScriptData(const std::vector<double>& outgoingData) { LimelightHelpers::setPythonScriptData(name, outgoingData); }
606
612 inline std::vector<double> GetPythonScriptData() const { return LimelightHelpers::getPythonScriptData(name); }
613
618 inline void TriggerSnapshot() { LimelightHelpers::triggerSnapshot(name); }
619
625 inline void SetRewindEnabled(bool enabled) { LimelightHelpers::setRewindEnabled(name, enabled); }
626
633 inline void TriggerRewindCapture(units::second_t duration) { LimelightHelpers::triggerRewindCapture(name, duration.value()); }
634
643
651
658 std::vector<RawFiducial> GetRawFiducials() const;
659
666 std::vector<RawDetection> GetRawDetections() const;
667
675 std::vector<RawTarget> GetRawTargets() const;
676
685 inline IMUData GetIMUData() const { return LimelightHelpers::getIMUData(name); }
686
692 inline void SetupPortForwarding() { LimelightHelpers::SetupPortForwarding(name); }
693
702 LimelightHelpers::LimelightResultsClass GetLatestResults(bool profile = false) const;
703
704 void LoggablePeriodic() override;
705
721 static inline void SetupPortForwardingUSB(int usbIndex) { LimelightHelpers::SetupPortForwardingUSB(usbIndex); }
722
730 static constexpr std::pair<units::degree_t, units::degree_t> GetFOV(Model model) {
731 switch (model) {
732 case Model::One:
733 return {54_deg, 41_deg};
734 case Model::Two:
735 case Model::TwoPlus:
736 return {62.5_deg, 48.9_deg};
737 case Model::Three:
738 return {62.5_deg, 48.9_deg};
739 case Model::ThreeA:
740 return {54.5_deg, 42_deg};
741 case Model::ThreeG:
742 return {82_deg, 56.2_deg};
743 default:
744 return {82_deg, 56.2_deg};
745 }
746 }
747
748 private:
749 std::string name;
750};
751
752} // namespace cameras
753
754} // namespace valor
755
756template <>
757struct wpi::Struct<valor::cameras::Limelight::TargetMetrics> {
758 static constexpr std::string_view GetTypeName() { return "LimelightTargetMetrics"; }
759
760 static constexpr size_t GetSize() { return 97; }
761
762 static constexpr std::string_view GetSchema() {
763 return "bool targetValid; int32 targetCount; double targetLatency; double captureLatency; double tx; double ty; double txnc; "
764 "double tync; double ta; int32 tid; int32 targetClassIndexDetector; int32 targetClassIndexClassifier; int32 "
765 "targetLongSidePixels; int32 targetShortSidePixels; int32 targetHorizontalExtentPixels; int32 targetVerticalExtentPixels; "
766 "double targetSkew";
767 }
768
769 static void Pack(std::span<uint8_t> data, const valor::cameras::Limelight::TargetMetrics& value);
770 static valor::cameras::Limelight::TargetMetrics Unpack(std::span<const uint8_t> data);
771};
772
773template <>
774struct wpi::Struct<valor::cameras::Limelight::CornerCoordinates> {
775 static constexpr std::string_view GetTypeName() { return "LimelightCornerCoordinates"; }
776
777 static constexpr size_t GetSize() { return sizeof(valor::cameras::Limelight::CornerCoordinates); }
778
779 static constexpr std::string_view GetSchema() { return "double x0; double y0; double x1; double y1"; }
780
781 static void Pack(std::span<uint8_t> data, const valor::cameras::Limelight::CornerCoordinates& value);
782 static valor::cameras::Limelight::CornerCoordinates Unpack(std::span<const uint8_t> data);
783};
784
785template <>
786struct wpi::Struct<valor::cameras::Limelight::IMUData> {
787 static constexpr std::string_view GetTypeName() { return "LimelightIMUData"; }
788
789 static constexpr size_t GetSize() { return sizeof(double) * 10; }
790
791 static constexpr std::string_view GetSchema() {
792 return "double robotYaw; double roll; double pitch; double yaw; double gyroX; double gyroY; double gyroZ; double accelX; double "
793 "accelY; double accelZ";
794 }
795
796 static void Pack(std::span<uint8_t> data, const valor::cameras::Limelight::IMUData& value);
797 static valor::cameras::Limelight::IMUData Unpack(std::span<const uint8_t> data);
798};
799
800template <>
801struct wpi::Struct<valor::cameras::Limelight::RawTarget> {
802 static constexpr std::string_view GetTypeName() { return "LimelightRawTarget"; }
803
804 static constexpr size_t GetSize() { return sizeof(double) * 3; }
805
806 static constexpr std::string_view GetSchema() { return "double txnc; double tync; double ta"; }
807
808 static void Pack(std::span<uint8_t> data, const valor::cameras::Limelight::RawTarget& value);
809 static valor::cameras::Limelight::RawTarget Unpack(std::span<const uint8_t> data);
810};
811
812template <>
813struct wpi::Struct<valor::cameras::Limelight::RawFiducial> {
814 static constexpr std::string_view GetTypeName() { return "LimelightRawFiducial"; }
815
816 static constexpr size_t GetSize() { return sizeof(int) + sizeof(double) * 6; }
817
818 static constexpr std::string_view GetSchema() {
819 return "int32 id; double txnc; double tync; double ta; double distToCamera; double distToRobot; double ambiguity";
820 }
821
822 static void Pack(std::span<uint8_t> data, const valor::cameras::Limelight::RawFiducial& value);
823 static valor::cameras::Limelight::RawFiducial Unpack(std::span<const uint8_t> data);
824};
825
826template <>
827struct wpi::Struct<valor::cameras::Limelight::RawDetection> {
828 static constexpr std::string_view GetTypeName() { return "LimelightRawDetection"; }
829
830 static constexpr size_t GetSize() { return sizeof(int) + sizeof(double) * 11; }
831
832 static constexpr std::string_view GetSchema() {
833 return "int32 classId; double txnc; double tync; double ta; double corner0_X; double corner0_Y; double corner1_X; double "
834 "corner1_Y; double corner2_X; double corner2_Y; double corner3_X; double corner3_Y";
835 }
836
837 static void Pack(std::span<uint8_t> data, const valor::cameras::Limelight::RawDetection& value);
838 static valor::cameras::Limelight::RawDetection Unpack(std::span<const uint8_t> data);
839};
Loggable(std::string_view name)
Construct a Loggable that registers a top-level table name.
int GetCurrentPipelineIndex() const
Definition Limelight.h:362
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:625
void SetKeystone(double horizontal, double vertical)
Definition Limelight.h:539
frc::Pose3d GetCameraPoseRobotSpace() const
Definition Limelight.h:418
units::millisecond_t GetLatencyCapture() const
Definition Limelight.h:355
std::vector< RawDetection > GetRawDetections() const
TargetMetrics GetTargetMetrics() const
void SetIMUMode(IMUMode mode)
Definition Limelight.h:548
std::string GetJSONDump() const
Definition Limelight.h:376
frc::Pose3d GetCameraPoseTargetSpace() const
Definition Limelight.h:411
frc::Pose3d GetBotPoseWpiBlue() const
Definition Limelight.h:397
PoseEstimate GetBotPoseEstimateWpiBlue(bool mt2) const
int GetClassifierClassIndex() const
Definition Limelight.h:320
std::vector< RawFiducial > GetRawFiducials() const
std::vector< std::string > GetRawBarcodeData() const
Definition Limelight.h:460
units::degree_t GetTY() const
Definition Limelight.h:275
std::string GetNeuralClassID() const
Definition Limelight.h:453
void SetLEDMode(LEDMode mode)
frc::Color GetTargetColor() const
void SetPythonScriptData(const std::vector< double > &outgoingData)
Definition Limelight.h:605
static constexpr std::pair< units::degree_t, units::degree_t > GetFOV(Model model)
Definition Limelight.h:730
PoseEstimate GetBotPoseEstimateWpiRed(bool mt2) const
Limelight(std::string_view name)
Definition Limelight.h:254
int GetTargetCount() const
Definition Limelight.h:313
frc::Pose3d GetBotPose() const
Definition Limelight.h:383
std::optional< int > GetFiducialID() const
units::degree_t GetTYNC() const
Definition Limelight.h:291
void LoggablePeriodic() override
Periodic callback for logging updates.
frc::Pose3d GetTargetPoseRobotSpace() const
Definition Limelight.h:432
units::degree_t GetTX() const
Definition Limelight.h:268
std::string GetClassifierClass() const
Definition Limelight.h:334
Model
Model of the physical Limelight.
Definition Limelight.h:21
@ One
Limelight 1.
Definition Limelight.h:23
@ Four
Limelight 4.
Definition Limelight.h:35
@ Two
Limelight 2.
Definition Limelight.h:25
@ Three
Limelight 3.
Definition Limelight.h:29
@ ThreeA
Limelight 3A.
Definition Limelight.h:31
@ ThreeG
Limelight 3G.
Definition Limelight.h:33
@ TwoPlus
Limelight 2+.
Definition Limelight.h:27
bool GetTV() const
Definition Limelight.h:261
std::string GetDetectorClass() const
Definition Limelight.h:341
IMUData GetIMUData() const
Definition Limelight.h:685
void TriggerRewindCapture(units::second_t duration)
Definition Limelight.h:633
std::vector< CornerCoordinates > GetCornerCoordinates() const
void SetThrottle(int throttle)
Definition Limelight.h:563
void SetFiducial3DOffset(const frc::Translation3d &offset)
void SetPipelineIndex(int index)
Definition Limelight.h:484
void SetCameraPoseRobotSpace(const frc::Pose3d &pose)
StreamMode
Limelight streaming mode.
Definition Limelight.h:79
@ PiPSecondary
The primary camera stream is placed in the lower-right corner of the secondary camera stream.
Definition Limelight.h:85
@ PiPMain
The secondary camera stream is placed in the lower-right corner of the primary camera stream.
Definition Limelight.h:83
@ Standard
Side-by-side streams if a webcam is attached to the Limelight.
Definition Limelight.h:81
LEDMode
LED mode of the Limelight.
Definition Limelight.h:57
@ ForceOnRight
Force on (right LEDs only).
Definition Limelight.h:69
@ ForceOff
Force off the LEDs.
Definition Limelight.h:61
@ ForceBlinkRight
Force blink (right LEDs only).
Definition Limelight.h:75
@ ForceBlink
Force blink the LEDs.
Definition Limelight.h:63
@ ForceOn
Force on the LEDs.
Definition Limelight.h:65
@ ForceOnLeft
Force on (left LEDs only).
Definition Limelight.h:67
@ ForceBlinkLeft
Force blink (left LEDs only).
Definition Limelight.h:73
@ BounceHalves
Bounce the halves of the LEDs.
Definition Limelight.h:71
@ PipelineControl
Use the LED mode set in the current pipeline.
Definition Limelight.h:59
std::string GetCurrentPipelineType() const
Definition Limelight.h:369
frc::Pose3d GetBotPoseTargetSpace() const
Definition Limelight.h:404
frc::Pose3d GetTargetPoseCameraSpace() const
Definition Limelight.h:425
double GetTA() const
Definition Limelight.h:298
void SetPriorityTagID(int ID)
Definition Limelight.h:491
void SetStreamMode(StreamMode mode)
int GetHeartbeat() const
Definition Limelight.h:468
void SetCropWindow(double xMin, double xMax, double yMin, double yMax)
units::millisecond_t GetLatencyPipeline() const
Definition Limelight.h:348
units::degree_t GetTXNC() const
Definition Limelight.h:283
void TriggerSnapshot()
Definition Limelight.h:618
std::vector< double > GetPythonScriptData() const
Definition Limelight.h:612
void SetIMUAssistAlpha(double alpha)
Definition Limelight.h:556
void SetFiducialIDFiltersOverride(std::vector< int > validIDs)
Definition Limelight.h:581
std::vector< RawTarget > GetRawTargets() const
LimelightHelpers::LimelightResultsClass GetLatestResults(bool profile=false) const
int GetDetectorClassIndex() const
Definition Limelight.h:327
frc::Pose3d GetBotPoseWpiRed() const
Definition Limelight.h:390
IMUMode
Definition Limelight.h:43
@ InternalMT1Assist
Use the internal IMU with MT1 assisted convergence.
Definition Limelight.h:51
@ ExternalOnly
Use the external IMU (robot yaw) only.
Definition Limelight.h:45
@ ExternalSeed
Use the external IMU (robot yaw) and seed the internal IMU.
Definition Limelight.h:47
@ InternalExternalAssist
Use the internal IMU with external IMU assisted convergence.
Definition Limelight.h:53
@ InternalOnly
Use the internal IMU only.
Definition Limelight.h:49
static void SetupPortForwardingUSB(int usbIndex)
Definition Limelight.h:721
void SetFiducialDownscalingOverride(float downscale)
Definition Limelight.h:590
void SetupPortForwarding()
Definition Limelight.h:692
Structure representing coordinates of a target.
Definition Limelight.h:127
double y0
Top left corner Y in pixels.
Definition Limelight.h:131
double x1
Bottom right corner X in pixels.
Definition Limelight.h:133
double y1
Bottom right corner Y in pixels.
Definition Limelight.h:135
double x0
Top left corner X in pixels.
Definition Limelight.h:129
IMU data of the Limelight.
Definition Limelight.h:139
units::degree_t robotYaw
Robot yaw.
Definition Limelight.h:141
units::degrees_per_second_squared_t accelX
Roll acceleration of the IMU.
Definition Limelight.h:155
units::degrees_per_second_t gyroX
Roll velocity of the IMU.
Definition Limelight.h:149
units::degrees_per_second_squared_t accelY
Pitch acceleration of the IMU.
Definition Limelight.h:157
units::degree_t pitch
Pitch of the IMU.
Definition Limelight.h:145
units::degree_t roll
Roll of the IMU.
Definition Limelight.h:143
units::degrees_per_second_t gyroZ
Yaw velocity of the IMU.
Definition Limelight.h:153
units::degrees_per_second_squared_t accelZ
Yaw acceleration of the IMU.
Definition Limelight.h:159
units::degree_t yaw
Yaw of the IMU.
Definition Limelight.h:147
units::degrees_per_second_t gyroY
Pitch velocity of the IMU.
Definition Limelight.h:151
Pose Estimate of the Limelight.
Definition Limelight.h:223
std::vector< RawFiducial > rawFiducials
Array of the raw fiducials.
Definition Limelight.h:233
units::second_t timestamp
Timestamp of the measurement (NT time base).
Definition Limelight.h:225
units::millisecond_t latency
Latency of the measurement.
Definition Limelight.h:227
units::meter_t avgTagDist
Average tag distance from camera.
Definition Limelight.h:231
units::meter_t tagSpan
Average tag width.
Definition Limelight.h:229
Raw detection result of the Limelight.
Definition Limelight.h:210
units::degree_t tync
Vertical offset from principal pixel to target.
Definition Limelight.h:214
units::degree_t txnc
Horizontal offset from principal pixel to target.
Definition Limelight.h:212
Raw fiducial result of the Limelight.
Definition Limelight.h:189
units::degree_t tync
Vertical offset from principal pixel to target.
Definition Limelight.h:193
units::meter_t distToRobot
Distance from target to robot.
Definition Limelight.h:197
units::meter_t distToCamera
Distance from target to camera.
Definition Limelight.h:195
units::degree_t txnc
Horizontal offset principal pixel to target.
Definition Limelight.h:191
Raw target result of the Limelight.
Definition Limelight.h:177
units::degree_t txnc
Horizontal offset from principal pixel to target.
Definition Limelight.h:179
units::degree_t tync
Vertical offset from principal pixel to target.
Definition Limelight.h:181
Targeting metrics of the Limelight.
Definition Limelight.h:89
int targetHorizontalExtentPixels
Number of pixels horizontally of the target.
Definition Limelight.h:119
int targetCount
How many targets are being detected.
Definition Limelight.h:93
int targetVerticalExtentPixels
Number of pixels vertically of the tagret.
Definition Limelight.h:121
units::degree_t tx
Horizontal offset from crosshair to target.
Definition Limelight.h:99
double ta
Target area of image (0% to 100%).
Definition Limelight.h:107
units::degree_t tync
Vertical offset from principle pixel to target.
Definition Limelight.h:105
int targetLongSidePixels
Number of pixels on the target long side.
Definition Limelight.h:115
units::degree_t ty
Vertical offset from crosshair to target.
Definition Limelight.h:101
int targetClassIndexClassifier
Target class index classifier.
Definition Limelight.h:113
int targetShortSidePixels
Number of pixels on the target short side.
Definition Limelight.h:117
units::millisecond_t targetLatency
The pipeline latency.
Definition Limelight.h:95
bool targetValid
Whether the target is valid or not.
Definition Limelight.h:91
int targetClassIndexDetector
Target class index detector.
Definition Limelight.h:111
int tid
ID of the primary in-view AprilTag.
Definition Limelight.h:109
units::degree_t txnc
Horizontal offset from principle pixel to target.
Definition Limelight.h:103
units::degree_t targetSkew
Skew of the target.
Definition Limelight.h:123
units::millisecond_t captureLatency
The capture latency.
Definition Limelight.h:97