RoboCasa GR-1 Tabletop Tasks

repository·main·Indexed 41 days ago

https://github.com/robocasa/robocasa-gr1-tabletop-tasks

Simulation environments for GR-1 Tabletop Tasks designed for NVIDIA's GR00T N1 humanoid foundation models. Extends the RoboCasa framework to support the GR00T-N1.5-3B model for evaluating generalist robotic policies in household tasks. Includes tools for task demonstration, playback of GR00T Teleop Simulation Dataset trajectories, simulation-based evaluation, and model fine-tuning via Isaac-GR00T.

Tokens
2.2K
Snippets
5
Records
9
Agent score
51%

What's inside RoboCasa GR-1 Tabletop Tasks

  1. Perform simulation-based evaluation for GR00T-N1.5-3B

    main

    Evaluation is performed by running an inference server in the Isaac-GR00T repository and then running a simulation service client.

    1. Start the Inference Server

    Inside the Isaac-GR00T directory, run:

    cd Isaac-GR00T
    python3 scripts/inference_service.py --server \
        --model_path <MODEL_PATH> \
        --data_config fourier_gr1_arms_waist

    2. Run the Simulation Evaluation

    In a separate terminal, inside the Isaac-GR00T directory, run:

    cd Isaac-GR00T
    python3 scripts/simulation_service.py --client \
        --env_name <TASK_NAME> \
        --video_dir ./videos \
        --max_episode_steps 720 \
        --n_envs 5 \
        --n_episodes 10

    This will run the model for the specified number of episodes, collect success metrics, and save rollout videos to the --video_dir.

    Available Task Names

    Tasks follow the pattern gr1_unified/<TASK_NAME>_Env. Examples include:

    • gr1_unified/PnPCupToDrawerClose_GR1ArmsAndWaistFourierHands_Env
    • gr1_unified/PosttrainPnPNovelFromCuttingboardToBasketSplitA_GR1ArmsAndWaistFourierHands_Env
    • gr1_unified/PosttrainPnPNovelFromPlateToPlateSplitA_GR1ArmsAndWaistFourierHands_Env
    python3 scripts/simulation_service.py --client --env_name <TASK_NAME> --video_dir ./videos --max_episode_steps 720 --n_envs 5 --n_episodes 10
  2. Update Robot Registry and Class Functions

    main

    After defining the MJCF and controller, you must register the robot in robocasa/models/robots/manipulators/ by creating or updating the robot class. You must implement/update the following functions to match the new robot's specifications:

    • update_joints():
      • Add joint names in the correct order.
      • Adhere to the right-before-left convention (right arm joints must precede left arm joints).
    • update_actuators():
      • Add actuator names.
      • Ensure the actuator order matches the joint configuration defined in update_joints().
  3. Install RoboCasa GR-1 Tabletop Tasks

    main

    To use this repository, you must set up a Conda environment and install three core dependencies: Isaac-GR00T, robosuite, and robocasa-gr1-tabletop-tasks. Finally, you must download the required simulation assets.

    Follow these steps in order:

    1. Set up Conda environment

      conda create -c conda-forge -n robocasa python=3.10
      conda activate robocasa
    2. Install Isaac-GR00T

      git clone https://github.com/NVIDIA/Isaac-GR00T.git
      cd Isaac-GR00T
      pip install --upgrade setuptools
      pip install -e .[base]
      pip install --no-build-isolation flash-attn==2.7.1.post4 
      cd ..
    3. Install robosuite

      git clone https://github.com/ARISE-Initiative/robosuite.git
      pip install -e robosuite
    4. Install robocasa-gr1-tabletop-tasks

      git clone https://github.com/robocasa/robocasa-gr1-tabletop-tasks.git
      pip install -e robocasa-gr1-tabletop-tasks
    5. Download assets

      cd robocasa-gr1-tabletop-tasks
      python robocasa/scripts/download_tabletop_assets.py -y
    # 1. Set up conda environment
    conda create -c conda-forge -n robocasa python=3.10
    conda activate robocasa
    
    # 2. Clone and install Isaac-GR00T
    git clone https://github.com/NVIDIA/Isaac-GR00T.git
    cd Isaac-GR00T
    pip install --upgrade setuptools
    pip install -e .[base]
    pip install --no-build-isolation flash-attn==2.7.1.post4 
    cd ..
    
    # 3. Clone and install robosuite
    git clone https://github.com/ARISE-Initiative/robosuite.git
    pip install -e robosuite
    
    # 4. Clone and install robocasa-gr1-tabletop-tasks
    git clone https://github.com/robocasa/robocasa-gr1-tabletop-tasks.git
    pip install -e robocasa-gr1-tabletop-tasks
    
    # 5. Download assets
    cd robocasa-gr1-tabletop-tasks
    python robocasa/scripts/download_tabletop_assets.py -y
  4. MJCF Requirements for Robot Integration

    main

    When adding a new robot to Robocasa, the MJCF file must be placed in robocasa/models/assets/robots/ and adhere to specific structural rules to ensure compatibility with the framework's kinematic and end-effector logic:

    • Root Element: The MJCF must have a single root element containing all other elements (e.g., <worldbody>, <asset>).
    • Kinematic Tree: The tree must start from a <body name="base"> element. This body must contain a freejoint and be placed directly under <worldbody>.
    • Joint Ordering: Joint definitions for the right arm must appear in the XML structure before the joint definitions for the left arm.
    • End Effectors: Gripper attachments are only supported if they are attached to a body named <body name="right_eef">.
    • Fixed-Base Mode: If operating in fixed-base mode, the body connected to the base joint will be anchored to the world frame. Select a mounting point (typically the pelvis or torso) that ensures correct fixed-base behavior.
  5. Configure Controllers for New Robots

    main

    New robot controllers should be implemented in robocasa/examples/third_party_controllers/. To ensure the controller works with the Robocasa framework, follow these requirements:

    1. Whole-Body Control: Implement whole-body control configuration (note: leg components are currently excluded).
    2. Posture Tuning: Configure and tune the ik_posture_weight parameter.
    3. Parameter Prefixing: You must add the robot0_ prefix to all parameters within the configuration.
  6. Playback demonstration trajectories

    main

    To replay teleoperated demonstrations from the GR00T Teleop Simulation Dataset, use the playback_dataset.py script. This replays trajectories in simulation, syncing robot actions and camera observations.

    cd robocasa-gr1-tabletop-tasks
    python3 robocasa/scripts/playback_dataset.py --dataset <HDF5_FILE> --n 1

    Arguments:

    • --dataset <HDF5_FILE>: Path to the HDF5 file containing the demonstrations.
    • --n <int>: Number of demonstrations to play back.
    python3 robocasa/scripts/playback_dataset.py --dataset <HDF5_FILE> --n 1
  7. Fine-tune GR00T models with Isaac-GR00T

    main

    You can fine-tune the GR00T-N1.5-3B model using the gr00t_finetune.py script. This is typically done on high-performance hardware (e.g., H100 Node with 8 GPUs).

    #!/bin/bash
    ALL_DATASET_PATHS=(
      "YOUR_DATASET_PATH_1"
      "YOUR_DATASET_PATH_2"
    )
    
    python scripts/gr00t_finetune.py \
      --dataset-path "${ALL_DATASET_PATHS[@]}" \
      --num-gpus 8 --batch-size 60 --learning_rate 3e-5 \
      --output-dir OUTPUT_DIR \
      --data-config fourier_gr1_arms_waist --embodiment_tag gr1 \
      --tune-visual \
      --max-steps 30000 --save-steps 5000

    Arguments:

    • --dataset-path: Space-separated list of paths to datasets.
    • --num-gpus: Number of GPUs to use.
    • --batch-size: Training batch size.
    • --learning_rate: Learning rate.
    • --output-dir: Directory to save training results.
    • --data-config: Configuration key for the data format (e.g., fourier_gr1_arms_waist).
    • --embodiment_tag: Tag identifying the robot embodiment (e.g., gr1).
    • --tune-visual: (Optional) Flag to tune the visual encoder.
    • --max-steps: Total training steps.
    • --save-steps: Frequency of checkpoint saving.
    python scripts/gr00t_finetune.py \
      --dataset-path "${ALL_DATASET_PATHS[@]}" \
      --num-gpus 8 --batch-size 60 --learning_rate 3e-5 \
      --output-dir OUTPUT_DIR \
      --data-config fourier_gr1_arms_waist --embodiment_tag gr1 \
      --tune-visual \
      --max-steps 30000 --save-steps 5000
  8. Demo a task with random actions

    main

    You can visually inspect a task by running a demo script that sends random actions to the robot and renders an egocentric video.

    cd robocasa-gr1-tabletop-tasks
    python3 robocasa/scripts/demo_task.py <TASK_NAME>

    Replace <TASK_NAME> with one of the 24 available task names (e.g., gr1_unified/PnPCupToDrawerClose_GR1ArmsAndWaistFourierHands_Env).

    python3 robocasa/scripts/demo_task.py <TASK_NAME>
  9. Asset Attributions and Licensing for RoboCasa

    main

    The assets used in this repository are sourced from various contributors under Creative Commons licenses. When using these assets, you must ensure you credit the original authors as required by their specific license (e.g., Creative Commons Attribution or Creative Commons Attribution-NonCommercial).

    Asset collections include:

    • stapler
    • dish rack
    • spray bottle
    • basket
    • book
    • glasses
    • mug holder
    • clock
    • rubix
    • coffee pod
    • bookshelf
    • placemat
    • shelf
    • pen holder