7#include <frc/geometry/Pose3d.h>
8#include <networktables/NetworkTable.h>
9#include <networktables/NetworkTableInstance.h>
10#include <units/temperature.h>
11#include <units/time.h>
12#include <units/velocity.h>
14#include "valkyrie/sensors/BaseSensor.h"
18#define KLIMELIGHT -29.8f
119 double tx, ty, tv, fps, ramUsage,
ta;
121 units::celsius_t cpuTemp,
temp;
Abstract class that all Valor sensors should implement.
Definition BaseSensor.h:27
T ReadLog(std::string_view field, const T &defaultValue={})
Read a value from NetworkTables for the given field.
Definition Loggable.h:343
Base class for vision sensors, such as Limelight.
Definition VisionSensor.h:26
units::millisecond_t getTotalLatency()
Get the total latency of the vision sensor.
virtual frc::Pose3d getGlobalPose()=0
Get the global pose of the vision sensor.
units::velocity::meters_per_second_t getError(int pipe, double kPLimeLight=0.7)
Calculate the error for a specific pipeline.
void calculate() override
Perform vision sensor-specific calculations.
bool hasTarget()
Check if the vision sensor has a valid target.
VisionSensor(frc::TimedRobot &robot, std::string name, frc::Pose3d _cameraPose)
Construct a new VisionSensor object.
void setPipe(PipeLines _pipe)
Set the active pipeline for the vision sensor.
void reset() override
Reset the vision sensor state.
void setCameraPose(frc::Pose3d camPose)
Set the camera's pose in 3D space.
frc::Pose3d cameraPose
Physical 3D position of the camera's lens.
Definition VisionSensor.h:123
PipeLines
Enum representing available pipelines for the vision sensor.
Definition VisionSensor.h:40
std::shared_ptr< nt::NetworkTable > limeTable
NetworkTable for vision data.
Definition VisionSensor.h:124
units::celsius_t temp
Temperature readings.
Definition VisionSensor.h:121
void captureVideo(units::second_t captureTime)
Capture video data on the Limelight using Rewind.
double ta
Vision sensor telemetry data.
Definition VisionSensor.h:119
int pipe
Active pipeline index.
Definition VisionSensor.h:120