Embodied AI Glossary中文

Remote Procedure Call (RPC)

RPC(远程过程调用)RPCCommon

Calling a function that actually runs in another process or on another machine, as if it were local.

A remote procedure call (RPC) lets code call a function in the usual way while the work actually happens in another process, usually on another machine. The client packs the function name and arguments into a message, and the server runs the function and sends back the return value or the error. gRPC and zerorpc are common implementations, and ROS services follow the same request-reply idea. The contrast with publish-subscribe is worth getting straight: pub/sub is a one-to-many, one-way stream where the sender never waits for an answer, which suits continuous sensor data, while RPC is a one-to-one request that expects a result, which suits sending a command or reading the state once. In robot setups it shows up in two places: a laptop calling the robot interface on a control computer (DROID's laptop uses zerorpc to call state and command functions on the NUC), and remote policy inference, where observations go to a GPU server and actions come back. Remote calls are orders of magnitude slower than local ones and can fail along with the network, so 1 kHz low-level control loops stay on the control computer.

ExampleOn the robot side, calling policy.infer(obs) on openpi's client looks just like calling a local model; under the hood the observation is packed up and sent to a GPU server, and the predicted action chunk comes back. That's the RPC idea, carried over WebSocket in openpi's case.

Also called
RPC
Related
Publish-Subscribe · Service (ROS) · gRPC Remote Procedure Calls · zerorpc · Policy Server (Remote Inference) · Middleware
Sources
Remote procedure call - Wikipedia
ROS Wiki: Services(发布/订阅与 RPC 式请求-应答的区别) (Chinese)
DROID 代码:droid/misc/server_interface.py(zerorpc 客户端) (Chinese)

See it in the full glossary →