XPolicyLab
For the latest version, see XPolicyLab/XPolicyLab.
XPolicyLab: A unified standard and infrastructure for robot policy development and deployment.
XPolicyLab is the shared lane between policy code and evaluation environments. Keep each model’s dependencies, checkpoints, and training recipes under policy/<POLICY>/; XPolicyLab handles the parts that are boring but easy to get wrong — serving, observation/action contracts, and eval wiring.
Start here for repo-level concepts and integration steps. For install commands, checkpoint layout, and training details, jump to that policy’s README — it is the source of truth for its model.
What XPolicyLab Enables
Section titled “What XPolicyLab Enables”- Environment isolation: run the policy model in its own conda/uv environment while the simulator, benchmark, or robot client runs separately.
- Remote deployment: connect the policy server and environment client through websocket, either on one machine or across machines.
- A common adapter contract: use the same high-level lifecycle for installation, data conversion, training, serving, and evaluation.
- A large policy zoo: reuse adapters for VLA/WAM policies, imitation-learning baselines, and reference templates.
- Benchmark and infra integration: mount XPolicyLab into benchmark or simulator workspaces without coupling policy code to one environment.
Supported Benchmarks And Infrastructure
Section titled “Supported Benchmarks And Infrastructure”Benchmarks
- RoboDojo: supported for RoboDojo simulator-backed evaluation and RoboDojo-format data exports.
- RoboTwin: supported as a benchmark and data source through policy-specific adapters and conversion scripts.
Infrastructure
- RLinf: supported infrastructure target for policy development and deployment workflows.
- StarVLA: supported infrastructure and policy stack; see policy/starVLA.
Integrated Policies
Section titled “Integrated Policies”Top-level adapters live in policy/. Treat each policy README as the source of truth for that model’s paper/repo link, environment, data format, training entrypoint, and checkpoint layout.
Policy catalog
Foundation / VLA / WAM policies
- A1, AHA_WAM, Abot_M0, Being_H05, Dexbotic_DM0, Dexora_1B
- DreamZero, EventVLA, FastWAM, GO1, GR00T_N17, GalaxeaVLA
- GigaWorldPolicy, H_RDT, Hy_Embodied_05_VLA, InternVLA_A1, LDA_1B
- LingBot_VA, LingBot_VLA, Mem_0, MolmoACT2, Motus
- OpenVLA_OFT, Pi_0, Pi_05, Pi_0_Fast, RDT_1B, RISE
- SmolVLA, Spatial_Forcing, Spirit_v15, TinyVLA, X_VLA, X_WAM, Xiaomi_Robotics_0, starVLA
Baselines and examples
- ACT, DP, demo_policy
Framework Overview
Section titled “Framework Overview”XPolicyLab separates model-side dependencies from environment-side dependencies.
A typical adapter contains:
model.py implements the model-facing API. deploy.py bridges environment observations to model-server calls. Use policy/demo_policy as the minimal adapter reference.
model.py should define a Model class with this shape:
| Method | Contract |
| ------------------------------------- | ------------------------------------------------------------------------------------ |
| __init__(model_cfg) | Load model config, checkpoints, processors, and runtime overrides from deploy.yml. |
| update_obs(obs) | Update model state from one observation dictionary. |
| update_obs_batch(obs_list) | Update model state from a list of observation dictionaries. |
| get_action() | Return one action chunk as a list of action dictionaries. |
| get_action_batch(env_idx_list=None) | Return batched action chunks aligned with active environment indices. |
| reset() | Clear model-side state between evaluation episodes. |
The default policy-server protocol is websocket (protocol: ws in deploy.yml). Keep legacy_tcp only for old adapters that have not migrated yet.
Model Integration Guide
Section titled “Model Integration Guide”The fastest way to add a model is to copy the reference adapter, keep the XPolicyLab boundary small, and debug the adapter before touching a real simulator.
- Learn the reference adapter: read policy/demo_policy, especially
model.py,deploy.py,deploy.yml,eval.sh,setup_eval_policy_server.sh, andsetup_eval_env_client.sh. - Understand the arguments: keep
bench_name,task_name,ckpt_name,env_cfg_type,action_type, andseedconsistent across data, training, and eval. - Create a skeleton: run
bash scripts/create_policy.sh <POLICY_NAME>and immediately fill inpolicy/<POLICY_NAME>/README.md. - Implement
model.pyfirst: load model resources in__init__, store observations inupdate_obs, translate observations to model-native inputs, return XPolicyLab action dictionaries fromget_action, and reset state inreset. - Keep deployment simple: put runtime defaults in
deploy.yml; keepdeploy.pyaligned withdemo_policy/deploy.pyunless the environment loop truly differs. - Debug without a simulator: run
EVAL_ENV_TYPE=debugto check imports, server startup, observation serialization, action keys, action dimensions, and batch logic. - Move to simulator or remote deployment: after debug mode passes, use
EVAL_ENV_TYPE=simor split policy server and environment client across machines.
Agent Skill checklist for model integration
When using a coding agent, give it this checklist:
A minimal Cursor Agent Skill can look like this:
Quick Start
Section titled “Quick Start”Clone XPolicyLab as a normal Python project when you are developing adapters, running offline checks, training from prepared data, or using your own environment client:
You do not need a simulator installation to start model-side development. Download a small HuggingFace demo bundle and keep the data next to XPolicyLab/:
This creates:
You can also pull HDF5 or LeRobot exports for RoboDojo and other benchmark-backed experiments:
With this setup, you can test data conversion, model loading, training scripts, and debug-mode evaluation before connecting to a simulator-backed benchmark.
The template for any adapter is the same — swap demo_policy and the argument values:
For RoboDojo simulation, mount XPolicyLab/ beside the simulator-side env_cfg/, scripts/, src/eval_client/, and task/ directories.
Common Workflow
Section titled “Common Workflow”Most adapters expose the same top-level shape. Some policies add extra arguments, consume upstream-native datasets, or skip training support. Follow the policy README when it differs from this template.
What the arguments mean
Section titled “What the arguments mean”When you run eval.sh, you are mostly answering: which benchmark family, which task to run now, which checkpoint to load, which robot setup, joint or end-effector actions, and which seed. The same names travel through process_data.sh, train.sh, and eval.sh, so you do not have to rename things at every step.
| Argument | In plain English | Examples |
| ------------------------------ | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
| bench_name | Which benchmark or dataset family this run belongs to | RoboDojo, RoboTwin |
| task_name | The task the environment client should run right now | stack_bowls, push_T — can differ from the tasks seen during training |
| ckpt_name | Which weights to load: a short run nickname, the full run folder name, or a path | cotrain, RoboDojo-cotrain-arx_x5-joint-0, checkpoints/my_run/ |
| env_cfg_type | Robot / camera / scene configuration key | arx_x5 |
| action_type | Action space the policy outputs | usually joint or ee |
| seed | Training or evaluation seed / layout id | 0, 1, 2 |
| policy_gpu_id / env_gpu_id | Which GPU runs the model vs. the simulator/client | 0, 1 |
| policy_env_or_uv_path | Conda env name or uv env path for the policy server | your policy-side env |
| eval_env_conda_env | Conda env for the simulator / robot client | your eval-side env |
How ckpt_name resolves. Most of the time you pass the short nickname you used during training, such as cotrain. XPolicyLab combines it with the other args and looks under checkpoints/RoboDojo-cotrain-arx_x5-joint-0/. Already know the full folder name? Pass that instead. Weights live somewhere else? Pass a path — relative paths resolve from the policy directory, absolute paths work too. Some adapters also honor explicit keys in deploy.yml (checkpoint_path, model_path, …). When in doubt, check the policy README.
A concrete eval example:
Deployment Flow
Section titled “Deployment Flow”During evaluation, the policy server and the environment client talk over websocket. That split is what lets you keep Isaac Sim / robot drivers on one machine and a heavy VLA on another.
For same-machine evaluation, eval.sh is enough — it starts the server, runs the client, and cleans up when you are done.
For split-machine deployment, start the policy server on the GPU machine and bind to 0.0.0.0 so other machines can reach it. The client connects to the policy machine’s real IP, not 0.0.0.0.
Then start the environment client on the simulator or robot machine:
EVAL_ENV_TYPE selects the environment-side backend:
- unset or
sim: real simulator-backed evaluation, when the integration is installed. debug: offline wiring check — no Isaac, no robot, just shapes and IO.real: real-robot client path, where the hardware integration exists.
Standard Data Formats
Section titled “Standard Data Formats”XPolicyLab standardizes the observation and trajectory dictionaries passed between adapters, converters, and environment clients. Individual policies may convert this standard format into their upstream-native format.
All pose values use [x, y, z, qw, qx, qy, qz]. Images are RGB unless a policy README states otherwise.
Observation Data Format v1.0
Trajectory Data Format v1.0
Useful converter helpers:
decode_image_bit handles encoded RGB image streams. get_robot_action_dim_info(env_cfg_type) returns robot-specific arm_dim and ee_dim lists, so adapters do not need to hard-code action dimensions.
Data And Checkpoints
Section titled “Data And Checkpoints”Training and data prep usually name things predictably so eval can find them without guesswork:
So if you trained with bench_name=RoboDojo, ckpt_name=cotrain, env_cfg_type=arx_x5, action_type=joint, seed=0, the run lands in checkpoints/RoboDojo-cotrain-arx_x5-joint-0/. At eval time you can pass just cotrain and let XPolicyLab stitch the rest together — or pass the full folder name, or a direct path if your weights live elsewhere.
Policies may also use upstream-native layouts or explicit paths in deploy.yml. Check the policy README before assuming a naming convention. For a small local dataset to play with, see Quick Start.
Checks
Section titled “Checks”Run static checks from the XPolicyLab repo root. Run eval.sh from policy/<POLICY>/, same as Common Workflow.
Static checks:
Adapter wiring check (no simulator required):
For a quick smoke test, try policy/demo_policy with placeholder env names such as base. Argument details live in Common Workflow.
Contact
Section titled “Contact”Tianxing Chen: chentianxing2002@gmail.com