Skip to content

Commit

Permalink
Updated the README and ADAPTERS list. Added pictures of tested adapters.
Browse files Browse the repository at this point in the history
  • Loading branch information
juchong committed Dec 7, 2024
1 parent 239d007 commit 4cff12a
Show file tree
Hide file tree
Showing 20 changed files with 741 additions and 10,904 deletions.
19 changes: 13 additions & 6 deletions ADAPTERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,21 @@ The list below includes pictures, links, and other information for USB to Ethern

## USB-C to Ethernet + Power Passthrough

### Belkin Connect USB-C to Ethernet + Charge Adapter 100W
- [Amazon](https://a.co/d/grTsVxG)

### Cable Matters 5-Port USB-C Hub On-The-Go
- [Amazon](https://a.co/d/72hhWqz)
| Name | Status | Link | Picture |
|------------|--------------|----------------------------|----------------|
| Cable Matters 5-Port USB-C Hub On-The-Go | Tested, Working | [Amazon](https://a.co/d/72hhWqz) | <img src="docs/adapter-pictures/IMG_5276.jpeg" width="500"/> |
| Belkin Connect USB-C to Ethernet + Charge Adapter 100W | Tested, Working | [Amazon](https://a.co/d/grTsVxG) | <img src="docs/adapter-pictures/IMG_5279.jpeg" width="500"/> |
onn. 8-in-1 USB-C Adapter, USB 3.0 and 4K HDMI Compatible | Tested, Working | [Walmart](https://www.walmart.com/ip/onn-8-in-1-USB-C-Adapter-USB-3-0-and-4K-HDMI-Compatible/590617670) | <img src="docs/adapter-pictures/IMG_5281.jpeg" width="500"/> |

## USB-C to Ethernet

I've had some success using USB splitters like [this](https://a.co/d/42pHOMf) one with a USB-C to Ethernet dongle. However, vibration appears to have made this adapter less reliable over time. YMMV.


| Name | Status | Link | Picture |
|------------|--------------|----------------------------|----------------|
| Anker USB C to Ethernet Adapter, PowerExpand USB C to Gigabit Ethernet Adapter | Does Not Work. Will Not Enumerate | [Amazon](https://a.co/d/4fOaj1R) | <img src="docs/adapter-pictures/IMG_5288.jpeg" width="500"/> |
| Cable Matters USB-C to Gigabit Ethernet Network Adapter | Tested, Working | [Amazon](https://a.co/d/hBC5Hfr) | <img src="docs/adapter-pictures/IMG_5286.jpeg" width="500"/> |
| Belkin USB-C to Gigabit Ethernet Network Adapter | Tested, Working | [Amazon](https://a.co/d/11adViN) | <img src="docs/adapter-pictures/IMG_5290.jpeg" width="500"/> |
| UGREEN USB C to Ethernet Adapter, Gigabit RJ45 to USB 3.0 Type-C (Thunderbolt 3) | Does Not Work. Will Not Enumerate | [Amazon](https://a.co/d/cvQbDFy) | <img src="docs/adapter-pictures/IMG_5292.jpeg" width="500"/> |
| StarTech.com USB-C to Ethernet Adapter, USB 3.0 to Gigabit Ethernet Network Adapter | Does Not Work. Will Not Enumerate | [Amazon](https://a.co/d/icEjAsG) | <img src="docs/adapter-pictures/IMG_5294.jpeg" width="500"/> |
| StarTech.com USB-C to Gigabit Ethernet Adapter - White - Thunderbolt 3 / 4 Compatible | Tested, Working | [Amazon](https://a.co/d/aBIJCgZ) | <img src="docs/adapter-pictures/IMG_5296.jpeg" width="500"/> |
56 changes: 44 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# QuestNav
This project enables streaming Oculus VR headset pose information to an FRC robot using the Network Tables 4 (NT4) protocol. This pose information can be used by the robot control system to accurately map it's surroundings and navigate around a competition field, practice space, or any other location. QuestNav produces a more stable and reliable tracking pose than any other FRC vision solution (LimeLight, Photon Vision, etc.)
This project enables streaming Oculus VR headset pose information to an FRC robot using the Network Tables 4 (NT4) protocol. This pose information can be used by the robot control system to accurately map its surroundings and navigate around a competition field, practice space, or any other location. QuestNav produces a more stable and reliable tracking pose than any other FRC vision solution (LimeLight, Photon Vision, etc.)

![Demo Video](docs/questnav-demo.gif)

[Check out the full video here!](https://youtu.be/Mo0p1GGeasM)

[Ask questions and get support in the Chief Delphi thread!](https://www.chiefdelphi.com/t/questnav-the-best-robot-pose-tracking-system-in-frc/476083)

Using a VR headset for robot localization has several advantages:
- Lower cost than most FRC vision solutions
- Multiple SLAM cameras enable redundant, calibrated VIO
Expand Down Expand Up @@ -82,15 +84,16 @@ At it's heart, QuestNav is merely a VR app designed to push data to Network Tabl
- Disable WiFi in `Settings > WiFi`
- **NOTE:** Be sure to completely turn off WiFi, otherwise the headset will constantly disconnect from the robot network as it tries to look for the internet.
- Disable Bluetooth in `Settings > Bluetooth`
- Disable the guardian for development purposes `Settings > Advanced > Experimental Settings > Enable custom settings`
4. Plug the headset into your PC and install the example .apk using MQDH
- Disable the guardian for development purposes `Settings > Advanced > Experimental Settings > Enable Custom Settings` and **TURN OFF** `Physical Space Features`, `MTP Notification`, and `Link Auto Connect`
- These settings might also be located in `Settings > Developer > Experimental Settings > Enable Custom Settings` on some older OS builds
4. Plug the headset into your PC and install the example .apk using MQDH or adb (`adb install QuestNav.apk`)
- **NOTE!** The example app team number is hard-coded to 9999

## Once-Per-Boot Setup
These setup steps are required *once per boot* and can be prevented by ensuring your headset remains powered on using an external battery.
These setup steps are required *once per boot*. This setup process can be prevented by ensuring your headset remains powered on using an external battery.
1. Plug the USB-Ethernet adapter into the USB port on the Quest headset
2. Start the QuestNav app using MQDH or by selecting the app icon in the launcher
3. Check that the Quest headset has connected to your robot and is writing pose data.
3. Check that the Quest headset has connected to your robot and is writing pose data

# Unity Development Environment Setup
### Install Unity
Expand All @@ -103,8 +106,18 @@ These setup steps are required *once per boot* and can be prevented by ensuring
- "Android SDK & NDK Tools"
- Click "Install" and wait for the installation to finish

### Install Quest Link
### Optional: Install Visual Studio Unity Support

The Unity installer may fail to install "Unity Support for Visual Studio" if you already have Visual Studio 2022 installed. In this case, you'll need to install it separately.

- Download the Visual Studio 2022 Community installer ([link](https://visualstudio.microsoft.com/downloads/?cid=learn-onpage-download-install-visual-studio-page-cta))
- Run the installer and select `Modify`
- Scroll down to the `Gaming` subsection and select `Game development with Unity`
- Click `Install` and let the installer do its thing

### Optional: Install Quest Link

Installing Quest Link is not necessary, but may make
- Install the Quest Link software ([link](https://www.meta.com/help/quest/articles/headsets-and-accessories/oculus-rift-s/install-app-for-link/))

### Install Git for Windows
Expand All @@ -114,32 +127,51 @@ These setup steps are required *once per boot* and can be prevented by ensuring
### 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

### Install the Git for Unity plugin

Installing Git for Unity will make managing the Unity source code much easier.
- Follow the instructions on [this](https://github.com/spoiledcat/git-for-unity) page
- Git for Unity should detect your forked repository
Git for Unity is included in the project, but you may need to re-initialize it the first time that the project is imported.

- Open the asset manager by selecting `Asset Store > My Assets`
- Remove and reinstall the `Git for Unity` and `Git for Unity UI` packages
- Close and open Unity
- Git for Unity should now detect your forked repository

### 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](https://github.com/MessagePack-CSharp/MessagePack-CSharp/releases/tag/v2.5.187)
- In the main unity window, select `Assets > Import Package > Custom Package`
- Browse to the package you downloaded and click `Import`

### Explore the C# Code and Build The Project
### Resolve any "recommended project setup tool" fixes

Be sure to resolve any Project Setup Tool warnings that appear in the `Console` tab! You need to look for warnings in both the `PC` and `Android` tabs to successfully build your Unity project.

### Change the build target to Android and ttempt to build the project

- You may need to change the build target to Android in `File > Build Profiles`
- Click `Build` and cross your fingers
- If everything works, then you should be good to go!

### Link Unity to Visual Studio for debugging

The installer may not automatically detect Visual Studio as the default editor for Unity. This may lead to missing Unity namespaces and missing debugging options.

- Follow this [guide](https://unity.com/how-to/debugging-with-microsoft-visual-studio-2022) so that Unity knows to use Visual Studio for debugging

### Explore the C# code and build t1he project

- The main scene is located in `Assets > Scenes > QuestNav`
- The pose streaming code is located in `Assets > Robot > MotionStreamer.cs`.

Unity will need to download and install several Android packages during the first build, so it might be helpful to connect to the headset over USB the first time to make sure it can download everything from the internet. Subsequent builds should be faster and will not require additional downloads.

The project should be configured for Android out of the box. If not, you may need to manually change the build target to Android in `File > Build Profiles`

# FAQ
### Q: Are you doing anything to initialize its location? Or do you have an idea how you'd recommend teams to initialize its location?

Expand Down
Binary file added docs/adapter-pictures/IMG_5276.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/adapter-pictures/IMG_5278.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/adapter-pictures/IMG_5279.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/adapter-pictures/IMG_5280.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/adapter-pictures/IMG_5281.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/adapter-pictures/IMG_5282.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/adapter-pictures/IMG_5286.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/adapter-pictures/IMG_5287.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/adapter-pictures/IMG_5288.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/adapter-pictures/IMG_5289.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/adapter-pictures/IMG_5290.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/adapter-pictures/IMG_5291.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/adapter-pictures/IMG_5292.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/adapter-pictures/IMG_5293.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/adapter-pictures/IMG_5294.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/adapter-pictures/IMG_5295.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/adapter-pictures/IMG_5296.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 4cff12a

Please sign in to comment.