# G1 Teleop — Quest 3 Native App Setup ## Prerequisites - **Godot 4.3+** (download from https://godotengine.org) - **Android SDK + NDK** (install via Android Studio or standalone) - **Meta Quest Developer Hub** (for sideloading) or `adb` - Quest 3 in **developer mode** ## Step 1: Install Meta OpenXR Vendors Plugin 1. Open project in Godot: `godot --editor --path C:\git\g1-teleop` 2. Go to **AssetLib** tab (top center) 3. Search for "Godot OpenXR Vendors" 4. Download and install (includes Meta Quest support) 5. Enable the plugin: **Project → Project Settings → Plugins → godotopenxrvendors** → Enable 6. Restart Godot when prompted ## Step 2: Configure Android Export 1. Go to **Editor → Editor Settings → Export → Android** 2. Set the path to your Android SDK 3. Set Java SDK path 4. Go to **Project → Export → Quest 3** 5. Download Android export templates if prompted (Editor → Manage Export Templates → Download) ## Step 3: Enable Body Tracking Body tracking is configured via: - `export_presets.cfg`: `xr_features/hand_tracking=2` (required) - `android/AndroidManifest.xml`: body tracking features and metadata The Meta OpenXR Vendors plugin v4.1.1+ exposes `XRBodyTracker` in GDScript. ## Step 4: Build and Sideload 1. Connect Quest 3 via USB (or Wi-Fi ADB) 2. In Godot: **Project → Export → Quest 3 → Export Project** (or one-click deploy) 3. APK will be at `build/g1-teleop.apk` 4. Sideload: `adb install build/g1-teleop.apk` ## Step 5: Robot Server On the robot (or dev machine for testing): ```bash cd server/ pip install -r requirements.txt python teleop_server.py --port 8765 ``` ## Step 6: Configure App Edit `scripts/teleop_client.gd` to set the robot's IP: ```gdscript @export var server_host: String = "10.0.0.64" # Robot IP @export var server_port: int = 8765 ``` Or configure at runtime via the Godot editor's export properties. ## Network - Quest 3 and robot must be on the same network - No SSL required (raw WebSocket) - Default port: 8765 - Firewall: allow TCP 8765 on the robot ## Troubleshooting ### Body tracking not activating - Ensure Quest 3 system software is up to date - Check Settings → Movement Tracking → Body Tracking is enabled - Ensure the Meta OpenXR Vendors plugin version is ≥ 4.1.1 ### WebSocket connection fails - Verify robot IP is correct and reachable: `ping 10.0.0.64` - Check server is running: `ss -tlnp | grep 8765` - Check firewall: `sudo ufw allow 8765/tcp`