跳到主要内容

Root Project

root project 用来跑 inference、tracking policy、MuJoCo simulation,以及 scripts/real_bridge.py

Setup

uv sync

如果 unitree_sdk2py setup 找不到 cyclonedds,可以参考上游 FAQ:

https://github.com/unitreerobotics/unitree_sdk2_python?tab=readme-ov-file#faq

常见报错:

Could not locate cyclonedds. Try to set CYCLONEDDS_HOME or CMAKE_PREFIX_PATH

先编译并安装 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
cmake --build . --target install
export CYCLONEDDS_HOME="$HOME/cyclonedds/install"

然后重新执行环境 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

Next Steps