Closed-Loop Policy Inference and Evaluation#
This workflow demonstrates running the trained GR00T N1.6 policy in closed-loop and evaluating it in Arena G1 Loco Manipulation Task environment.
Prepare the Arena runtime from the repository root, using either a native uv environment or the
base Docker container (see Installation for the full setup):
uv sync --extra dev --group gr00t-client
source .venv/bin/activate
export OMNI_KIT_ACCEPT_EULA=YES ACCEPT_EULA=Y
./docker/run_docker.sh
Once the runtime is ready, set the dataset and models directories.
export DATASET_DIR="$HOME/datasets/isaaclab_arena/locomanipulation_tutorial"
export MODELS_DIR="$HOME/models/isaaclab_arena/locomanipulation_tutorial"
Note that this tutorial assumes that you’ve completed the preceding step (Policy Training) or downloaded the pre-trained model checkpoint below:
Download Pre-trained Model (skip preceding steps)
These commands can be used to download the pre-trained GR00T N1.6 policy checkpoint, such that the preceding steps can be skipped. This step requires the Hugging Face CLI, which can be installed by following the official instructions.
To download run:
hf download \
--revision gn1_6 \
nvidia/GN1x-Tuned-Arena-G1-Loco-Manipulation \
--local-dir $MODELS_DIR/checkpoint-20000
Prerequisite: launch the GR00T policy server
The Arena evaluation client runs in the Arena runtime and connects to a GR00T policy server.
Before running the evaluation, open another terminal, separate from the Arena runtime, for the server.
The server runs out of
the Isaac-GR00T source
submodule pinned at commit e29d8fc; populate it with
git submodule update --init submodules/Isaac-GR00T if it is not already
checked out. Then, from the repository root in that terminal, launch the server and
leave it running:
Note
Blackwell GPUs with compute capability sm_120 require CUDA 12.8 or newer. The
GR00T environment setup guide
specifies CUDA 12.8 and pytorch-cu128 for RTX 5090 systems.
cd submodules/Isaac-GR00T
uv run python gr00t/eval/run_gr00t_server.py \
--modality-config-path ../../isaaclab_arena_policies/isaaclab_arena_gr00t/embodiments/g1/g1_sim_wbc_data_config.py \
--model-path $HOME/models/isaaclab_arena/locomanipulation_tutorial/checkpoint-20000 \
--embodiment-tag NEW_EMBODIMENT \
--device cuda --host 127.0.0.1 --port 5555
Step 1: Run Single Environment Evaluation#
We first run the policy in a single environment with visualization via the GUI.
The Arena GR00T evaluation client is configured by a config file at isaaclab_arena_policies/isaaclab_arena_gr00t/policy/config/g1_locomanip_gr00t_closedloop_config.yaml.
Configuration file (g1_locomanip_gr00t_closedloop_config.yaml):
language_instruction: "Pick up the brown box from the shelf, and place it into the blue bin on the table located at the right of the shelf."
action_horizon: 50
video_backend: decord
modality_config_path: isaaclab_arena_policies/isaaclab_arena_gr00t/embodiments/g1/g1_sim_wbc_data_config.py
action_chunk_length: 50
pov_cam_name_sim: "robot_head_cam_rgb"
gr00t_embodiment_adapter: g1_wbc
The evaluation itself is an Arena Experiment with
one Run. It selects the environment, the g1_wbc_joint embodiment and the brown box, loads the
GR00T client config above, connects the client to the server, and stops after 1500 steps. An episode
times out after 30 seconds, which is 1500 steps.
Experiment file (g1_locomanip_gr00t_experiment.yaml):
# Evaluate the GR00T policy from the locomanipulation workflow on picking up the brown box and placing
# it in the bin, in one environment for 1500 steps. An episode times out after 30 s, which is
# 1500 steps, so every environment finishes at least one episode.
# To evaluate 5 parallel environments, add this override to the experiment_runner.py command:
# runs.g1_pick_and_place_brown_box.environment_builder.num_envs=5
runs:
g1_pick_and_place_brown_box:
environment:
type: galileo_g1_locomanip_pick_and_place
enable_cameras: true
embodiment: g1_wbc_joint
object: brown_box
policy:
type: isaaclab_arena_gr00t.policy.gr00t_remote_closedloop_policy.Gr00tRemoteClosedloopPolicy
policy_config_yaml_path: isaaclab_arena_policies/isaaclab_arena_gr00t/policy/config/g1_locomanip_gr00t_closedloop_config.yaml
policy_device: cuda:0
remote_host: 127.0.0.1
remote_port: 5555
rollout_limit:
num_steps: 1500
Test the policy in a single environment with visualization via the GUI run:
python isaaclab_arena/evaluation/experiment_runner.py \
--viz kit \
--experiment_config isaaclab_arena_environments/experiment_configs/g1_locomanip_gr00t_experiment.yaml
At the end of the evaluation, the console shows the Run table with the number of recorded episodes and the success rate. With the pre-trained checkpoint, the output looks like this:
+-----------------------------+-----------+-------------------------+----------+-----------+--------------+--------------+-------------------+--------------+
| Run Name | Status | Policy Type | Num Envs | Num Steps | Num Episodes | Num Rebuilds | Recorded Episodes | Success Rate |
+-----------------------------+-----------+-------------------------+----------+-----------+--------------+--------------+-------------------+--------------+
| g1_pick_and_place_brown_box | completed | gr00t_remote_closedloop | 1 | 1500 | None | 1 | 1 | 1.0000 |
+-----------------------------+-----------+-------------------------+----------+-----------+--------------+--------------+-------------------+--------------+
The success rate covers all episodes that finish within the 1500 steps. It depends on the quality of the post-trained policy, the quality of the dataset, and the number of steps in the evaluation, and it varies between evaluations, especially with few episodes.
Step 2: Run Parallel Environments Evaluation#
The same Experiment can evaluate the policy in several parallel environments. Set the number of
environments on the command line instead of editing the file: runs.<Run name>.<field>=<value>
changes one field of that Run.
Test the policy in 5 parallel environments with visualization via the GUI run:
python isaaclab_arena/evaluation/experiment_runner.py \
--viz kit \
--experiment_config isaaclab_arena_environments/experiment_configs/g1_locomanip_gr00t_experiment.yaml \
runs.g1_pick_and_place_brown_box.environment_builder.num_envs=5
During the evaluation, the console shows which environments reset because their episode ended, for example because the brown box was placed in the blue bin or the episode ran out of time:
Resetting policy state for env_ids: tensor([3], device='cuda:0')
At the end of the evaluation, the console shows the Run table. An episode ends after 1500 steps at the latest, so every environment finishes at least one episode and the success rate also counts the attempts that time out. Environments that finish early start a new episode, which counts only if it also ends within the 1500 steps.
+-----------------------------+-----------+-------------------------+----------+-----------+--------------+--------------+-------------------+--------------+
| Run Name | Status | Policy Type | Num Envs | Num Steps | Num Episodes | Num Rebuilds | Recorded Episodes | Success Rate |
+-----------------------------+-----------+-------------------------+----------+-----------+--------------+--------------+-------------------+--------------+
| g1_pick_and_place_brown_box | completed | gr00t_remote_closedloop | 5 | 1500 | None | 1 | 6 | 0.5000 |
+-----------------------------+-----------+-------------------------+----------+-----------+--------------+--------------+-------------------+--------------+
Note
Note that the embodiment used in closed-loop policy inference is g1_wbc_joint, which is different
from g1_wbc_pink used in data generation.
This is because during tele-operation, the upper body is controlled via target end-effector poses,
which are realized by using the PINK IK controller, and the lower body is controlled via a WBC policy.
GR00T N1.6 policy is trained on upper body joint positions and lower body WBC policy inputs, so we use
g1_wbc_joint for closed-loop policy inference.
Note
The training dataset was generated with CPU physics, while the commands above run physics on the GPU,
the default device. To evaluate with CPU physics instead, add --device cpu.