This repository contains code for working with Unitree Go2 robots. It includes setup instructions, running procedures, and solutions to common issues encountered during development.
- Ubuntu tested on WSL Ubuntu 22.04
- Unitree SDK
- Unitree SDK for python
git clone https://github.com/ai4ce/OVMM.git
cd OVMM
conda create --name OVMM python=3.10
conda activate OVMM
pip install -r requirements.txtgit clone https://github.com/unitreerobotics/unitree_sdk2.gitcd ~/unitree_sdk2/
mkdir build
cd build
cmake ..
sudo make installmake- python >= 3.8
- cyclonedds == 0.10.2
- numpy
- opencv-python
cd ~
sudo apt install python3-pip
git clone https://github.com/unitreerobotics/unitree_sdk2_python.git
cd unitree_sdk2_python
pip3 install -e .Could not locate cyclonedds. Try to set CYCLONEDDS_HOME or CMAKE_PREFIX_PATHThis error indicates that the path to cyclonedds cannot be found. First, compile and install cyclonedds:
cd ~
git clone https://github.com/eclipse-cyclonedds/cyclonedds -b releases/0.10.x
cd cyclonedds && mkdir build install && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=../install -DBUILD_DDSPERF=OFF
cmake --build . --target installSet CYCLONEDDS_HOME and install unitree_sdk2_python Navigate to the Unitree_sdk2_python directory, set CYCLONEDDS_HOME to the newly compiled cyclonedds path, and install unitree_sdk2_python:
cd ~/unitree_sdk2_python
export CYCLONEDDS_HOME="/{path to your cyclonedds}/cyclonedds/install"
pip3 install -e .When running example programs, control commands will be sent from the user's computer to the Go2 robot's onboard computer via a local network. Therefore, before proceeding, some necessary configuration steps are required to establish a local network between the two computers.
-
Connect the network cable
- Connect one end of the Ethernet cable to the Go2 robot and the other end to the user's computer.
- Enable the USB Ethernet interface on the computer and configure its network settings.
- The Go2 robot's onboard computer has a fixed IP address of 192.168.123.161.
- The computer's USB Ethernet address should be set to the same subnet, such as 192.168.123.222 (you can replace "222" with another number).
-
Verify the connection
-
Check the network interface name for the 123 subnet
-
Use the ifconfig command to find the name of the network interface corresponding to the 192.168.123.xxx subnet, as shown in the example below:
-
In the output, the network interface name corresponding to the IP
192.168.123.222isenxf8e43b808e06. -
The user needs to remember this name, as it will be required as a parameter when running example programs.
-
Open a terminal and execute the following commands in sequence to run the example program.
Note: In the second command, replace the string enxf8e43b808e06 with the actual network interface name corresponding to the 123 subnet on your computer.
cd ~/unitree_sdk2_python/example/go2/high_level
python go2_sport_client.pyNote: When prompted with "Enter id or name:", entering 0 will switch the robot to damp mode, which helps save energy. You can enter 1 afterward to make the robot stand up again.
Run the MAST3R post estimation api on workstation before running main.py on Go2 Robot.
Follow the installation step on MAST3R repo
After the installation, run post_estimation_api.py on workstation.
After turn on the post estimation API, run the main.py on Go2 Robot
- Add motion planning algorithms
- Add mobile manipulation
- Chi-Feng, Liu (cl6933@nyu.edu)
- Mentor: Juexiao Zhang