This project enables streaming Oculus headset (Quest 3 / Quest 3S) pose information to an FRC robot on the same network using Network Tables. The pose information can be used to accurately map the robot's surroundings in much the same way that a LimeLight or other FRC vision tracking device would.
Using a VR headset has many benefits:
- Cheaper than most FRC SLAM solutions
- Fuses six calibrated SLAM cameras and an IMU to provide very accurate position and velocity estimates
- Provides a ~180 degree FoV and up to 120Hz odometry refresh rate
- Includes 12 CPU/GPU ARM cores, 8GB RAM, and 256GB onboard storage
- Well supported by many software platforms and includes off-the-shelf libraries for mapping a 3D environment
Getting started requires two parts, the Unity application and the FRC robot code. Both are included in this repository. The sample app will also be included as a tag in case you want to give this a try without installing Unity.
This repository includes submodules, so your initial git clone
command will need to change slightly. You should use git clone --recurse-submodules https://github.com/juchong/oculus-frc-streamer.git
to ensure you download everything!
- Download and install Unity Hub from the official website (link)
- Open Unity Hub, sign in, and install Unity 6 (6000.0.25f1) LTS
- Select the following:
- "Microsoft Visual Studio Community 2022"
- Android Build Support"
- "OpenJDK"
- "Android SDK & NDK Tools"
- Select the following:
- Click "Install" and wait for the installation to finish
- Install Git using whatever method you prefer. You can download Git for Windows here.
The main editing window will only open if a project is active.
- Click
Add > Add project from disk
and select the unity subfolder in this repository - Click on the newly imported project
- Wait for Unity to compile assets and open the main interface
Installing Git for Unity will make managing the Unity source code much easier.
- Follow the instructions on this page
- Git for Unity should detect your forked repository
This package is required by the C# Network Tables library.
- Download the latest release with a
.unitypackage
extension from here - In the main unity window, select
Assets > Import Package > Custom Package
- Browse to the package you downloaded and click
Import
That's it! You'll find the core streamer application in Assets > Robot > MotionStreamer.cs
.