First tinkering iteration, missing some stuff
This commit is contained in:
27
src/main/java/frc/robot/interfaces/IVisualPoseProvider.java
Normal file
27
src/main/java/frc/robot/interfaces/IVisualPoseProvider.java
Normal file
@@ -0,0 +1,27 @@
|
||||
package frc.robot.interfaces;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import edu.wpi.first.math.geometry.Pose2d;
|
||||
|
||||
/**
|
||||
* An interface which ensures a class' ability to provide visual pose information
|
||||
* in a consistent way
|
||||
*/
|
||||
public interface IVisualPoseProvider {
|
||||
/**
|
||||
* A record that can contain the two elements necessary for a WPILIB
|
||||
* pose estimator to use the information from a vision system as part of a full
|
||||
* robot pose estimation
|
||||
*/
|
||||
public record VisualPose(Pose2d visualPose, double timestamp) {}
|
||||
|
||||
/**
|
||||
* Return a VisualPose or null if an empty Optional if none is available.
|
||||
* Implementation should provide an empty response if it's unable to provide
|
||||
* a reliable pose, or any pose at all.
|
||||
*
|
||||
* @return An Optional containing a VisualPose, or empty if no VisualPose can reliably be provided
|
||||
*/
|
||||
public Optional<VisualPose> getVisualPose();
|
||||
}
|
||||
Reference in New Issue
Block a user