2024-Robot
Robot code for 2024 FRC season by Argos, FRC team #1756
Loading...
Searching...
No Matches
LimelightHelpers Namespace Reference

Namespaces

namespace  internal
 

Classes

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

Functions

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

Variables

const double INVALID_TARGET = 0.0
 

Detailed Description

Function Documentation

◆ extractBotPoseEntry()

double LimelightHelpers::extractBotPoseEntry ( const std::vector< double > &  inData,
int  position 
)
inline

◆ from_json() [1/6]

void LimelightHelpers::from_json ( const wpi::json &  j,
ClassificationResultClass t 
)
inline

◆ from_json() [2/6]

void LimelightHelpers::from_json ( const wpi::json &  j,
DetectionResultClass t 
)
inline

◆ from_json() [3/6]

void LimelightHelpers::from_json ( const wpi::json &  j,
FiducialResultClass t 
)
inline

◆ from_json() [4/6]

void LimelightHelpers::from_json ( const wpi::json &  j,
LimelightResultsClass t 
)
inline

◆ from_json() [5/6]

void LimelightHelpers::from_json ( const wpi::json &  j,
RetroreflectiveResultClass t 
)
inline

◆ from_json() [6/6]

void LimelightHelpers::from_json ( const wpi::json &  j,
VisionResultsClass t 
)
inline

◆ getBotpose()

std::vector< double > LimelightHelpers::getBotpose ( const std::string &  limelightName = "")
inline

◆ getBotpose_TargetSpace()

std::vector< double > LimelightHelpers::getBotpose_TargetSpace ( const std::string &  limelightName = "")
inline

◆ getBotpose_wpiBlue()

std::vector< double > LimelightHelpers::getBotpose_wpiBlue ( const std::string &  limelightName = "")
inline

◆ getBotpose_wpiRed()

std::vector< double > LimelightHelpers::getBotpose_wpiRed ( const std::string &  limelightName = "")
inline

◆ getBotPoseEstimate()

PoseEstimate LimelightHelpers::getBotPoseEstimate ( const std::string &  limelightName,
const std::string &  entryName 
)
inline

◆ getBotPoseEstimate_wpiBlue()

PoseEstimate LimelightHelpers::getBotPoseEstimate_wpiBlue ( const std::string &  limelightName = "")
inline

◆ getBotPoseEstimate_wpiBlue_MegaTag2()

PoseEstimate LimelightHelpers::getBotPoseEstimate_wpiBlue_MegaTag2 ( const std::string &  limelightName = "")
inline

◆ getBotPoseEstimate_wpiRed()

PoseEstimate LimelightHelpers::getBotPoseEstimate_wpiRed ( const std::string &  limelightName = "")
inline

◆ getBotPoseEstimate_wpiRed_MegaTag2()

PoseEstimate LimelightHelpers::getBotPoseEstimate_wpiRed_MegaTag2 ( const std::string &  limelightName = "")
inline

◆ getCameraPose_RobotSpace()

std::vector< double > LimelightHelpers::getCameraPose_RobotSpace ( const std::string &  limelightName = "")
inline

◆ getCameraPose_TargetSpace()

std::vector< double > LimelightHelpers::getCameraPose_TargetSpace ( const std::string &  limelightName = "")
inline

◆ getFiducialID()

double LimelightHelpers::getFiducialID ( const std::string &  limelightName = "")
inline

◆ getJSONDump()

std::string LimelightHelpers::getJSONDump ( const std::string &  limelightName = "")
inline

◆ getLatency_Capture()

double LimelightHelpers::getLatency_Capture ( const std::string &  limelightName = "")
inline

◆ getLatency_Pipeline()

double LimelightHelpers::getLatency_Pipeline ( const std::string &  limelightName = "")
inline

◆ getLatestResults()

LimelightResultsClass LimelightHelpers::getLatestResults ( const std::string &  limelightName = "",
bool  profile = false 
)
inline

◆ getLimelightNTDouble()

double LimelightHelpers::getLimelightNTDouble ( const std::string &  tableName,
const std::string &  entryName 
)
inline

◆ getLimelightNTDoubleArray()

std::vector< double > LimelightHelpers::getLimelightNTDoubleArray ( const std::string &  tableName,
const std::string &  entryName 
)
inline

◆ getLimelightNTString()

std::string LimelightHelpers::getLimelightNTString ( const std::string &  tableName,
const std::string &  entryName 
)
inline

◆ getLimelightNTTable()

std::shared_ptr< nt::NetworkTable > LimelightHelpers::getLimelightNTTable ( const std::string &  tableName)
inline

◆ getLimelightNTTableEntry()

nt::NetworkTableEntry LimelightHelpers::getLimelightNTTableEntry ( const std::string &  tableName,
const std::string &  entryName 
)
inline

◆ getNeuralClassID()

std::string LimelightHelpers::getNeuralClassID ( const std::string &  limelightName = "")
inline

◆ getPythonScriptData()

std::vector< double > LimelightHelpers::getPythonScriptData ( const std::string &  limelightName = "")
inline

◆ getTA()

double LimelightHelpers::getTA ( const std::string &  limelightName = "")
inline

◆ getTargetColor()

std::vector< double > LimelightHelpers::getTargetColor ( const std::string &  limelightName = "")
inline

◆ getTargetPose_CameraSpace()

std::vector< double > LimelightHelpers::getTargetPose_CameraSpace ( const std::string &  limelightName = "")
inline

◆ getTargetPose_RobotSpace()

std::vector< double > LimelightHelpers::getTargetPose_RobotSpace ( const std::string &  limelightName = "")
inline

◆ getTV()

double LimelightHelpers::getTV ( const std::string &  limelightName = "")
inline

◆ getTX()

double LimelightHelpers::getTX ( const std::string &  limelightName = "")
inline

◆ getTY()

double LimelightHelpers::getTY ( const std::string &  limelightName = "")
inline

◆ PhoneHome()

void LimelightHelpers::PhoneHome ( )
inline

◆ SafeJSONAccess()

template<typename T , typename KeyType >
T LimelightHelpers::SafeJSONAccess ( const wpi::json &  jsonData,
const KeyType &  key,
const T &  defaultValue 
)

◆ sanitizeName()

std::string LimelightHelpers::sanitizeName ( const std::string &  name)
inline

◆ setCameraPose_RobotSpace()

void LimelightHelpers::setCameraPose_RobotSpace ( const std::string &  limelightName,
double  forward,
double  side,
double  up,
double  roll,
double  pitch,
double  yaw 
)
inline

Sets the camera pose in robotspace. The UI camera pose must be set to zeros

◆ setCropWindow()

void LimelightHelpers::setCropWindow ( const std::string &  limelightName,
double  cropXMin,
double  cropXMax,
double  cropYMin,
double  cropYMax 
)
inline

Sets the crop window. The crop window in the UI must be completely open for dynamic cropping to work.

◆ SetFiducialIDFiltersOverride()

void LimelightHelpers::SetFiducialIDFiltersOverride ( const std::string &  limelightName,
const std::vector< int > &  validIDs 
)
inline

◆ setLEDMode_ForceBlink()

void LimelightHelpers::setLEDMode_ForceBlink ( const std::string &  limelightName = "")
inline

◆ setLEDMode_ForceOff()

void LimelightHelpers::setLEDMode_ForceOff ( const std::string &  limelightName = "")
inline

◆ setLEDMode_ForceOn()

void LimelightHelpers::setLEDMode_ForceOn ( const std::string &  limelightName = "")
inline

◆ setLEDMode_PipelineControl()

void LimelightHelpers::setLEDMode_PipelineControl ( const std::string &  limelightName = "")
inline

◆ setLimelightNTDouble()

void LimelightHelpers::setLimelightNTDouble ( const std::string &  tableName,
const std::string  entryName,
double  val 
)
inline

◆ setLimelightNTDoubleArray()

void LimelightHelpers::setLimelightNTDoubleArray ( const std::string &  tableName,
const std::string &  entryName,
const std::span< const double > &  vals 
)
inline

◆ setPipelineIndex()

void LimelightHelpers::setPipelineIndex ( const std::string &  limelightName,
int  index 
)
inline

◆ setPriorityTagID()

void LimelightHelpers::setPriorityTagID ( const std::string &  limelightName,
int  ID 
)
inline

◆ setPythonScriptData()

void LimelightHelpers::setPythonScriptData ( const std::string &  limelightName,
const std::vector< double > &  outgoingPythonData 
)
inline

◆ SetRobotOrientation()

void LimelightHelpers::SetRobotOrientation ( const std::string &  limelightName,
double  yaw,
double  yawRate,
double  pitch,
double  pitchRate,
double  roll,
double  rollRate 
)
inline

Sets the robot orientation for mt2.

◆ setStreamMode_PiPMain()

void LimelightHelpers::setStreamMode_PiPMain ( const std::string &  limelightName = "")
inline

◆ setStreamMode_PiPSecondary()

void LimelightHelpers::setStreamMode_PiPSecondary ( const std::string &  limelightName = "")
inline

◆ setStreamMode_Standard()

void LimelightHelpers::setStreamMode_Standard ( const std::string &  limelightName = "")
inline

◆ SetupPortForwarding()

void LimelightHelpers::SetupPortForwarding ( const std::string &  limelightName)
inline

◆ toPose2D()

frc::Pose2d LimelightHelpers::toPose2D ( const std::vector< double > &  inData)
inline

◆ toPose3D()

frc::Pose3d LimelightHelpers::toPose3D ( const std::vector< double > &  inData)
inline

Variable Documentation

◆ INVALID_TARGET

const double LimelightHelpers::INVALID_TARGET = 0.0
inline