Skip to content

Commit 24b3272

Browse files
committed
Update VR README
1 parent 284f876 commit 24b3272

1 file changed

Lines changed: 74 additions & 2 deletions

File tree

VR/README.md

Lines changed: 74 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,18 @@ Deployment model:
77
- Headgear client opens HTTPS URL in Quest Browser.
88
- Object-publisher client connects to WSS URL from Python CLI.
99

10-
## Quick start
10+
## Join the VR environment
11+
12+
Before joining, use the top-right panel:
13+
- Choose `Character` (`Demo-spline`, `Two CR`, ...).
14+
- Click `Join Field`.
15+
- You can join as a spectator by clicking `Join as Spectator`.
16+
- You can joint arm camera view by clicking `Join Arm Camera`.
17+
- Click `Enter VR` to enter the VR environment.
18+
- This will start the VR session.
19+
- If you are using a headgear, you can click `Enter VR` on the bottom to enter the immersion mode.
20+
21+
## Quick Setup
1122

1223
Use `npx` or `bunx`, depending on your preference.
1324

@@ -20,4 +31,65 @@ Serve the WebXR client over HTTPS:
2031
npx serve client -l 8443 --ssl-cert certs/dev-cert.pem --ssl-key certs/dev-key.pem
2132
# or
2233
bunx serve client -l 8443 --ssl-cert certs/dev-cert.pem --ssl-key certs/dev-key.pem
23-
```
34+
```
35+
### Start runtime server
36+
37+
> This requires a python environment with all packages installed.
38+
39+
```bash
40+
./VR/scripts/start_server.sh
41+
```
42+
43+
### Open on Quest Browser (replace `YOUR_SERVER_IP` to your IP or domain name):
44+
45+
> Note: You can also open the client URL in your browser.
46+
> I have not tested, but some VR immerse emulator plugin exists.
47+
48+
```text
49+
https://YOUR_SERVER_IP:8443/
50+
```
51+
52+
The client now auto-derives websocket endpoint from page host:
53+
- `https://HOST:8443` -> `wss://HOST:8765`
54+
- `http://HOST:...` -> `ws://HOST:8765`
55+
56+
> You can still override with `?ws=...` or custom port via `?ws_port=...`.
57+
58+
## Character modes:
59+
60+
- `Demo-spline`: current spline demo behavior.
61+
- `Two CR`: always 2 arms, base is fixed near body center, and base movement controls are disabled. Controller targets are sent to the server, and the server runs `PyElastica` to compute the rod posture.
62+
63+
## Python mesh publisher (remote LAN machine)
64+
65+
Another machine on the same LAN (for example a Macbook) can publish mesh/scenery files into the shared VR scene by connecting to the Linux host WSS URL.
66+
67+
> TODO
68+
69+
1. Install python-packages on the publisher machine.
70+
2. Run:
71+
72+
73+
## System diagram
74+
75+
```mermaid
76+
flowchart LR
77+
subgraph L["Linux Desktop (Server Host)"]
78+
C["HTTPS static client :8443"]
79+
W["Virtual Field runtime :8765 (WSS)"]
80+
E["Simulation backend (PyElastica in physics-driven modes)"]
81+
end
82+
83+
Q["Quest / web browsers"]
84+
P["Python publisher clients"]
85+
86+
Q -->|"Open client page (see Quick Setup; may be / or /client/)"| C
87+
Q -->|"hello; then xr_input"| W
88+
W -->|"scene_state (periodic broadcast); hello_ack + asset_manifest on join"| Q
89+
90+
P -->|"hello(role=publisher); mesh / overlay / etc."| W
91+
W -->|"mesh_ack, overlay_ack, etc."| P
92+
93+
W -->|"teleop / step"| E
94+
E -->|"arm state, meshes, overlays"| W
95+
```

0 commit comments

Comments
 (0)