SubZero Common
Common library components for an FRC CommandRobot
Loading...
Searching...
No Matches
LimelightHelpers.h File Reference
#include <wpinet/PortForwarder.h>
#include <string>
#include "networktables/NetworkTable.h"
#include "networktables/NetworkTableEntry.h"
#include "networktables/NetworkTableInstance.h"
#include "networktables/NetworkTableValue.h"
#include "wpi/json.h"
#include <fcntl.h>
#include <frc/geometry/Pose2d.h>
#include <frc/geometry/Pose3d.h>
#include <frc/geometry/Rotation2d.h>
#include <frc/geometry/Rotation3d.h>
#include <frc/geometry/Translation2d.h>
#include <frc/geometry/Translation3d.h>
#include <units/time.h>
#include <chrono>
#include <cstring>
#include <iostream>
#include <memory>
#include <vector>
+ Include dependency graph for LimelightHelpers.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  LimelightHelpers::RawFiducial
 
class  LimelightHelpers::PoseEstimate
 
class  LimelightHelpers::SingleTargetingResultClass
 
class  LimelightHelpers::RetroreflectiveResultClass
 
class  LimelightHelpers::FiducialResultClass
 
class  LimelightHelpers::DetectionResultClass
 
class  LimelightHelpers::ClassificationResultClass
 
class  LimelightHelpers::VisionResultsClass
 
class  LimelightHelpers::LimelightResultsClass
 

Namespaces

namespace  LimelightHelpers
 
namespace  LimelightHelpers::internal
 

Macros

#define M_PI   3.14159265358979323846
 

Functions

std::string LimelightHelpers::sanitizeName (const std::string &name)
 
frc::Pose3d LimelightHelpers::toPose3D (const std::vector< double > &inData)
 
frc::Pose2d LimelightHelpers::toPose2D (const std::vector< double > &inData)
 
std::shared_ptr< nt::NetworkTable > LimelightHelpers::getLimelightNTTable (const std::string &tableName)
 
nt::NetworkTableEntry LimelightHelpers::getLimelightNTTableEntry (const std::string &tableName, const std::string &entryName)
 
double LimelightHelpers::getLimelightNTDouble (const std::string &tableName, const std::string &entryName)
 
std::vector< double > LimelightHelpers::getLimelightNTDoubleArray (const std::string &tableName, const std::string &entryName)
 
std::string LimelightHelpers::getLimelightNTString (const std::string &tableName, const std::string &entryName)
 
void LimelightHelpers::setLimelightNTDouble (const std::string &tableName, const std::string entryName, double val)
 
void LimelightHelpers::setLimelightNTDoubleArray (const std::string &tableName, const std::string &entryName, const std::span< const double > &vals)
 
double LimelightHelpers::getTX (const std::string &limelightName="")
 
double LimelightHelpers::getTV (const std::string &limelightName="")
 
double LimelightHelpers::getTY (const std::string &limelightName="")
 
double LimelightHelpers::getTA (const std::string &limelightName="")
 
double LimelightHelpers::getLatency_Pipeline (const std::string &limelightName="")
 
double LimelightHelpers::getLatency_Capture (const std::string &limelightName="")
 
std::string LimelightHelpers::getJSONDump (const std::string &limelightName="")
 
std::vector< double > LimelightHelpers::getBotpose (const std::string &limelightName="")
 
std::vector< double > LimelightHelpers::getBotpose_wpiRed (const std::string &limelightName="")
 
std::vector< double > LimelightHelpers::getBotpose_wpiBlue (const std::string &limelightName="")
 
std::vector< double > LimelightHelpers::getBotpose_TargetSpace (const std::string &limelightName="")
 
std::vector< double > LimelightHelpers::getCameraPose_TargetSpace (const std::string &limelightName="")
 
std::vector< double > LimelightHelpers::getCameraPose_RobotSpace (const std::string &limelightName="")
 
std::vector< double > LimelightHelpers::getTargetPose_CameraSpace (const std::string &limelightName="")
 
std::vector< double > LimelightHelpers::getTargetPose_RobotSpace (const std::string &limelightName="")
 
std::vector< double > LimelightHelpers::getTargetColor (const std::string &limelightName="")
 
double LimelightHelpers::getFiducialID (const std::string &limelightName="")
 
std::string LimelightHelpers::getNeuralClassID (const std::string &limelightName="")
 
void LimelightHelpers::setPipelineIndex (const std::string &limelightName, int index)
 
void LimelightHelpers::setPriorityTagID (const std::string &limelightName, int ID)
 
void LimelightHelpers::setLEDMode_PipelineControl (const std::string &limelightName="")
 
void LimelightHelpers::setLEDMode_ForceOff (const std::string &limelightName="")
 
void LimelightHelpers::setLEDMode_ForceBlink (const std::string &limelightName="")
 
void LimelightHelpers::setLEDMode_ForceOn (const std::string &limelightName="")
 
void LimelightHelpers::setStreamMode_Standard (const std::string &limelightName="")
 
void LimelightHelpers::setStreamMode_PiPMain (const std::string &limelightName="")
 
void LimelightHelpers::setStreamMode_PiPSecondary (const std::string &limelightName="")
 
void LimelightHelpers::setCropWindow (const std::string &limelightName, double cropXMin, double cropXMax, double cropYMin, double cropYMax)
 
void LimelightHelpers::SetRobotOrientation (const std::string &limelightName, double yaw, double yawRate, double pitch, double pitchRate, double roll, double rollRate)
 
void LimelightHelpers::SetFiducialIDFiltersOverride (const std::string &limelightName, const std::vector< int > &validIDs)
 
void LimelightHelpers::setCameraPose_RobotSpace (const std::string &limelightName, double forward, double side, double up, double roll, double pitch, double yaw)
 
void LimelightHelpers::setPythonScriptData (const std::string &limelightName, const std::vector< double > &outgoingPythonData)
 
std::vector< double > LimelightHelpers::getPythonScriptData (const std::string &limelightName="")
 
double LimelightHelpers::extractBotPoseEntry (const std::vector< double > &inData, int position)
 
PoseEstimate LimelightHelpers::getBotPoseEstimate (const std::string &limelightName, const std::string &entryName)
 
PoseEstimate LimelightHelpers::getBotPoseEstimate_wpiBlue (const std::string &limelightName="")
 
PoseEstimate LimelightHelpers::getBotPoseEstimate_wpiRed (const std::string &limelightName="")
 
PoseEstimate LimelightHelpers::getBotPoseEstimate_wpiBlue_MegaTag2 (const std::string &limelightName="")
 
PoseEstimate LimelightHelpers::getBotPoseEstimate_wpiRed_MegaTag2 (const std::string &limelightName="")
 
void LimelightHelpers::SetupPortForwarding (const std::string &limelightName)
 
template<typename T , typename KeyType >
LimelightHelpers::SafeJSONAccess (const wpi::json &jsonData, const KeyType &key, const T &defaultValue)
 
void LimelightHelpers::from_json (const wpi::json &j, RetroreflectiveResultClass &t)
 
void LimelightHelpers::from_json (const wpi::json &j, FiducialResultClass &t)
 
void LimelightHelpers::from_json (const wpi::json &j, DetectionResultClass &t)
 
void LimelightHelpers::from_json (const wpi::json &j, ClassificationResultClass &t)
 
void LimelightHelpers::from_json (const wpi::json &j, VisionResultsClass &t)
 
void LimelightHelpers::from_json (const wpi::json &j, LimelightResultsClass &t)
 
LimelightResultsClass LimelightHelpers::getLatestResults (const std::string &limelightName="", bool profile=false)
 
std::optional< std::vector< double > > LimelightHelpers::getCurrentCorners (const std::string &limelightName="")
 

Variables

const double LimelightHelpers::INVALID_TARGET = 0.0
 
const std::string LimelightHelpers::internal::_key_timestamp {"ts"}
 
const std::string LimelightHelpers::internal::_key_latency_pipeline {"tl"}
 
const std::string LimelightHelpers::internal::_key_latency_capture {"cl"}
 
const std::string LimelightHelpers::internal::_key_pipelineIndex {"pID"}
 
const std::string LimelightHelpers::internal::_key_TargetXDegrees {"txdr"}
 
const std::string LimelightHelpers::internal::_key_TargetYDegrees {"tydr"}
 
const std::string LimelightHelpers::internal::_key_TargetXNormalized {"txnr"}
 
const std::string LimelightHelpers::internal::_key_TargetYNormalized {"tynr"}
 
const std::string LimelightHelpers::internal::_key_TargetXPixels {"txp"}
 
const std::string LimelightHelpers::internal::_key_TargetYPixels {"typ"}
 
const std::string LimelightHelpers::internal::_key_TargetXDegreesCrosshair {"tx"}
 
const std::string LimelightHelpers::internal::_key_TargetYDegreesCrosshair {"ty"}
 
const std::string LimelightHelpers::internal::_key_TargetXNormalizedCrosshair {"txn"}
 
const std::string LimelightHelpers::internal::_key_TargetYNormalizedCrosshair {"tyn"}
 
const std::string LimelightHelpers::internal::_key_TargetAreaNormalized {"ta"}
 
const std::string LimelightHelpers::internal::_key_TargetAreaPixels {"tap"}
 
const std::string LimelightHelpers::internal::_key_className {"class"}
 
const std::string LimelightHelpers::internal::_key_classID {"classID"}
 
const std::string LimelightHelpers::internal::_key_confidence {"conf"}
 
const std::string LimelightHelpers::internal::_key_fiducialID {"fID"}
 
const std::string LimelightHelpers::internal::_key_corners {"pts"}
 
const std::string LimelightHelpers::internal::_key_transformCAMERAPOSE_TARGETSPACE {"t6c_ts"}
 
const std::string LimelightHelpers::internal::_key_transformCAMERAPOSE_ROBOTSPACE {"t6c_rs"}
 
const std::string LimelightHelpers::internal::_key_transformTARGETPOSE_CAMERASPACE {"t6t_cs"}
 
const std::string LimelightHelpers::internal::_key_transformROBOTPOSE_TARGETSPACE {"t6r_ts"}
 
const std::string LimelightHelpers::internal::_key_transformTARGETPOSE_ROBOTSPACE {"t6t_rs"}
 
const std::string LimelightHelpers::internal::_key_botpose {"botpose"}
 
const std::string LimelightHelpers::internal::_key_botpose_wpiblue {"botpose_wpiblue"}
 
const std::string LimelightHelpers::internal::_key_botpose_wpired {"botpose_wpired"}
 
const std::string LimelightHelpers::internal::_key_transformROBOTPOSE_FIELDSPACE {"t6r_fs"}
 
const std::string LimelightHelpers::internal::_key_skew {"skew"}
 
const std::string LimelightHelpers::internal::_key_ffamily {"fam"}
 
const std::string LimelightHelpers::internal::_key_colorRGB {"cRGB"}
 
const std::string LimelightHelpers::internal::_key_colorHSV {"cHSV"}
 

Macro Definition Documentation

◆ M_PI

#define M_PI   3.14159265358979323846

Definition at line 34 of file LimelightHelpers.h.