vllm_omni.entrypoints.openpi.connection ¶
WebSocket connection for robot policy inference (OpenPI protocol).
Protocol (compatible with OpenPI policy clients): Connect -> server sends msgpack(PolicyServerConfig fields) Infer -> client sends msgpack(obs), server sends msgpack(ndarray) Reset -> client sends msgpack({endpoint:reset}), server sends msgpack(status)
NumPy values use msgpack-numpy marker mappings. Outbound payloads follow the openpi-client format so official OpenPI clients can decode action responses: ndarray -> {ndarray: true, dtype, shape, data} scalar -> {npgeneric: true, dtype, data}
Inbound payloads accept both the openpi-client markers above and the legacy vLLM-native markers: ndarray -> {nd: true, type, kind, shape, data} scalar -> {nd: false, type, kind, data}