LeRobot documentation

NVIDIA IsaacLab Arena & LeRobot

You are viewing main version, which requires installation from source. If you'd like regular pip install, checkout the latest stable version (v0.6.1).
Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

NVIDIA IsaacLab Arena & LeRobot

LeRobot EnvHub kini mendukung simulasi dengan akselerasi GPU melalui IsaacLab Arena untuk evaluasi kebijakan berskala besar. Latih dan evaluasi kebijakan pembelajaran imitasi dengan simulasi berkeandalan tinggi — semuanya terintegrasi ke dalam ekosistem LeRobot.

IsaacLab Arena - GR1 Microwave Environment

IsaacLab Arena terintegrasi dengan NVIDIA IsaacLab untuk menyediakan:

  • 🤖 Embodiment humanoid: GR1, G1, Galileo dengan berbagai konfigurasi
  • 🎯 Tugas manipulasi & lokomanipulasi: Membuka pintu, pick-and-place, menekan tombol, dan lainnya
  • ⚡ Rollout dengan akselerasi GPU: Eksekusi lingkungan paralel pada GPU NVIDIA
  • 🖼️ RTX Rendering: Evaluasi kebijakan berbasis visi dengan rendering, refleksi, dan refraksi yang realistis
  • 📦 Dataset yang kompatibel dengan LeRobot: Siap untuk pelatihan dengan GR00T N1x, PI0, SmolVLA, ACT, dan kebijakan Diffusion
  • 🔄 Integrasi EnvHub: Muat lingkungan dari HuggingFace EnvHub dengan satu baris

Instalasi

Prasyarat

Kebutuhan perangkat keras sama dengan Isaac Sim, dan dirinci dalam Isaac Sim Requirements.

  • NVIDIA GPU dengan dukungan CUDA
  • Driver NVIDIA yang kompatibel dengan IsaacSim 5.1.0
  • Linux (Ubuntu 22.04 / 24.04)

Setup

# 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]"


# 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

Mengevaluasi Kebijakan

Kebijakan Pra-Latih

Kebijakan terlatih berikut tersedia:

KebijakanArsitekturTugasTautan
pi05-arena-gr1-microwavePI0.5GR1 MicrowaveHuggingFace
smolvla-arena-gr1-microwaveSmolVLAGR1 MicrowaveHuggingFace

Evaluasi SmolVLA

pip install -e ".[smolvla]"
pip install numpy==1.26.0 # revert numpy to version 1.26
lerobot-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=1

Evaluasi PI0.5

pip install -e ".[pi]"
pip install numpy==1.26.0 # revert numpy to version 1.26
PI0.5 requires disabling torch compile for evaluation:
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
To change the number of parallel environments, use the ```--eval.batch_size``` flag.

Yang Akan Anda Dapatkan

Selama evaluasi, Anda akan melihat bilah kemajuan yang menampilkan tingkat keberhasilan berjalan:

Stepping through eval batches:   8%|██████▍    | 4/50 [00:45<08:06, 10.58s/it, running_success_rate=25.0%]

Perekaman Video

Untuk mengaktifkan perekaman video selama evaluasi, tambahkan flag berikut ke perintah Anda:

--env.video=true \
--env.video_length=15 \
--env.video_interval=15

Untuk detail lebih lanjut tentang perekaman video, lihat Dokumentasi Perekaman IsaacLab.

When running headless with `--env.headless=true`, you must also enable cameras explicitly for camera enabled environments:
--env.headless=true --env.enable_cameras=true

Direktori Output

Video evaluasi disimpan ke direktori keluaran dengan struktur berikut:

outputs/eval/<date>/<timestamp>_<env>_<policy>/videos/<task>_<env_id>/eval_episode_<n>.mp4

Sebagai contoh:

outputs/eval/2026-01-02/14-38-01_isaaclab_arena_smolvla/videos/gr1_microwave_0/eval_episode_0.mp4

Kebijakan Pelatihan

Untuk mempelajari lebih lanjut tentang pelatihan kebijakan dengan LeRobot, silakan merujuk ke dokumentasi pelatihan:

Dataset sampel IsaacLab Arena tersedia di HuggingFace Hub untuk eksperimen:

DatasetDeskripsiFrames
Arena-GR1-Manipulation-TaskManipulasi microwave GR1~4K
Arena-G1-Loco-Manipulation-TaskG1 loco-manipulasi~4K

Konfigurasi Lingkungan

Opsi Konfigurasi Lengkap

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
)

Menggunakan Environment Hub secara langsung untuk penggunaan lanjutan

Buat file bernama test_env_load_arena.py atau unduh dari 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()

Jalankan dengan:

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

Membuat Lingkungan Baru

Pertama, buat lingkungan IsaacLab Arena baru dengan mengikuti Dokumentasi IsaacLab Arena.

Clone repo EnvHub kami:

git clone https://huggingface.co/nvidia/isaaclab-arena-envs

Modifikasi file example_envs.yaml berdasarkan lingkungan baru Anda. Unggah repo yang telah Anda modifikasi ke HuggingFace EnvHub.

Your IsaacLab Arena environment code must be locally available during evaluation. Users can clone your environment repository separately, or you can bundle the environment code and assets directly in your EnvHub repo.

Lalu, saat mengevaluasi, gunakan lingkungan baru Anda:

lerobot-eval \
    --env.hub_path=<your-env-hub-path>/isaaclab-arena-envs \
    --env.environment=<your new environment> \
    ...other flags...

Kami menantikan kontribusi Anda!

Pemecahan Masalah

CUDA kehabisan memori

Kurangi batch_size atau gunakan GPU dengan VRAM lebih besar:

--eval.batch_size=1

EULA tidak diterima

Setel variabel lingkungan sebelum menjalankan:

export ACCEPT_EULA=Y
export PRIVACY_CONSENT=Y

Perekaman video tidak berfungsi

Aktifkan kamera saat berjalan tanpa antarmuka:

--env.video=true --env.enable_cameras=true --env.headless=true

Ketidakcocokan dimensi output kebijakan

Pastikan action_dim sesuai dengan kebijakan Anda:

--env.action_dim=36

Error libGLU.so.1 saat inisialisasi Isaac Sim

Pastikan Anda telah menginstal dependensi berikut, hal ini kemungkinan terjadi pada mesin headless.

sudo apt update && sudo apt install -y libglu1-mesa libxt6

Lihat Juga

Lightwheel LW-BenchHub

Lightwheel menghadirkan Lightwheel-Libero-Tasks dan Lightwheel-RoboCasa-Tasks dengan 268 tugas ke ekosistem LeRobot. LW-BenchHub mengumpulkan dan menghasilkan dataset berskala besar melalui teleoperation yang mematuhi spesifikasi LeRobot, sehingga memungkinkan alur kerja pelatihan dan evaluasi yang siap pakai. Dengan antarmuka terpadu yang disediakan EnvHub, pengembang dapat dengan cepat membangun pipeline eksperimen end-to-end.

Instal

Dengan asumsi Anda telah mengikuti langkah Instalasi, Anda dapat menginstal LW-BenchHub dengan:

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
cd lw_benchhub
git lfs pull # Ensure LFS files (e.g., .usd assets) are downloaded

pip install -e .

Untuk instruksi yang lebih detail, silakan merujuk ke Dokumentasi LW-BenchHub.

Dataset Tugas Lightwheel

Dataset LW-BenchHub tersedia di HuggingFace Hub:

DatasetDeskripsiTugasFrames
Lightwheel-Tasks-X7SX7S LIBERO dan RoboCasa117~10.3M
Lightwheel-Tasks-Double-PiperDouble-Piper LIBERO130~6.0M
Lightwheel-Tasks-G1-ControllerG1-Controller LIBERO62~2.7M
Lightwheel-Tasks-G1-WBCG1-WBC RoboCasa32~1.5M

Untuk kebijakan pelatihan, lihat bagian Kebijakan Pelatihan.

Mengevaluasi Kebijakan

Kebijakan Pra-Latih

Kebijakan terlatih berikut tersedia:

KebijakanArsitekturTugasTata letakRobotTautan
smolvla-double-piper-pnpSmolVLAL90K1PutTheBlackBowlOnThePlatelibero-1-1DoublePiper-AbsHuggingFace

Evaluasi SmolVLA

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

Konfigurasi Lingkungan

Evaluasi dapat diluncurkan dengan cepat dengan memodifikasi pengaturan robot, task, dan layout dalam file konfigurasi.

Opsi Konfigurasi Lengkap

# =========================
# 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]

Lihat Juga

Update on GitHub