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

#include <vision_subsystem.h>

Inheritance diagram for VisionSubsystem:

Public Member Functions

 VisionSubsystem (const argos_lib::RobotInstance instance, SwerveDriveSubsystem *pDriveSubsystem)
 
std::optional< units::degree_t > GetOffsetToTarget (LimelightTarget::tValues target)
 Get the offset to the center of the target.
 
LimelightTarget::tValues GetCameraTargetValues ()
 Get the robot poses and latencies.
 
std::optional< units::degree_t > GetHorizontalOffsetToTarget ()
 Get the current offset to the retroreflective tape.
 
std::optional< units::inch_t > GetDistanceToPoleTape ()
 Get the longitudinal distance to the retroreflective tape.
 
void SetReflectiveVisionMode (bool mode)
 
bool AimToPlaceCone ()
 
void RequestFilterReset ()
 
void Periodic () override
 
void Disable ()
 it disables (duh)
 

Public Attributes

LimelightTarget::tValues m_oldTargetValues
 Get the old robot poses and latencies.
 

Private Attributes

CameraInterface m_cameraInterface
 Interface to limelight camera.
 
argos_lib::RobotInstance m_instance
 Contains either the competition bot or practice bot. Differentiates between the two.
 
SwerveDriveSubsystemm_pDriveSubsystem
 Pointer to drivetrain for reading some odometry.
 

Constructor & Destructor Documentation

◆ VisionSubsystem()

VisionSubsystem::VisionSubsystem ( const argos_lib::RobotInstance  instance,
SwerveDriveSubsystem pDriveSubsystem 
)

Member Function Documentation

◆ AimToPlaceCone()

bool VisionSubsystem::AimToPlaceCone ( )
Todo:
deprecate?

◆ Disable()

void VisionSubsystem::Disable ( )

it disables (duh)

◆ GetCameraTargetValues()

LimelightTarget::tValues VisionSubsystem::GetCameraTargetValues ( )

Get the robot poses and latencies.

Returns
LimelightTarget::tValues

◆ GetDistanceToPoleTape()

std::optional< units::inch_t > VisionSubsystem::GetDistanceToPoleTape ( )

Get the longitudinal distance to the retroreflective tape.

Note
For now assume we are always seeing the lower pole
Returns
units::inch_t

◆ GetHorizontalOffsetToTarget()

std::optional< units::degree_t > VisionSubsystem::GetHorizontalOffsetToTarget ( )

Get the current offset to the retroreflective tape.

Returns
units::degree_t

◆ GetOffsetToTarget()

std::optional< units::degree_t > VisionSubsystem::GetOffsetToTarget ( LimelightTarget::tValues  target)

Get the offset to the center of the target.

Parameters
targetTarget to aim toward
Returns
Desired offset.

◆ Periodic()

void VisionSubsystem::Periodic ( )
override

Will be called periodically whenever the CommandScheduler runs.

◆ RequestFilterReset()

void VisionSubsystem::RequestFilterReset ( )

◆ SetReflectiveVisionMode()

void VisionSubsystem::SetReflectiveVisionMode ( bool  mode)

Member Data Documentation

◆ m_cameraInterface

CameraInterface VisionSubsystem::m_cameraInterface
private

Interface to limelight camera.

◆ m_instance

argos_lib::RobotInstance VisionSubsystem::m_instance
private

Contains either the competition bot or practice bot. Differentiates between the two.

◆ m_oldTargetValues

LimelightTarget::tValues VisionSubsystem::m_oldTargetValues

Get the old robot poses and latencies.

Returns
LimelightTarget::tValues

◆ m_pDriveSubsystem

SwerveDriveSubsystem* VisionSubsystem::m_pDriveSubsystem
private

Pointer to drivetrain for reading some odometry.


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