Root Project
Use the root project for inference, tracking policy, MuJoCo simulation, and scripts/real_bridge.py.
Setup
uv sync
If unitree_sdk2py setup cannot locate cyclonedds, refer to the upstream
FAQ:
https://github.com/unitreerobotics/unitree_sdk2_python?tab=readme-ov-file#faq
Typical error:
Could not locate cyclonedds. Try to set CYCLONEDDS_HOME or CMAKE_PREFIX_PATH
Compile and install CycloneDDS first:
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
export CYCLONEDDS_HOME="$HOME/cyclonedds/install"
Then rerun your environment setup.
Verify Installation
Test ankle swing
uv run scripts/ankle_swing.py
Test inference time
uv run scripts/test_policy_inference.py \
--policy_config checkpoints/lafan-aa/policy-ec592bb4_lafan_100style_student-5000.yaml \
--inference_backend onnx-cpu