Class OculusPoseSource
- All Implemented Interfaces:
PoseSource
This class wraps the OculusSubsystem to provide high-frequency pose estimation through the standardized PoseSource interface. The Quest serves as: - Primary pose estimation source - High-frequency (120Hz) updates - Global SLAM-based localization - Drift-free position tracking
Features: - Sub-millimeter tracking precision - Building-scale SLAM mapping - Robust to reflective surfaces - Fast relocalization from saved maps - High-speed movement handling
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the most recent pose estimate from this source.Gets a human-readable identifier for this pose source.Gets the standard deviations of measurement uncertainty for this pose source.boolean
Checks if the pose source is currently connected and providing valid data.
-
Field Details
-
subsystem
The underlying Oculus subsystem
-
-
Constructor Details
-
OculusPoseSource
Creates a new OculusPoseSource.- Parameters:
subsystem
- The Oculus subsystem to wrap
-
-
Method Details
-
isConnected
public boolean isConnected()Checks if the pose source is currently connected and providing valid data.This method should: - Verify hardware connectivity (if applicable) - Check data freshness - Validate sensor readings - Monitor update frequency
For Quest SLAM, connection status depends on: - Quest hardware connection - SLAM tracking quality - Update frequency - Environment mapping status
- Specified by:
isConnected
in interfacePoseSource
- Returns:
- true if the source is connected and providing valid data
-
getCurrentPose
Gets the most recent pose estimate from this source.The returned pose should be: - In field-relative coordinates - Using the standard FRC coordinate system: - Origin at field corner - +X towards opposite alliance wall - +Y towards driver station - CCW positive rotation
If no valid pose is available, returns null.
Quest poses are: - Globally consistent via SLAM - Updated at 120Hz - Drift-compensated - Environment-referenced - Transform-corrected to field frame
- Specified by:
getCurrentPose
in interfacePoseSource
- Returns:
- The current robot pose estimate, or null if unavailable
-
getStdDevs
Gets the standard deviations of measurement uncertainty for this pose source.Returns a 3x1 matrix containing standard deviations for: - X position (meters) - Y position (meters) - Rotation (radians)
These values should: - Reflect real measurement uncertainty - Scale with distance/conditions - Account for systematic errors - Consider environmental factors
Quest measurement uncertainty: - Sub-millimeter position accuracy - Factory-calibrated IMU - Environment-dependent SLAM quality - Constant across operating range
- Specified by:
getStdDevs
in interfacePoseSource
- Returns:
- 3x1 matrix of standard deviations [x, y, theta]
-
getSourceName
Gets a human-readable identifier for this pose source.Used for: - Logging - Debugging - User interfaces - Status reporting
- Specified by:
getSourceName
in interfacePoseSource
- Returns:
- String identifier for this pose source
-