# Introduction This module contains the real-world deployment and data collection pipeline for Ψ₀. # Environment Setup ## 1. Create Conda Environment (Host only) Create the conda environment from the provided YAML file. This installs all required dependencies, including inverse kinematics libraries and CUDA bindings. ```bash conda env create -f psi_deploy_env.yaml ``` Activate the environment ```bash conda activate psi_deploy ``` ## 2. Install Unitree SDK2 (Python) Clone and install our modified version of the Unitree SDK2 Python package: ```bash git clone git@github.com:physical-superintelligence-lab/unitree_sdk2_python.git cd unitree_sdk2_python pip install -e . cd .. ``` ## 3. Install Local Package ```bash pip install -e . ``` # Ψ₀ Real-World Deployment ## Image Server (Robot only) On G1's PC, install the image server's requirements ```bash conda create -n vision python=3.8 conda activate vision pip install pyrealsense2 opencv-python zmq numpy ``` Copy `realsense_server.py` in the `real/teleop/image_server` directory to the PC of Unitree G_1, and execute the following command **in the PC**: ```bash conda activate vision python realsense_server.py ``` ## Start Client (Host only) ```bash conda activate psi_deploy cd real bash ./scripts/deploy_psi0-rtc.sh ``` # Teleoperation System Setup ## Apple Vision Pro (AVP) Setup Local streaming (Host and AVP) **Apple** does not allow WebXR on non-https connections. To test the application locally, we need to create a self-signed certificate and install it on the client. You need a ubuntu machine and a router. Connect the VisionPro and the ubuntu machine to the same router. 1. install mkcert: https://github.com/FiloSottile/mkcert 2. check local ip address: ```bash ifconfig | grep inet ``` Suppose the local ip address of the ubuntu machine is `192.168.123.2` 3. create certificate: ```bash mkcert -install && mkcert -cert-file cert.pem -key-file key.pem 192.168.123.2 localhost 127.0.0.1 ``` ps. place the generated cert.pem and key.pem files in `teleop`. ```bash cp cert.pem key.pem teleop/ ``` 4. open firewall on server: ```bash sudo ufw allow 8012 ``` 5. install ca-certificates on VisionPro: ``` mkcert -CAROOT ``` Copy the `rootCA.pem` via AirDrop to VisionPro and install it. Settings > General > About > Certificate Trust Settings. Under "Enable full trust for root certificates", turn on trust for the certificate. settings > Apps > Safari > Advanced > Feature Flags > Enable WebXR Related Features 6. open the browser on Safari on VisionPro and go to https://192.168.123.2:8012?ws=wss://192.168.123.2:8012 7. Click `Enter VR` and `Allow` to start the VR session. ## PICO Only Setup Local streaming 1. install PICO streaming python sdk on your host machine (Please follow [TWIST2](https://github.com/amazon-far/TWIST2) related commands as follows) ```bash conda activate psi_deploy git clone https://github.com/YanjieZe/XRoboToolkit-PC-Service-Pybind.git cd XRoboToolkit-PC-Service-Pybind mkdir -p tmp cd tmp git clone https://github.com/XR-Robotics/XRoboToolkit-PC-Service.git cd XRoboToolkit-PC-Service/RoboticsService/PXREARobotSDK bash build.sh cd ../../../.. mkdir -p lib mkdir -p include cp tmp/XRoboToolkit-PC-Service/RoboticsService/PXREARobotSDK/PXREARobotSDK.h include/ cp -r tmp/XRoboToolkit-PC-Service/RoboticsService/PXREARobotSDK/nlohmann include/nlohmann/ cp tmp/XRoboToolkit-PC-Service/RoboticsService/PXREARobotSDK/build/libPXREARobotSDK.so lib/ # rm -rf tmp # Build the project conda install -c conda-forge pybind11 pip uninstall -y xrobotoolkit_sdk python setup.py install ``` 2. follow the “Install XRoboToolkit-PC-Service” instructions from [XR Robotics](https://github.com/XR-Robotics) to install the PICO service on your workstation. 3. install [PICO SDK](https://github.com/XR-Robotics/XRoboToolkit-Unity-Client/releases/) on your PICO. 4. connect your PICO and workstation using the same WIFI. Suppose PICO IP is `192.168.0.128`, Host IP is `192.168.0.110`