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}
kind is required on the nd markers because it is what separates them from a plain user mapping, but its value is dialect-specific: the vLLM-native markers carry the dtype kind character while the msgpack-numpy package leaves it empty for plain dtypes and sets "V" for structured ones. Both spellings are accepted. Scalars packed by msgpack-numpy omit kind entirely and are therefore left as mappings.