Contributor: RoboDojo Team | Paper: Spatial Forcing / OpenPI integration notes | arXiv: TBD | Original code: https://github.com/Physical-Intelligence/openpi
Spatial_Forcing adapts the Spatial Forcing policy, built on the Physical Intelligence OpenPI stack, to XPolicyLab/RoboDojo. Integration scripts live at this directory level; the vendored upstream implementation lives in open_sf/, and the policy runtime is a uv-managed environment rather than a conda environment.
Shared conventions — argument meanings, checkpoint naming, split-machine deployment, EVAL_ENV_TYPE — are documented in the XPolicyLab README. Official results: RoboDojo LeaderBoard.
cd XPolicyLab/policy/Spatial_Forcing
bash install.sh
source open_sf/.venv/bin/activate # optional; eval scripts locate the uv env themselvesinstall.sh requires uv on PATH and builds the environment inside open_sf/.venv. There is no conda environment to activate for the policy side: at evaluation time pass uv as <policy_uv_env> to use the deploy.yml policy_uv_env_path, or pass an explicit Spatial-Forcing/OpenPI project path.
No top-level process_data.sh. The adapter expects data in the format consumed by the upstream project or configured through deploy.yml; use the upstream README under open_sf/ when custom conversion is required.
No top-level train.sh is provided for this adapter. Train with the upstream project recipe, then point deploy.yml ckpt_name at the exported checkpoint (for example ./checkpoints/pi05sf_jax_robodojo_v21_offcache/59999). The model adapter also accepts model_path or checkpoint_path when launching the policy server directly.
cd XPolicyLab/policy/Spatial_Forcing
bash eval.sh <bench_name> <task_name> <ckpt_name> <env_cfg_type> <action_type> <seed> \
<policy_gpu_id> <env_gpu_id> <policy_uv_env> <eval_env_conda_env>
# Example: evaluate a trained cotrain checkpoint on stack_bowls
bash eval.sh RoboDojo stack_bowls RoboDojo-cotrain-arx_x5-joint-0 arx_x5 joint 0 0 0 uv <eval_env_conda_env><policy_uv_env> replaces the usual <policy_conda_env> argument (see Installation). ckpt_name may be a checkpoint directory, an absolute path, a checkpoints/... path, or a run name under this adapter's checkpoints/.
EVAL_ENV_TYPE=debug runs the offline wiring check (no simulator); leave it unset or set EVAL_ENV_TYPE=sim for RoboDojo simulation. For split-machine deployment via setup_eval_policy_server.sh / setup_eval_env_client.sh, follow the Deployment Flow.
deploy.yml keys to check before evaluation: checkpoint_num, protocol, result_dir, obs_transform_pipeline, policy_uv_env_path, train_config_name, repo_id.
Environment variables used by the adapter scripts: OPENPI_DATA_HOME overrides the OpenPI cache location used by the policy server, and UV_CACHE_DIR overrides the uv cache used by install.sh.