LeRobot EnvHub 现已支持使用 IsaacLab Arena 的 GPU 加速 simulation,可大规模评估 policy。 使用高保真 simulation 训练和评估模仿学习 policy——全部集成到 LeRobot 生态系统中。
IsaacLab Arena 与 NVIDIA IsaacLab 集成,提供:
硬件要求与 Isaac Sim 相同,详见 Isaac Sim 要求。
# 1. Create conda environment
conda create -y -n lerobot-arena python=3.11
conda activate lerobot-arena
conda install -y -c conda-forge ffmpeg=7.1.1
# 2. Install Isaac Sim 5.1.0
pip install "isaacsim[all,extscache]==5.1.0" --extra-index-url https://pypi.nvidia.com
# Accept NVIDIA EULA (required)
export ACCEPT_EULA=Y
export PRIVACY_CONSENT=Y
# 3. Install IsaacLab 2.3.0
git clone https://github.com/isaac-sim/IsaacLab.git
cd IsaacLab
git checkout v2.3.0
./isaaclab.sh -i
cd ..
# 4. Install IsaacLab Arena
git clone https://github.com/isaac-sim/IsaacLab-Arena.git
cd IsaacLab-Arena
git checkout release/0.1.1
pip install -e .
cd ..
# 5. Install LeRobot (evaluation extra for env/policy evaluation)
git clone https://github.com/huggingface/lerobot.git
cd lerobot
pip install -e ".[evaluation]"
cd ..
# 6. Install additional dependencies
pip install onnxruntime==1.23.2 lightwheel-sdk==1.0.1 vuer[all]==0.0.70 qpsolvers==4.8.1
pip install numpy==1.26.0 # Isaac Sim 5.1 depends on numpy==1.26.0, this will be fixed in next release以下训练好的 policy 可用:
| policy | 架构 | 任务 | 链接 |
|---|---|---|---|
| pi05-arena-gr1-microwave | PI0.5 | GR1 Microwave | HuggingFace |
| smolvla-arena-gr1-microwave | SmolVLA | GR1 Microwave | HuggingFace |
pip install -e ".[smolvla]"
pip install numpy==1.26.0 # revert numpy to version 1.26lerobot-eval \
--policy.path=nvidia/smolvla-arena-gr1-microwave \
--env.type=isaaclab_arena \
--env.hub_path=nvidia/isaaclab-arena-envs \
--rename_map='{"observation.images.robot_pov_cam_rgb": "observation.images.robot_pov_cam"}' \
--policy.device=cuda \
--env.environment=gr1_microwave \
--env.embodiment=gr1_pink \
--env.object=mustard_bottle \
--env.headless=false \
--env.enable_cameras=true \
--env.video=true \
--env.video_length=10 \
--env.video_interval=15 \
--env.state_keys=robot_joint_pos \
--env.camera_keys=robot_pov_cam_rgb \
--trust_remote_code=True \
--eval.batch_size=1pip install -e ".[pi]"
pip install numpy==1.26.0 # revert numpy to version 1.26PI0.5 在评估时需要禁用 torch compile:
TORCH_COMPILE_DISABLE=1 TORCHINDUCTOR_DISABLE=1 lerobot-eval \
--policy.path=nvidia/pi05-arena-gr1-microwave \
--env.type=isaaclab_arena \
--env.hub_path=nvidia/isaaclab-arena-envs \
--rename_map='{"observation.images.robot_pov_cam_rgb": "observation.images.robot_pov_cam"}' \
--policy.device=cuda \
--env.environment=gr1_microwave \
--env.embodiment=gr1_pink \
--env.object=mustard_bottle \
--env.headless=false \
--env.enable_cameras=true \
--env.video=true \
--env.video_length=15 \
--env.video_interval=15 \
--env.state_keys=robot_joint_pos \
--env.camera_keys=robot_pov_cam_rgb \
--trust_remote_code=True \
--eval.batch_size=1要更改并行环境的数量,请使用 ```--eval.batch_size``` 参数。
评估期间,你将看到一个显示实时成功率的进度条:
Stepping through eval batches: 8%|██████▍ | 4/50 [00:45<08:06, 10.58s/it, running_success_rate=25.0%]要在评估期间启用视频录制,请向命令添加以下参数:
--env.video=true \
--env.video_length=15 \
--env.video_interval=15有关视频录制的更多详细信息,请参阅 IsaacLab 录制文档。
使用 `--env.headless=true` 以无头模式运行时,对于启用了相机的环境,你还必须显式启用相机:--env.headless=true --env.enable_cameras=true
评估视频会以以下结构保存到输出目录:
outputs/eval/<date>/<timestamp>_<env>_<policy>/videos/<task>_<env_id>/eval_episode_<n>.mp4例如:
outputs/eval/2026-01-02/14-38-01_isaaclab_arena_smolvla/videos/gr1_microwave_0/eval_episode_0.mp4要了解有关使用 LeRobot 训练 policy 的更多信息,请参阅训练文档:
HuggingFace Hub 上提供了 IsaacLab Arena 示例 dataset,可用于实验:
| dataset | 说明 | 帧数 |
|---|---|---|
| Arena-GR1-Manipulation-Task | GR1 微波炉操作 | ~4K |
| Arena-G1-Loco-Manipulation-Task | G1 移动操作 | ~4K |
from lerobot.envs.configs import IsaaclabArenaEnv
config = IsaaclabArenaEnv(
# Environment selection
environment="gr1_microwave", # Task environment
embodiment="gr1_pink", # Robot embodiment
object="power_drill", # Object to manipulate
# Simulation settings
episode_length=300, # Max steps per episode
headless=True, # Run without GUI
device="cuda:0", # GPU device
seed=42, # Random seed
# Observation configuration
state_keys="robot_joint_pos", # State observation keys (comma-separated)
camera_keys="robot_pov_cam_rgb", # Camera observation keys (comma-separated)
state_dim=54, # Expected state dimension
action_dim=36, # Expected action dimension
camera_height=512, # Camera image height
camera_width=512, # Camera image width
enable_cameras=True, # Enable camera observations
# Video recording
video=False, # Enable video recording
video_length=100, # Frames per video
video_interval=200, # Steps between recordings
# Advanced
mimic=False, # Enable mimic mode
teleop_device=None, # Teleoperation device
disable_fabric=False, # Disable fabric optimization
enable_pinocchio=True, # Enable Pinocchio for IK
)创建一个名为 test_env_load_arena.py 的文件,或从 EnvHub 下载:
import logging
from dataclasses import asdict
from pprint import pformat
import torch
import tqdm
from lerobot.configs import parser
from lerobot.configs.eval import EvalPipelineConfig
@parser.wrap()
def main(cfg: EvalPipelineConfig):
"""Run random action rollout for IsaacLab Arena environment."""
logging.info(pformat(asdict(cfg)))
from lerobot.envs import make_env
env_dict = make_env(
cfg.env,
n_envs=cfg.env.num_envs,
trust_remote_code=True,
)
env = next(iter(env_dict.values()))[0]
env.reset()
for _ in tqdm.tqdm(range(cfg.env.episode_length)):
with torch.inference_mode():
actions = env.action_space.sample()
obs, rewards, terminated, truncated, info = env.step(actions)
if terminated.any() or truncated.any():
obs, info = env.reset()
env.close()
if __name__ == "__main__":
main()使用以下命令运行:
python test_env_load_arena.py \
--env.environment=g1_locomanip_pnp \
--env.embodiment=gr1_pink \
--env.object=cracker_box \
--env.num_envs=4 \
--env.enable_cameras=true \
--env.seed=1000 \
--env.video=true \
--env.video_length=10 \
--env.video_interval=15 \
--env.headless=false \
--env.hub_path=nvidia/isaaclab-arena-envs \
--env.type=isaaclab_arena首先按照 IsaacLab Arena 文档创建新的 IsaacLab Arena 环境。
克隆我们的 EnvHub 仓库:
git clone https://huggingface.co/nvidia/isaaclab-arena-envs根据你的新环境修改 example_envs.yaml 文件。
将修改后的仓库上传到 HuggingFace EnvHub。
评估期间,你的 IsaacLab Arena 环境代码必须在本地可用。用户可以单独克隆你的环境仓库,或者你可以将环境代码和资源直接打包到你的 EnvHub 仓库中。
然后,在评估时使用你的新环境:
lerobot-eval \
--env.hub_path=<your-env-hub-path>/isaaclab-arena-envs \
--env.environment=<your new environment> \
...other flags...我们期待你的贡献!
减小 batch_size 或使用显存更大的 GPU:
--eval.batch_size=1
在运行前设置环境变量:
export ACCEPT_EULA=Y
export PRIVACY_CONSENT=Y以无头模式运行时启用相机:
--env.video=true --env.enable_cameras=true --env.headless=true确保 action_dim 与你的 policy 匹配:
--env.action_dim=36
确保已安装以下依赖,这很可能发生在无头机器上。
sudo apt update && sudo apt install -y libglu1-mesa libxt6Lightwheel 正将包含 268 个任务的 Lightwheel-Libero-Tasks 和 Lightwheel-RoboCasa-Tasks 引入 LeRobot 生态系统。
LW-BenchHub 通过 teleoperation 收集并生成符合 LeRobot 规范的大规模 dataset,实现开箱即用的训练和评估工作流。
借助 EnvHub 提供的统一接口,开发者可以快速构建端到端实验流水线。
假设你已按照安装步骤操作,可以使用以下命令安装 LW-BenchHub:
conda install pinocchio -c conda-forge -y
pip install numpy==1.26.0 # revert numpy to version 1.26
sudo apt-get install git-lfs && git lfs install
git clone https://github.com/LightwheelAI/lw_benchhub
git lfs pull # Ensure LFS files (e.g., .usd assets) are downloaded
cd lw_benchhub
pip install -e .更详细的说明请参阅 LW-BenchHub 文档。
LW-BenchHub dataset 可在 HuggingFace Hub 上获取:
| dataset | 说明 | 任务 | 帧数 |
|---|---|---|---|
| Lightwheel-Tasks-X7S | X7S LIBERO 和 RoboCasa | 117 | ~10.3M |
| Lightwheel-Tasks-Double-Piper | Double-Piper LIBERO | 130 | ~6.0M |
| Lightwheel-Tasks-G1-Controller | G1-Controller LIBERO | 62 | ~2.7M |
| Lightwheel-Tasks-G1-WBC | G1-WBC RoboCasa | 32 | ~1.5M |
有关训练 policy 的内容,请参阅训练 policy部分。
以下训练好的 policy 可用:
| policy | 架构 | 任务 | 布局 | 机器人 | 链接 |
|---|---|---|---|---|---|
| smolvla-double-piper-pnp | SmolVLA | L90K1PutTheBlackBowlOnThePlate | libero-1-1 | DoublePiper-Abs | HuggingFace |
lerobot-eval \
--policy.path=LightwheelAI/smolvla-double-piper-pnp \
--env.type=isaaclab_arena \
--rename_map='{"observation.images.left_hand_camera_rgb": "observation.images.left_hand", "observation.images.right_hand_camera_rgb": "observation.images.right_hand", "observation.images.first_person_camera_rgb": "observation.images.first_person"}' \
--env.hub_path=LightwheelAI/lw_benchhub_env \
--env.kwargs='{"config_path": "configs/envhub/example.yml"}' \
--trust_remote_code=true \
--env.state_keys=joint_pos \
--env.action_dim=12 \
--env.camera_keys=left_hand_camera_rgb,right_hand_camera_rgb,first_person_camera_rgb \
--policy.device=cuda \
--eval.batch_size=10 \
--eval.n_episodes=100通过修改配置文件中的 robot、task 和 layout 设置,可以快速启动评估。
# =========================
# Basic Settings
# =========================
disable_fabric: false
device: cuda:0
sensitivity: 1.0
step_hz: 50
enable_cameras: true
execute_mode: eval
episode_length_s: 20.0 # Episode length in seconds, increase if episodes timeout during eval
# =========================
# Robot Settings
# =========================
robot: DoublePiper-Abs # Robot type, DoublePiper-Abs, X7S-Abs, G1-Controller or G1-Controller-DecoupledWBC
robot_scale: 1.0
# =========================
# Task & Scene Settings
# =========================
task: L90K1PutTheBlackBowlOnThePlate # Task name
scene_backend: robocasa
task_backend: robocasa
debug_assets: null
layout: libero-1-1 # Layout and style ID
sources:
- objaverse
- lightwheel
- aigen_objs
object_projects: []
usd_simplify: false
seed: 42
# =========================
# Object Placement Retry Settings
# =========================
max_scene_retry: 4
max_object_placement_retry: 3
resample_objects_placement_on_reset: true
resample_robot_placement_on_reset: true
# =========================
# Replay Configuration Settings
# =========================
replay_cfgs:
add_camera_to_observation: true
render_resolution: [640, 480]