Closed-Loop Policy Inference and Evaluation#
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
source .venv/bin/activate
export OMNI_KIT_ACCEPT_EULA=YES ACCEPT_EULA=Y
./docker/run_docker.sh
Once the runtime is ready, set the models directory if you plan to download pre-trained checkpoints:
export MODELS_DIR="$HOME/models/isaaclab_arena/reinforcement_learning"
mkdir -p $MODELS_DIR
This tutorial assumes you’ve completed Policy Training and have a trained checkpoint, or you can download a pre-trained one as described below.
Download Pre-trained Model (skip preceding steps)
hf download \
nvidia/Arena-Franka-Lift-Object-RL-Task \
--local-dir $MODELS_DIR/lift_object_checkpoint
After downloading, the checkpoint is at:
$MODELS_DIR/lift_object_checkpoint/model_1999.pt
The same folder also contains model_1000.pt. The Experiment YAMLs below read
checkpoints from $MODELS_DIR/lift_object_checkpoint. When MODELS_DIR is not set, they
use the default folder from the export command above.
Evaluation Methods#
There are three ways to evaluate a trained policy. Each one runs experiment_runner.py with an
Experiment YAML:
One environment: evaluate one checkpoint and print its metrics
Parallel environments: evaluate one checkpoint across many environments for more episodes
Several checkpoints: one Run per checkpoint in the same Experiment, evaluated in sequence
Method 1: Single Environment Evaluation#
This Experiment YAML declares one Run. It evaluates the downloaded model_1999.pt checkpoint
with the rsl_rl policy in the lift_object environment for 20 episodes:
runs:
lift_object_rsl_rl:
environment:
type: lift_object
policy:
type: rsl_rl
# The tutorial's download folder: $MODELS_DIR, or its default location when MODELS_DIR is unset.
checkpoint_path: ${oc.env:MODELS_DIR,${oc.env:HOME}/models/isaaclab_arena/reinforcement_learning}/lift_object_checkpoint/model_1999.pt
rollout_limit:
num_episodes: 20
Run it with the Experiment Runner:
python isaaclab_arena/evaluation/experiment_runner.py \
--viz kit \
--experiment_config isaaclab_arena_environments/experiment_configs/reinforcement_learning/lift_object_rsl_rl_experiment.yaml
Note
If you train the model yourself, the checkpoint path is typically in the logs/rsl_rl/generic_experiment/ directory.
Override the checkpoint path to evaluate your own checkpoint. Replace <timestamp> with the
folder name of your training run:
python isaaclab_arena/evaluation/experiment_runner.py \
--viz kit \
--experiment_config isaaclab_arena_environments/experiment_configs/reinforcement_learning/lift_object_rsl_rl_experiment.yaml \
runs.lift_object_rsl_rl.policy.checkpoint_path=logs/rsl_rl/generic_experiment/<timestamp>/model_1999.pt
Policy settings such as checkpoint_path go under policy in the Run. Environment settings
such as object or embodiment go under environment.
When the Run finishes, the runner prints the Run’s status, recorded episodes, and success rate:
+--------------------+-----------+-------------+----------+-----------+--------------+--------------+-------------------+--------------+
| Run Name | Status | Policy Type | Num Envs | Num Steps | Num Episodes | Num Rebuilds | Recorded Episodes | Success Rate |
+--------------------+-----------+-------------+----------+-----------+--------------+--------------+-------------------+--------------+
| lift_object_rsl_rl | completed | rsl_rl | 1 | None | 20 | 1 | 20 | 1.0000 |
+--------------------+-----------+-------------+----------+-----------+--------------+--------------+-------------------+--------------+
Method 2: Parallel Environment Evaluation#
For more statistically significant results, run across many environments in parallel. Use the same Experiment YAML and override the number of environments, their spacing, and the number of episodes on the command line:
python isaaclab_arena/evaluation/experiment_runner.py \
--viz kit \
--experiment_config isaaclab_arena_environments/experiment_configs/reinforcement_learning/lift_object_rsl_rl_experiment.yaml \
runs.lift_object_rsl_rl.environment_builder.num_envs=64 \
runs.lift_object_rsl_rl.environment_builder.env_spacing=2.5 \
runs.lift_object_rsl_rl.rollout_limit.num_episodes=1024
+--------------------+-----------+-------------+----------+-----------+--------------+--------------+-------------------+--------------+
| Run Name | Status | Policy Type | Num Envs | Num Steps | Num Episodes | Num Rebuilds | Recorded Episodes | Success Rate |
+--------------------+-----------+-------------+----------+-----------+--------------+--------------+-------------------+--------------+
| lift_object_rsl_rl | completed | rsl_rl | 64 | None | 1024 | 1 | 1024 | 1.0000 |
+--------------------+-----------+-------------+----------+-----------+--------------+--------------+-------------------+--------------+
Method 3: Compare Checkpoints#
To evaluate multiple checkpoints in sequence, declare one Run per checkpoint in an Experiment YAML.
This YAML evaluates model_1000.pt and model_1999.pt from the downloaded folder. Values
under shared apply to both Runs, so each Run only sets its checkpoint:
shared:
environment:
type: lift_object
environment_builder:
num_envs: 64
policy:
type: rsl_rl
rollout_limit:
num_episodes: 1024
runs:
# Checkpoints in the tutorial's download folder: $MODELS_DIR, or its default location when
# MODELS_DIR is unset.
lift_object_model_1000:
policy:
checkpoint_path: ${oc.env:MODELS_DIR,${oc.env:HOME}/models/isaaclab_arena/reinforcement_learning}/lift_object_checkpoint/model_1000.pt
lift_object_model_1999:
policy:
checkpoint_path: ${oc.env:MODELS_DIR,${oc.env:HOME}/models/isaaclab_arena/reinforcement_learning}/lift_object_checkpoint/model_1999.pt
Run both checkpoints with one command:
python isaaclab_arena/evaluation/experiment_runner.py \
--viz kit \
--experiment_config isaaclab_arena_environments/experiment_configs/reinforcement_learning/lift_object_rsl_rl_checkpoints_experiment.yaml
To evaluate the models you trained yourself, override the checkpoint path of each Run. Replace
<timestamp> with the folder name of your training run in the logs/rsl_rl/generic_experiment/
directory:
python isaaclab_arena/evaluation/experiment_runner.py \
--viz kit \
--experiment_config isaaclab_arena_environments/experiment_configs/reinforcement_learning/lift_object_rsl_rl_checkpoints_experiment.yaml \
runs.lift_object_model_1000.policy.checkpoint_path=logs/rsl_rl/generic_experiment/<timestamp>/model_1000.pt \
runs.lift_object_model_1999.policy.checkpoint_path=logs/rsl_rl/generic_experiment/<timestamp>/model_1999.pt
The runner evaluates the Runs in YAML order and prints a summary for both:
+------------------------+-----------+-------------+----------+-----------+--------------+--------------+-------------------+--------------+
| Run Name | Status | Policy Type | Num Envs | Num Steps | Num Episodes | Num Rebuilds | Recorded Episodes | Success Rate |
+------------------------+-----------+-------------+----------+-----------+--------------+--------------+-------------------+--------------+
| lift_object_model_1000 | completed | rsl_rl | 64 | None | 1024 | 1 | 1024 | 0.9697 |
| lift_object_model_1999 | completed | rsl_rl | 64 | None | 1024 | 1 | 1024 | 1.0000 |
+------------------------+-----------+-------------+----------+-----------+--------------+--------------+-------------------+--------------+
Understanding the Results#
For the Lift Object task, the table reports:
Recorded Episodes: number of episodes that finished during the RunSuccess Rate: fraction of episodes where the object reached the target position within tolerance
A well-trained policy should reach a success rate of at least 70%. Results will vary with the target range, random seed, and hardware.
Note
For evaluation, leave environment.rl_training_mode at its default, false: success
termination stays enabled so the success rate is meaningful. For RSL-RL training, pass
--rl_training_mode to disable success termination.