Policy Deployment
This tutorial requires users to have a trained model checkpoint and a physical So100 Lerobot robot to run the policy.
In this tutorial, we will show example scripts and code snippets for deploying a trained policy. We will use the So100 Lerobot robotic arm as an example.

1. Loading Policy
Run the following command to start the policy server.
bashpython scripts/inference_service.py --server \
--model_path <PATH_TO_YOUR_CHECKPOINT> \
--embodiment_tag new_embodiment \
--data_config so100 \
--denoising_steps 4
- Model path is the checkpoint path for the policy. Users should provide the fine-tuned checkpoint path.
- Denoising steps are the number of denoising steps in the policy. We found that using 4 denoising steps has a similar effect to 16 steps.
- Implementation label is the implementation label for the policy. Users should use new_embodiment when fine-tuning on a new robot.
- Data configuration is the data configuration for the policy. Users should use
so100. If they want to use a different robot, please implement their ownModalityConfigandTransformConfig
2. Client nodes
To deploy the fine-tuned model, you can use the scripts/inference_policy.py script. This script will start a policy server.
The client node can be implemented using the from gr00t.eval.service import ExternalRobotInferenceClient class. This class is a standalone client-server class that can communicate with the policy server, and get_action() is the unique interface endpoint.
pythonfrom gr00t.eval.service import ExternalRobotInferenceClient
from typing import Dict, Any
raw_obs_dict: Dict[str, Any] = {} # 填写空白处
policy = ExternalRobotInferenceClient(host="localhost", port=5555)
raw_action_chunk: Dict[str, Any] = policy.get_action(raw_obs_dict)
Users can directly copy this type and implement their own client nodes in a separate isolated environment.
Example of So100 Lerobot robotic arm
We provided an example client node implementation for the So100 Lerobot robotic arm. For more detailed information, please refer to the example script scripts/eval_gr00t_so100.py.
Users can run the following command to start the client node.
bashpython examples/eval_gr00t_so100.py \
--use_policy --host <YOUR_POLICY_SERVER_HOST> \
--port <YOUR_POLICY_SERVER_PORT> \
--camera_index <YOUR_CAMERA_INDEX>
This will activate the robot and call the action = get_action(obs) endpoint of the policy server to obtain an action, which is then executed on the robot.