| Device Name | Description | Official Link |
|---|---|---|
| G1-EDU | Unitree Robot Development Platform | G1-EDU Developer Support |
| Apple Vision Pro | Apple Mixed Reality Device | https://www.apple.com/apple-vision-pro/ |
| Joystick | For Device Control | Please contact openwbt@galbot.com |
| User Computer | Ubuntu 20.04 Recommended | - |
git clone https://github.com/GalaxyGeneralRobotics/OpenWBT.gitThe default working directory is ~/OpenWBT. Please modify it according to your actual setup.
conda create -n OpenWBT python=3.8
conda activate OpenWBT# Install pinocchio, version must be 3.1.0
conda install pinocchio -c conda-forge
pip install meshcat
pip install casadi
pip install onnxruntime
pip install pyserial
pip install mujocoFor the remaining dependencies, refer to the requirements.txt file in https://github.com/unitreerobotics/avp_teleoperate/tree/main to configure:
pip install -r requirements.txtEnsure you are in the OpenWBT Conda environment and execute the following commands:
# Clone the SDK repository
git clone https://github.com/unitreerobotics/unitree_sdk2_python.git
# Enter the repository directory
cd unitree_sdk2_python
# Install the SDK
pip install -e .Download the Isaac Gym installation package from the [Isaac Gym download page]: (https://developer.nvidia.com/isaac-gym/download)and extract it. Then navigate to the IsaacGym_Preview_4_Package/isaacgym/python directory and execute the following command:
pip install -e .Installation steps refer to Unitree G1 ROS2 Communication
# Install CMake 3.23.3 (compile from source downloaded from the official website). Refer to the official documentation for compilation steps.
wget https://cmake.org/files/v3.23/cmake-3.23.3.tar.gz
tar -zxvf cmake-3.23.3.tar.gz
cd cmake-3.23.3
sudo apt-get -y install libssl-dev
sudo ./configure
sudo make -j8
sudo make install
cmake --version # Verify successful installation:
# Install GCC 9.4.0
sudo apt-get install gcc-9 g++-9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 90The following uses ROS2 Foxy as an example. If you are using another version of ROS2, simply replace foxy with the name of your current ROS2 version wherever applicable.
For ROS2 Foxy installation, please refer to:
https://docs.ros.org/en/foxy/Installation/Ubuntu-Install-Debians.html
Note: After installation, it is recommended to comment out source /opt/ros/foxy/setup.bash in .bashrc to prevent conflicts.
- Installation:
# Clone the repository
git clone https://github.com/unitreerobotics/unitree_ros2
# Install dependencies
pip install empy==3.3.4 catkin_pkg==1.0.0 lark==1.2.2
sudo apt install ros-foxy-rmw-cyclonedds-cpp
sudo apt install ros-foxy-rosidl-generator-dds-idl # Comment out "source /opt/ros/foxy/setup.bash" in ~/.bashrc- Compile cyclonedds (ensure ROS 2 environment is not sourced)
Since the G1 uses CycloneDDS version 0.10.2, it is necessary to change the default DDS implementation in ROS2. For more details, refer to:
https://docs.ros.org/en/foxy/Concepts/About-Different-Middleware-Vendors.html
Before compiling CycloneDDS, make sure no ROS2 environment variables are sourced when launching the terminal. Otherwise, CycloneDDS may fail to compile.
You can check your ~/.bashrc file for any lines such as source /opt/ros/foxy/setup.bash and comment them out or remove them if present.
- Compile:
cd ~/unitree_ros2/cyclonedds_ws/src
git clone https://github.com/ros2/rmw_cyclonedds -b foxy
git clone https://github.com/eclipse-cyclonedds/cyclonedds -b releases/0.10.x
cd ..
colcon build --packages-select cyclonedds- Enable the ROS 2 environment and build the
unitree_ros2project
source /opt/ros/foxy/setup.bash
colcon build-
Connect the robot, and check your network interface name and IP using
ifconfig, e.g., nameeno1, IP192.168.123.161. -
Configure your host network to be in the same subnet as the robot, e.g.:
- IP:
192.168.123.222 - Netmask:
255.255.255.0 - Gateway:
192.168.123.1
- IP:
-
Modify the network interface configuration: In
~/unitree_ros2/setup.sh, changeNetworkInterface name="eno1"to match your actual interface name. -
Switch to the ROS 2 environment:
source /opt/ros/foxy/setup.sh; source ~/unitree_ros2/setup.sh- Run
ros2 topic listto verify the connection. If robot-related topics appear, the configuration is successful.
Apple does not allow WebXR to be used over non-HTTPS connections. To test the application locally, you need to use mkcert to create a self-signed certificate and install it on the client.
Install brew
sudo apt-get install build-essential procps curl file git
cd \~
/bin/bash -c "\$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Install mkcert
brew install mkcert- Check local IP address
ifconfig | grep inet- Create certificates
Assuming the local IP address is 192.168.123.2:
mkcert -install && mkcert -cert-file cert.pem -key-file key.pem 192.168.123.2 localhost 127.0.0.1 # Replace with your actual IP address- Copy the generated cert.pem and key.pem files to the teleop directory of the project
cp cert.pem key.pem \~/avp\_teleoperate/teleop/- Configure system firewall Open TCP port 8012
sudo ufw allow 8012Execute the mkcert -CAROOT command to get the path of rootCA.pem. Then use Apple's AirDrop function to send the rootCA.pem file to Apple Vision Pro for installation.
Note: Apple Vision Pro needs to enable file reception before receiving files. Method: Settings >> General >> AirDrop >> Everyone (10 minutes).
Enable path: Settings >> Apps >> Safari Browser >> Advanced >> Feature Flags >> Enable WebXR-related features.
Prerequisites: The teleoperation program has been executed on the user's computer and the robot's image service is enabled.
Open the browser on Apple Vision Pro and enter:
https://192.168.123.2:8012?ws=wss://192.168.123.2:8012
Click "Enter VR" and allow tracking to view the camera feed.
Note: Replace with your actual IP address.