1+ #! /bin/bash
2+ # launch_vr.sh — Full VR teleoperation session launcher for OpenArm Isaac Sim
3+ # Usage: ./launch_vr.sh [--headless] [--no-robot]
4+
5+
6+ ISAAC_ENV=/home/vision/workspace/simlab/activate-isaacsim.sh
7+ ALVR_DASHBOARD=/home/vision/alvr/alvr_streamer_linux/bin/alvr_dashboard
8+ OPENARM_SIM=/home/vision/humanoids/openarm_module/scripts/isaacsim/openarm_sim.py
9+ VR_KIT=/home/vision/workspace/simlab/.venv-isaacsim/lib/python3.11/site-packages/isaacsim/apps/isaacsim.exp.base.xr.vr.kit
10+
11+ HEADLESS=false
12+ NO_ROBOT=false
13+
14+ for arg in " $@ " ; do
15+ case $arg in
16+ --headless) HEADLESS=true ;;
17+ --no-robot) NO_ROBOT=true ;;
18+ esac
19+ done
20+
21+ echo " === OpenArm VR Launcher ==="
22+
23+ # Step 1: Check ADB / Quest 2 connection
24+ echo " [1/4] Checking Quest 2 connection..."
25+ DEVICES=$( adb devices | grep -v " List of devices" | grep " device$" )
26+ if [ -z " $DEVICES " ]; then
27+ echo " WARNING: Quest 2 not detected via ADB."
28+ echo " Make sure USB cable is connected and USB debugging is accepted in the headset."
29+ else
30+ echo " Quest 2 detected: $DEVICES "
31+ fi
32+
33+ # Step 2: Start ALVR dashboard (background)
34+ echo " [2/4] Starting ALVR dashboard..."
35+ if pgrep -f " alvr_dashboard" > /dev/null; then
36+ echo " ALVR dashboard already running."
37+ else
38+ $ALVR_DASHBOARD &
39+ sleep 2
40+ echo " ALVR dashboard started."
41+ fi
42+
43+ # Step 3: Start SteamVR (background)
44+ echo " [3/4] Starting SteamVR..."
45+ if pgrep -f " vrmonitor" > /dev/null; then
46+ echo " SteamVR already running."
47+ else
48+ steam steam://run/250820 &
49+ echo " Waiting for SteamVR to start..."
50+ sleep 5
51+ echo " SteamVR started."
52+ fi
53+
54+ echo " "
55+ echo " --> Put on your Quest 2 and launch ALVR from App Library > Unknown Sources"
56+ echo " --> Wait for the SteamVR environment to appear in the headset"
57+ echo " "
58+ read -p " Press ENTER when Quest 2 is connected to SteamVR..."
59+
60+ # Step 4: Launch Isaac Sim
61+ echo " [4/4] Launching Isaac Sim..."
62+ source $ISAAC_ENV
63+
64+ if [ " $HEADLESS " = true ]; then
65+ echo " Launching in headless mode..."
66+ python $OPENARM_SIM --headless
67+ elif [ " $NO_ROBOT " = true ]; then
68+ echo " Launching Isaac Sim VR (no robot)..."
69+ isaacsim --experience $VR_KIT
70+ else
71+ echo " Launching Isaac Sim VR with OpenArm..."
72+ python $OPENARM_SIM
73+ fi
0 commit comments