EVA-Client
On this page

Policy backends

Match model inputs and action outputs to one of seven backends.

Policy backends

An EVA observation contains state (flat float32 vector), images (camera name to uint8 array), and prompt (string). Image size, RGB conversion, padding, and HWC/CHW layout are configured before the policy call. They must match the model’s input contract. The policy returns actions shaped [T, D]: one row per action step, with D determined by the configured action space and robot.

policy.type Connection Contract
openpi WebSocket + OpenPI msgpack-numpy Sends the observation directly; remote reset is used when metadata advertises supports_reset
openpi_rtc WebSocket + OpenPI msgpack-numpy Feeds back the previous response’s origin_actions or actions, shifted by backend_options.latency_k
starvla WebSocket + typed msgpack envelope Sends all camera images in observation order, language, and state; optional unnorm_key
xpolicylab WebSocket + typed msgpack-numpy frames hello, infer, and reset exchanges; explicit joint/EEF arm and gripper dimensions
gr00t ZeroMQ REQ/REP + msgpack-numpy Embodiment-specific video_keys, state_key, language_key, and action_keys
mock Local Synthetic action chunks for integration debugging
replay Local Recorded dataset actions; requires a dataset transport

XPolicyLab sends instruction, named camera color arrays, and named state fields. For two joint-space arms, wire state/action order is left joints, left gripper, right joints, right gripper. EEF arms use seven values (xyz + wxyz) plus the configured gripper width. Reset creates a new trial identity and restarts the inference-step counter. See configuration for presets.

Policy and image inputs

policy.type selects openpi, openpi_rtc, starvla, xpolicylab, gr00t, mock, or replay. host and port select the server; backend_options holds protocol-specific fields. See core concepts.

Deploy presets also accept policy as a non-empty list[dict]. Each entry needs a unique name; the first entry is selected at startup. The DEBUG input toolbar lists these names and lets you switch models while idle:

policy = [
    dict(name="Model A", type="openpi", host="127.0.0.1", port=5555),
    dict(name="Model B", type="openpi", host="127.0.0.1", port=5556,
         backend_options=dict()),
]

Each entry can override its backend type, endpoint, and backend_options. Robot, image preprocessing, and inference strategy settings are shared by the listed models. Switching clears the old policy connection, preview chunks, and setup state; the next send prepares the selected model. Switching is blocked while running or preparing. The existing single policy = dict(...) format continues to work. Restart after changing the configured model list.

Preset Model contract
dual_agilex_piper/xpolicylab.py XPolicyLab, port 19000, two 6D joint arms and 1D grippers, ZMQ images on demand
dual_yam_eva_sim_eval.py XPolicyLab EEF/TCP evaluation, two 7D pose arms and 1D grippers, ZMQ images on demand, control channel enabled
dual_agilex_piper_xpolicylab.py Offline XPolicyLab example with dataset column mappings and an official XPolicyLab server command; customize local paths

For XPolicyLab, set action_type="joint" or "ee", plus arm_dims and gripper_dims for one or two arms. EEF arms require arm_dims entries of 7 (xyz + wxyz). The observation and action spaces must agree with these widths. Optional evaluation_id sets the protocol evaluation identity; otherwise it is generated. Timeouts are seconds: request_timeout_s defaults to 120, connect_timeout_s to 30, and handshake_timeout_s to 60. Presets may override these values.

Image preprocessing is configured under transport:

Field Shared default Meaning
convert_bgr_to_rgb False Preserve channels by default; True swaps red and blue
image_height, image_width 224, 224 Target dimensions when resize=True; ignored otherwise
resize False Preserve source resolution; True enables resizing
resize_pad True When resizing is enabled, preserve aspect ratio with padding; False resizes directly
image_layout "hwc" Preserve channel-last layout; "chw" explicitly transposes to channel-first
image_mode "stream" ZMQ policy frames use streaming images or "on_demand" image requests
image_request_timeout_s 2.0 Maximum wait for a new image revision in on-demand mode

Check the complete preset chain because a robot or workflow preset may override these defaults. Match channel conversion to the transport’s decoded image order; the simulator XPolicyLab eval preset preserves the incoming channels and resolution.

Dataset transport also needs dataset_dir, episode_id, and dataset_keys. Set state_key, action_key, and, for EEF observations, eef_key to the dataset’s actual columns. video_keys maps EVA camera names to dataset video columns. An empty map uses observation.images.<camera>; a nonempty map selects only its mapped cameras.