Skip to main content

Use the XPolicyLab integration

Before you start, complete the station setup.

Use the provided integration when your policy already has an XPolicyLab deployment. It runs your existing eval_one_episode function with an SE3 environment while the SDK keeps the station connection active.

Install XPolicyLab in the environment where you installed the SE3 SDK:

python -m pip install git+https://github.com/XPolicyLab/XPolicyLab.git

Keep your XPolicyLab checkout: its policy deployment files are excluded from the wheel. Follow your policy's setup instructions to start its model server with action_type=joint. The model server can run in its own environment.

Create my_eval.py with your episode task sequence and starting pose. From that file's directory, run the integration. Replace the policy directory and WebSocket URL with your policy adapter and running server:

python -m se3labs.sdk.bridge.xpolicylab \
--policy-dir /path/to/XPolicyLab/policy/Pi_05 \
--policy-url ws://localhost:9000 \
--station example-station-id --address example-station-addr \
--tasks my_eval:TASKS --start-pose my_eval:START \
--frequency 10 --output results.json

TASKS is a list or tuple of concrete task specs. Its length determines the episode count; each entry supplies its instruction, layout, scoring, and time limit. The integration runs them in order.

The integration supports a bimanual YAM station. Match your model's action frequency, joint ordering, and normalization to that station. Actions use absolute joint angles in radians and gripper open fractions. The environment provides get_obs(), take_action(), and is_episode_end(), with these camera names:

Station cameraXPolicyLab camera
topdowncam_head
wrist_leftcam_left_wrist
wrist_rightcam_right_wrist

The station runs in real time while your model computes. take_action() paces action submission; it does not confirm physical execution or settling. Returning from the deployment loop requests episode completion and scoring. See the XPolicyLab integration reference for the Python interface.

Continue with reading the evaluation results.