run-policy can run inference on a more powerful machine on the robot’s network, such as a desktop with a GPU. The robot sends joint positions and camera frames to it over gRPC and gets actions back.
run-policy chooses the policy (--policy_path, --policy_type and --device), not the server. One server can serve different policies across sessions without a restart. The server loads the policy, so the path must be reachable from the server, such as a HuggingFace Hub repo ID or a local path on the server machine.
Requires the
lerobot extra, and a CUDA build of PyTorch on the server for GPU inference. Without --server_host, run-policy starts a policy server on the robot. You need this command only when inference runs on another machine.