Humanoid policy adaptive to end-effector payloads.
Both uv and conda flows are supported. uv is the recommended path: it
resolves the full stack (RMA policy deps + the h12_ros2_controller and
unitree_sdk2_python submodules) from a single pyproject.toml and creates a
local .venv.
-
Install
uv(e.g.curl -LsSf https://astral.sh/uv/install.sh | sh). -
Clone this repo and initialize its submodules:
git clone https://github.com/correlllab/h12_adaptive_policy.git cd h12_adaptive_policy git submodule update --init --recursive -
Let
uvcreate the environment and install every dependency (both theh12_ros2_controllerandunitree_sdk2_pythonsubmodules are installed as editable path dependencies):uv sync
This creates
.venv/pinned to Python 3.10. All subsequent commands should be invoked viauv run ..., which activates the venv automatically. -
Smoke-test the install:
uv run python -c "import mujoco, torch, pinocchio, h12_ros2_controller; print('ok')" -
Run the Mujoco RMA deployment from the repo root:
uv run python h12_adaptive_policy/deploy/mujoco_deploy_h12_rma.py
See docs/mujoco_frame_controller_howto.md
for running the Mujoco sim together with the h12_ros2_controller FrameController
stack.
-
Initialize submodules:
git submodule update --init --recursive
-
The Unitree Python SDK is vendored as a submodule under
submodules/unitree_sdk2_python(cloned by thegit submodule updateabove). -
Install python dependencies from
environment.yml:conda env create -f environment.yml conda activate adaptive_env pip install -e submodules/unitree_sdk2_python pip install -e submodules/h12_ros2_controller
data/contains saved data such as model checkpoint and evaluation results.figurescontains generated figures.h12_adaptive_policy/: contains source code.deploy/contains scripts to deploy the policy and run experiments.example/contains example scripts.plot/contains scripts to plot figures.RMA/contains implementation of the RMA modules.
submodules/: contains external dependencies.
- Run scripts from the root directory
python h12_adaptive_policy/deploy/eval_rma_hand_sweep_6d.py.