A Python utility for testing and calibrating Oculus Rift DK2 positional tracking accuracy. (Even though it's outdated)
- Live tracking status display
- Position and rotation values in real-time
- Frame rate monitoring
- Connection status indicators
- Interactive pygame-based 3D visualization
- Real-time head position tracking
- Movement trail history
- Tracking boundary visualization
- Coordinate system display
- Interactive multi-point calibration process
- Progress tracking and visual feedback
- Save/load calibration configurations
- One-click tracking center reset
- Position accuracy metrics
- Jitter measurement (RMS)
- Drift rate calculation
- Comprehensive tracking reports
- CSV data export for external analysis
- Adjustable tracking bounds (X, Y, Z limits)
- Configurable parameters
- Settings persistence
- Python 3.7 or higher
- Windows (for Oculus SDK support)
pip install pygame numpy
To use with an actual DK2 headset:
- Install the Oculus SDK
- Install Python OVR bindings:
pip install ovr
Note: The tool works in simulation mode without hardware, perfect for testing and development.
- Clone the repository:
git clone https://github.com/CPScript/DK2-Positonal-Calibrator.git
cd DK2-Positonal-Calibrator
- Run the tool:
python main.py.py
- Start Tracking: Click "Start Tracking" in the Real-time Monitor tab
- View Visualization: The pygame window shows live 3D tracking data
- Calibrate: Use the Calibration tab to run accuracy tests
- Analyze: Check the Analysis tab for performance metrics
- Export: Save tracking data and reports for further analysis
- Status Indicators: Connection, tracking status, and frame rate
- Live Data: Current position (X, Y, Z) and rotation values
- Controls: Start/stop tracking, reset center position
- Interactive Calibration: Step-by-step calibration process
- Progress Tracking: Visual progress bar and status updates
- Data Management: Save and load calibration profiles
- Accuracy Metrics: Position accuracy, rotation accuracy, jitter, drift
- Data Export: Export tracking data to CSV format
- Report Generation: Generate comprehensive tracking reports
- Tracking Bounds: Configure X, Y, Z tracking limits
- Parameter Adjustment: Fine-tune tracking parameters
- CPU: Intel Core i5-4590 / AMD FX 8350 equivalent or better
- Memory: 4 GB RAM
- Graphics: NVIDIA GTX 970 / AMD R9 280 equivalent or better
- USB: USB 3.0 port
- OS: Windows 7 SP1 64-bit or newer
- Oculus Rift DK2 headset
- Proper lighting conditions (avoid direct sunlight)
- Clear tracking area (2m x 1.5m minimum)
- Stable mounting for the tracking camera
The tool saves configuration data in JSON format:
{
"tracking_bounds": {
"x_min": -2.0,
"x_max": 2.0,
"y_min": -1.5,
"y_max": 1.5,
"z_min": 0.5,
"z_max": 3.0
},
"calibration_points": [...],
"timestamp": "2025-01-01T12:00:00"
}
"OVR SDK not found" Warning
- This is normal if you don't have a DK2 connected
- The tool will run in simulation mode for testing
Tracking Data Shows Zeros
- Check USB 3.0 connection
- Ensure proper lighting conditions
- Verify DK2 camera is connected and recognized
Poor Tracking Accuracy
- Run the calibration process
- Check for reflective surfaces in the tracking area
- Ensure the camera has a clear view of the headset
Performance Issues
- Close unnecessary applications
- Check system requirements
- Reduce visualization quality in settings