Skip to main content
The server-client architecture allows you to run GR00T inference on a remote GPU server while controlling robots from a separate client machine. This setup uses ZeroMQ for fast, low-latency communication.

Architecture overview

The PolicyServer runs on a GPU-equipped machine and handles inference requests, while PolicyClient runs on your robot controller or simulation environment:

Starting the server

Server configuration

The PolicyServer class provides several configuration options:

Basic configuration

With authentication

On the client side:

Server endpoints

The server registers these endpoints by default:
  • ping: Health check endpoint
  • kill: Gracefully shutdown the server
  • get_action: Get action from observation
  • reset: Reset policy state
  • get_modality_config: Retrieve modality configuration

Client usage

The PolicyClient implements the same interface as BasePolicy:

Timeout configuration

Configure request timeout based on your inference latency:

Custom endpoints

Register custom endpoints for application-specific functionality:
Call from client:

Message serialization

The server uses MessagePack for efficient serialization with custom handling for NumPy arrays and modality configs:
This ensures fast, zero-copy transfer of large arrays like images.

Debugging with replay policy

Test your client integration without a trained model:
The server replays actions from the dataset. Switch episodes with:
The replay policy is useful for verifying environment setup, observation formatting, and action execution without requiring a trained model.

Network considerations

Firewall configuration

Ensure port 5555 (or your chosen port) is open:

Latency optimization

For low-latency applications:
  1. Use dedicated network interfaces
  2. Disable TCP Nagle’s algorithm (ZeroMQ does this by default)
  3. Run server and client on the same machine when possible
  4. Consider using InfiniBand or high-speed Ethernet
The server binds to 0.0.0.0 by default, making it accessible from any network interface. Use api_token authentication or firewall rules to restrict access in production deployments.

Error handling

The server catches exceptions and returns error responses:
Common errors:
  • "Unauthorized: Invalid API token": Authentication failed
  • "Unknown endpoint": Endpoint not registered
  • Connection timeout: Server unreachable or overloaded

Server script configuration

The run_gr00t_server.py script supports additional options:
Example with simulation wrapper: