[Unitree Go2] Can't build the official Unitree Python SDK and ROS 2 package on Extension pack

Hello,

we bought the Unitree Go2 EDU Version with the extension pack/Nvidia Orin Nano 8 GB. We want to use the robot in a lecture and need the Python API for the Sport Client because students should be able to use it in a ROS 2 Python Node to move and rotate the robot as well as use some other special predefined moves.

However, we can’t install the official Python SDK (https://github.com/unitreerobotics/unitree_sdk2_python) or the ROS 2 package https://github.com/unitreerobotics/unitree_ros2 on the Nvidia Orin Nano 8 GB in the Extension pack.

When trying to build the SDK we get the following error and we already tried the bugfix mentioned in the repo regarding the cyclonedds path:

Obtaining file:///home/unitree/unitree_sdk2_python
Collecting cyclonedds==0.10.2
  Using cached cyclonedds-0.10.2.tar.gz (156 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 /tmp/tmpyyyypabs get_requires_for_build_wheel /tmp/tmpo2jv0mx_
       cwd: /tmp/pip-install-ou1fh3jo/cyclonedds
  Complete output (1 lines):
  Could not locate cyclonedds. Try to set CYCLONEDDS_HOME or CMAKE_PREFIX_PATH
  ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 /tmp/tmpyyyypabs get_requires_for_build_wheel /tmp/tmpo2jv0mx_ Check the logs for full command output.

The advised bugfix we tried, as mentioned in the official repository:

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
cmake --build . --target install

cd ~/unitree_sdk2_python
export CYCLONEDDS_HOME="~/cyclonedds/install"
pip3 install -e .

We already have access to the qre_go2 repository and can build it. However, we need a Python API or package because we want to use the Unitree Go2 in a lecture and it looks like there are only C++ packages installed.

I would appreciate your suggestions.

Kind regards

Okay I was able to build the Python SDK. I had to add those instructions:

cd ..
export CYCLONEDDS_HOME="$(pwd)/install"
pip3 install cyclonedds --no-binary cyclonedds

So everything togeher:

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
cmake --build . --target install
cd ..
export CYCLONEDDS_HOME="$(pwd)/install"
pip3 install cyclonedds --no-binary cyclonedds

cd ~/unitree_sdk2_python
pip3 install -e .

However, I’m still not able to build the Unitree ROS 2 package:

unitree@ubuntu:~/unitree_ros2$ source /opt/ros/foxy/setup.bash 
unitree@ubuntu:~/unitree_ros2$ colcon build
Starting >>> cyclonedds
Starting >>> unitree_api                 
Starting >>> unitree_go                                                   
--- stderr: cyclonedds                                                                                    
src/tools/ddsperf/CMakeFiles/ddsperf_types_generate.dir/build.make:61: *** target pattern contains no '%'.  Stop.
make[1]: *** [CMakeFiles/Makefile2:452: src/tools/ddsperf/CMakeFiles/ddsperf_types_generate.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:152: all] Error 2
---
Failed   <<< cyclonedds [2.27s, exited with code 2]
Aborted  <<< unitree_api [1.72s]
Aborted  <<< unitree_go [1.21s]

Summary: 0 packages finished [7.48s]
  1 package failed: cyclonedds
  2 packages aborted: unitree_api unitree_go
  1 package had stderr output: cyclonedds
  2 packages not processed

Dear @roco-kit,

unfortunately we don’t use the Unitree SDK a lot - From day one, we have started builing our own packages for all kind of Unitree robots, to exactly now what’s happening and can always improve them.

Neverthless we will do our best to support you as good as possible. @Azib do you have an idea how to solve?

Have a nice day!

Dear @roco-kit ,

Regarding the issue you’re experiencing, I recommend contacting Unitree directly. We have not worked with their SDK, and Unitree will be better equipped to assist you. Their support email is support@unitree.cc