From: https://github.com/unitreerobotics/unitree_sdk2_python
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 installcd ~/unitree_sdk2_python
export CYCLONEDDS_HOME="~/cyclonedds/install"
pip3 install -e .✅ Same cyclonedds clone command
✅ Same cyclonedds branch: releases/0.10.x
✅ Same build directory structure: build install
✅ Same cmake commands
✅ Same CYCLONEDDS_HOME location
✅ Same install method: install -e .
Official: pip3 install -e .
Ours: uv pip install -e .
Why: Per your preference, uv pip is faster and we use it consistently throughout the project.
Official: Installs to system Python
Ours: Activates .venv first, then installs
Why: Best practice - keeps dependencies isolated, prevents conflicts.
Official: export CYCLONEDDS_HOME="~/cyclonedds/install"
Ours: CYCLONEDDS_HOME="$HOME/cyclonedds/install"
Why:
$HOMEis more reliable in scripts than~- Inline environment variable works same as export for single command
- More explicit path expansion
Official: Assumes cyclonedds doesn't exist
Ours: Checks if already installed before cloning
Why: Idempotent - can run script multiple times safely.
Official: Stops after SDK install
Ours: Also installs g1-record-and-replay + tests imports
Why: Complete setup for this project, not just SDK.
| Step | Official | Ours | Match? |
|---|---|---|---|
| Clone cyclonedds | git clone https://github.com/eclipse-cyclonedds/cyclonedds -b releases/0.10.x |
Same | ✅ |
| Create dirs | mkdir build install |
mkdir build install |
✅ |
| CMake configure | cmake .. -DCMAKE_INSTALL_PREFIX=../install |
Same | ✅ |
| CMake build | cmake --build . --target install |
Same | ✅ |
| Set env var | export CYCLONEDDS_HOME="~/cyclonedds/install" |
CYCLONEDDS_HOME="$HOME/cyclonedds/install" |
✅ Equivalent |
| Install SDK | pip3 install -e . |
uv pip install -e . |
✅ Equivalent |
Our script:
- Follows the exact same build process for cyclonedds
- Uses the same installation method for the SDK
- Adds safety and convenience features (checks, venv, testing)
- Respects your tooling preferences (uv instead of pip)
If you strip away our additions (safety checks, venv, tests), the core commands are:
# Official
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 .
# Ours (core)
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 ~/projects/g1-piano/unitree_sdk2_python
CYCLONEDDS_HOME="$HOME/cyclonedds/install" uv pip install -e .Differences: uv pip vs pip3 (user preference), path structure (project-specific)
If you prefer to follow the official instructions exactly:
# Pure official way (no venv, system pip)
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 ~/projects/g1-piano/unitree_sdk2_python
export CYCLONEDDS_HOME="~/cyclonedds/install"
pip3 install -e .
cd ~/projects/g1-piano/g1-record-and-replay
pip3 install -e .Our recommendation: Stick with our script! It:
- ✅ Follows official core instructions
- ✅ Adds safety (idempotent)
- ✅ Uses your preferred tools (uv)
- ✅ Manages venv properly
- ✅ Tests the installation
- ✅ Provides clear feedback
To verify our implementation matches official expectations:
# After running our script
source .venv/bin/activate
python -c "import unitree_sdk2py; print('SDK installed correctly')"
python -c "import cyclonedds; print(f'cyclonedds version: {cyclonedds.__version__}')"Expected output:
- SDK imports successfully
- cyclonedds version: 0.10.2
This confirms we've installed everything according to the official requirements! ✅
Question: Does setup_dependencies.sh follow official instructions?
Answer: YES - The core build and install commands are identical. We've added:
- Safety checks
- Virtual environment management
- Use of
uv pip(your preference) - Testing and verification
- Better error handling
Bottom line: You're getting the official installation + modern best practices! 🎯