Skip to content

A project that enables streaming Oculus headset pose to an FRC robot using Network Tables. Built using Unity.

Notifications You must be signed in to change notification settings

juchong/oculus-frc-streamer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Oculus FRC Streamer

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

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.

Cloning This Repository

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!

Setting up the Unity Development Environment

1. Install Unity

  • 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"
  • Click "Install" and wait for the installation to finish

2. Install Git for Windows

  • Install Git using whatever method you prefer. You can download Git for Windows here.

3. Fork, clone, and import this repository into Unity

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

4. Install the Git for Unity plugin

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

5. Install the MessagePack plugin for Unity

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

6. Explore the C# Code

That's it! You'll find the core streamer application in Assets > Robot > MotionStreamer.cs.

About

A project that enables streaming Oculus headset pose to an FRC robot using Network Tables. Built using Unity.

Resources

Stars

Watchers

Forks

Packages

No packages published