|
Valor 6800 1.0
|
Public Member Functions | |
| GamePieceSensor (frc::TimedRobot &robot, const char *name, frc::Pose3d cameraPose, frc::SwerveDrivePoseEstimator< 4 > *estimator) | |
| frc::Pose3d | getGlobalPose () |
| Get the global pose of the vision sensor. | |
| double | GetRotationCmdDeg () |
| bool | detectedTarget () |
| double | getTa () |
| void | updateRelativeToCenter () |
| void | LoggablePeriodic () override |
| Periodic callback for logging updates. | |
Public Member Functions inherited from valor::VisionSensor | |
| VisionSensor (frc::TimedRobot &robot, std::string name, frc::Pose3d _cameraPose) | |
| Construct a new VisionSensor object. | |
| void | reset () override |
| Reset the vision sensor state. | |
| void | setCameraPose (frc::Pose3d camPose) |
| Set the camera's pose in 3D space. | |
| void | setPipe (PipeLines _pipe) |
| Set the active pipeline for the vision sensor. | |
| bool | hasTarget () |
| Check if the vision sensor has a valid target. | |
| void | setThrottle (int skippedFrames) |
| void | captureVideo (units::second_t captureTime) |
| Capture video data on the Limelight using Rewind. | |
| units::velocity::meters_per_second_t | getError (int pipe, double kPLimeLight=0.7) |
| Calculate the error for a specific pipeline. | |
Public Member Functions inherited from valor::BaseSensor< frc::Pose3d > | |
| void | setGetter (std::function< frc::Pose3d()> _lambda) |
| Set the lambda function to fetch sensor data. | |
| void | applyPostProcessing (std::function< frc::Pose3d(frc::Pose3d)> func) |
| Set a post-processing function for sensor data. | |
| frc::Pose3d | get () |
| Get the current sensor state. | |
Public Member Functions inherited from valor::Loggable | |
| void | LogChild (std::string_view name, Loggable *child) |
| Register a child Loggable under a named subtree. | |
| void | LogChild (std::string_view name, wpi::Sendable *child) |
| Register a child Sendable under a named subtree. | |
| void | setLoggingPeriod (units::millisecond_t period) |
| Set the minimum period between LoggablePeriodic() invocations. | |
| template<> | |
| decltype(Loggable::subscribers) ::iterator | addSubscriber (std::string_view field, const std::vector< bool > &defaultValue) |
| template<> | |
| void | WriteLogImpl (nt::Publisher *pub, const std::vector< bool > &data) |
| template<> | |
| std::vector< bool > | ReadLogImpl (nt::Subscriber *sub) |
Additional Inherited Members | |
Public Types inherited from valor::VisionSensor | |
| enum | PipeLines { PIPELINE_0 , PIPELINE_1 , PIPELINE_2 , PIPELINE_3 , PIPELINE_4 , PIPELINE_5 } |
| Enum representing available pipelines for the vision sensor. | |
Static Public Member Functions inherited from valor::Loggable | |
| static units::millisecond_t | GetLoggingTime () |
Protected Member Functions inherited from valor::VisionSensor | |
| units::millisecond_t | getTotalLatency () |
| Get the total latency of the vision sensor. | |
| void | calculate () override |
| Perform vision sensor-specific calculations. | |
Protected Member Functions inherited from valor::BaseSensor< frc::Pose3d > | |
| BaseSensor (frc::TimedRobot &robot) | |
| Construct a new BaseSensor object. | |
| virtual void | refresh () |
| Refresh the sensor state. | |
Protected Member Functions inherited from valor::Loggable | |
| Loggable (std::string_view name) | |
| Construct a Loggable that registers a top-level table name. | |
| Loggable () | |
| Default construct an uninitialized Loggable. | |
| virtual | ~Loggable ()=default |
| Virtual destructor. | |
| virtual void | OnLoggingStart () |
| Hook invoked when logging is started for this object. | |
| template<typename T > | |
| T | WriteLog (std::string_view field, const T &data) |
| Publish a value to NetworkTables under the given field. | |
| template<typename T > | |
| T | ReadLog (std::string_view field, const T &defaultValue={}) |
| Read a value from NetworkTables for the given field. | |
Protected Attributes inherited from valor::VisionSensor | |
| double | tx |
| double | ty |
| double | tv |
| double | fps |
| double | ramUsage |
| double | ta |
| Vision sensor telemetry data. | |
| int | pipe |
| Active pipeline index. | |
| units::celsius_t | cpuTemp |
| units::celsius_t | temp |
| Temperature readings. | |
| frc::Pose3d | cameraPose |
| Physical 3D position of the camera's lens. | |
| std::shared_ptr< nt::NetworkTable > | limeTable |
| NetworkTable for vision data. | |
Protected Attributes inherited from valor::BaseSensor< frc::Pose3d > | |
| std::function< frc::Pose3d()> | sensorLambda |
| Lambda function to fetch sensor data. | |
| std::function< frc::Pose3d(frc::Pose3d)> | postProcessor |
| Lambda function to post-process sensor data. | |
| frc::Pose3d | prevState |
| Previous and current sensor states. | |
| frc::Pose3d | currState |
| frc::Timer | profiler |
|
virtual |
Get the global pose of the vision sensor.
This method must be implemented in derived classes to calculate the global pose based on the sensor's data.
Implements valor::VisionSensor.
|
overridevirtual |
Periodic callback for logging updates.
If a derived class needs to perform periodic updates to published values, override this method. It is intended to be called by the logging framework; this base class provides an empty implementation.
Reimplemented from valor::Loggable.