2025-Robot
Robot code for 2025 FRC season by Argos, FRC team #1756
Loading...
Searching...
No Matches
LimelightTarget Class Reference

#include <vision_subsystem.h>

Classes

struct  tValues
 Wraps members of LimelightTarget for use elsewhere. More...
 

Public Member Functions

 LimelightTarget ()
 
tValues GetTarget (bool filter, std::string cameraName)
 Get the values of the camera's current target.
 
bool HasTarget ()
 Does the camera see a target?
 
void ResetFilters (std::string cameraName)
 
void ResetOnNextTarget ()
 

Private Attributes

frc::Pose3d m_robotPose
 3d pose of robot relative to field center
 
frc::Pose3d m_robotPoseWPI
 3d pose of robot relative to WPI reference for active alliance
 
frc::Pose3d m_targetPoseCamSpace
 3d pose of Target relative to camera (Z - Forward, X - right, Y - down)
 
frc::Pose3d m_targetPoseRobotSpace
 3d pose of Target relative to camera (Z - Up, Y - left, X - Forward)
 
bool m_hasTargets
 True if the camera has a target it can read.
 
units::degree_t m_pitch
 Pitch of target relative to camera -24.85 to 24.85 degrees.
 
units::degree_t m_yaw
 Yaw of target relative to camera -31.65 to 31.65 degrees.
 
double m_area
 Area of the target in percentage of total pixels.
 
units::millisecond_t m_totalLatency
 Total latency.
 
frc::LinearFilter< units::degree_t > m_txFilter
 
frc::LinearFilter< units::degree_t > m_tyFilter
 
frc::LinearFilter< units::meter_t > m_zFilter
 
bool m_resetFilterFlag
 
double m_tid
 Tag ID.
 
int m_hb
 heartbeat
 

Constructor & Destructor Documentation

◆ LimelightTarget()

LimelightTarget::LimelightTarget ( )
inline

Member Function Documentation

◆ GetTarget()

LimelightTarget::tValues LimelightTarget::GetTarget ( bool filter,
std::string cameraName )

Get the values of the camera's current target.

Returns
tValues

◆ HasTarget()

bool LimelightTarget::HasTarget ( )

Does the camera see a target?

Returns
true - The camera does see a target
false - The camera does not see a target

◆ ResetFilters()

void LimelightTarget::ResetFilters ( std::string cameraName)
Todo
name the filter values

◆ ResetOnNextTarget()

void LimelightTarget::ResetOnNextTarget ( )

Member Data Documentation

◆ m_area

double LimelightTarget::m_area
private

Area of the target in percentage of total pixels.

◆ m_hasTargets

bool LimelightTarget::m_hasTargets
private

True if the camera has a target it can read.

◆ m_hb

int LimelightTarget::m_hb
private

heartbeat

◆ m_pitch

units::degree_t LimelightTarget::m_pitch
private

Pitch of target relative to camera -24.85 to 24.85 degrees.

◆ m_resetFilterFlag

bool LimelightTarget::m_resetFilterFlag
private

◆ m_robotPose

frc::Pose3d LimelightTarget::m_robotPose
private

3d pose of robot relative to field center

◆ m_robotPoseWPI

frc::Pose3d LimelightTarget::m_robotPoseWPI
private

3d pose of robot relative to WPI reference for active alliance

◆ m_targetPoseCamSpace

frc::Pose3d LimelightTarget::m_targetPoseCamSpace
private

3d pose of Target relative to camera (Z - Forward, X - right, Y - down)

◆ m_targetPoseRobotSpace

frc::Pose3d LimelightTarget::m_targetPoseRobotSpace
private

3d pose of Target relative to camera (Z - Up, Y - left, X - Forward)

◆ m_tid

double LimelightTarget::m_tid
private

Tag ID.

◆ m_totalLatency

units::millisecond_t LimelightTarget::m_totalLatency
private

Total latency.

◆ m_txFilter

frc::LinearFilter<units::degree_t> LimelightTarget::m_txFilter
private

◆ m_tyFilter

frc::LinearFilter<units::degree_t> LimelightTarget::m_tyFilter
private

◆ m_yaw

units::degree_t LimelightTarget::m_yaw
private

Yaw of target relative to camera -31.65 to 31.65 degrees.

◆ m_zFilter

frc::LinearFilter<units::meter_t> LimelightTarget::m_zFilter
private

The documentation for this class was generated from the following files: