2022-Robot
Robot code for 2022 FRC Season by Argos, FRC team #1756
Loading...
Searching...
No Matches
CameraInterface Class Reference

Provides methods for interacting with the camera on a high level. More...

#include <shooter_subsystem.h>

Public Member Functions

 CameraInterface ()
 
std::optional< LimelightTargetGetHighestTarget ()
 Get the highest target the camera can see CAN RETURN NONE. More...
 
units::angle::degree_t VerticalPixelToAngle (int pixels)
 Converts vertical pixels to degrees. More...
 
units::angle::degree_t HorizontalPixelToAngle (int pixels)
 Converts horizontal pixels to degrees. More...
 
units::angle::degree_t GetNewPitch (units::degree_t cx, units::degree_t cy, int bboxHorizontalPixels, int bboxVerticalPixels, units::degree_t skew)
 Gets the new pitch for the top of the target. More...
 
void SetDriverMode (bool mode)
 Turns the camera's driver mode on and off. More...
 

Public Attributes

LimelightTarget m_target
 object that holds the current target seen by the camera More...
 

Detailed Description

Provides methods for interacting with the camera on a high level.

Constructor & Destructor Documentation

◆ CameraInterface()

CameraInterface::CameraInterface ( )

Member Function Documentation

◆ GetHighestTarget()

std::optional< LimelightTarget > CameraInterface::GetHighestTarget ( )

Get the highest target the camera can see CAN RETURN NONE.

Returns
std::optional<photonlib::PhotonTrackedTarget>

◆ GetNewPitch()

units::angle::degree_t CameraInterface::GetNewPitch ( units::degree_t  cx,
units::degree_t  cy,
int  bboxHorizontalPixels,
int  bboxVerticalPixels,
units::degree_t  skew 
)

Gets the new pitch for the top of the target.

Returns
Pitch degrees of the top of the target

◆ HorizontalPixelToAngle()

units::angle::degree_t CameraInterface::HorizontalPixelToAngle ( int  pixels)

Converts horizontal pixels to degrees.

Returns
Degrees

◆ SetDriverMode()

void CameraInterface::SetDriverMode ( bool  mode)

Turns the camera's driver mode on and off.

Parameters
modeTrue is drive control. False is no drive control

◆ VerticalPixelToAngle()

units::angle::degree_t CameraInterface::VerticalPixelToAngle ( int  pixels)

Converts vertical pixels to degrees.

Returns
Degrees

Member Data Documentation

◆ m_target

LimelightTarget CameraInterface::m_target

object that holds the current target seen by the camera


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