add unity doc.
This commit is contained in:
62
unity/XR_RM_PICO_UDP_Sender/README.md
Executable file
62
unity/XR_RM_PICO_UDP_Sender/README.md
Executable file
@ -0,0 +1,62 @@
|
||||
# XR-RM PICO UDP Sender
|
||||
|
||||
Minimal Unity project for the direct PICO 4 Ultra UDP route in
|
||||
`docs/pico4_ultra_udp_teleop_setup.md`.
|
||||
|
||||
Configured target:
|
||||
|
||||
```text
|
||||
Host = 192.168.9.99
|
||||
Port = 15000
|
||||
Send Hz = 60
|
||||
Convert Unity To Project Coordinates = true
|
||||
Package Name = com.local.xr_rm_udp_sender
|
||||
```
|
||||
|
||||
Open this folder with the Ubuntu editor installed at:
|
||||
|
||||
```text
|
||||
/home/robot/Unity/Hub/Editor/2022.3.62f3c1/Editor/Unity
|
||||
```
|
||||
|
||||
Install Android Build Support, Android SDK/NDK, and OpenJDK from Unity Hub.
|
||||
|
||||
The PICO SDK is referenced from the sibling folder:
|
||||
|
||||
```text
|
||||
../PICO-Unity-Integration-SDK-release_3.4.0
|
||||
```
|
||||
|
||||
After opening the project:
|
||||
|
||||
1. Wait for Unity Package Manager to import `PICO Integration 3.4.0`.
|
||||
2. Run `XR-RM -> Apply UDP Sender Android Settings`.
|
||||
3. Build with `XR-RM -> Build Android APK`, or use Unity's Android Build window.
|
||||
|
||||
The automated setup enables Android, PICO XR Loader, API 29, Internet access,
|
||||
IL2CPP + ARM64, and the `PicoControllerUdpSender` scene object.
|
||||
|
||||
Runtime scene components:
|
||||
|
||||
- `PicoControllerUdpSender`: sends left/right controller JSON to the ROS2 host.
|
||||
- `PicoUdpConfigPanel`: in-headset config panel plus run HUD.
|
||||
- `PicoKeepAwake`: while UDP sending is on, requests PICO Enterprise wake lock,
|
||||
disables PICO auto sleep, applies Android `KEEP_SCREEN_ON`, and restores
|
||||
captured screen/sleep timeouts when sending stops.
|
||||
|
||||
The setup menu chooses the UDP target host from `XR_RM_UDP_TARGET_HOST` when
|
||||
set. Otherwise it auto-detects a local IPv4 address; on this Ubuntu machine the
|
||||
current Wi-Fi address is `192.168.9.99`.
|
||||
|
||||
Batchmode build example:
|
||||
|
||||
```bash
|
||||
cd /home/robot/WS_xr/src
|
||||
XR_RM_UDP_TARGET_HOST=192.168.9.99 \
|
||||
/home/robot/Unity/Hub/Editor/2022.3.62f3c1/Editor/Unity \
|
||||
-batchmode \
|
||||
-quit \
|
||||
-projectPath "$(pwd)/unity/XR_RM_PICO_UDP_Sender" \
|
||||
-executeMethod XrRmUdpSenderProjectSetup.BuildAndroidApk \
|
||||
-logFile "$(pwd)/unity_build.log"
|
||||
```
|
||||
Reference in New Issue
Block a user