Pair Lab Simulation
This repository contains the simulation tooling for the PAIR (Physical AI and Robotics) Lab
Table of Contents
- Prerequisites
- Setup
- Training a Policy
- Evaluating a Trained Policy
- Listing Available Tasks
- Troubleshooting
- Project Structure
Prerequisites
- Python 3.10 - Download
- CUDA-capable, RTX-based GPU - NVIDIA Requirements
Repo Setup
NOTE Follow these steps regardless of whether you are using Docker or not.
Install git and curl
sudo apt update
sudo apt install git curl
Setup a Personal Access Token on Github (if you don't already have one)
FOllow this guide, specifically creating a "classic" token.
Make sure to check at least repo in the checkboxes below Description field to ensure you will be able to clone the repo. (I checked all of them to avoid having to redo this step, but unsure of the security / permission implications).
Clone the repository:
# Use your chewy Github account as username, and the PAT from previous step as your password
git clone git@github.com:Chewy-Inc/pair-lab-sim.git
cd pair-lab-sim
Set Environment Variables to Access the Nucleus Server
Generate an API token from the Nucleus server (see instructions here).
It's recommended to add this to your shell profile (e.g. ~/.bashrc or ~/.zshrc), so you don't need to export the env var each terminal session.
Replace YOUR_API_TOKEN with the token you generated.
For ~/.bashrc users
echo 'export OMNI_USER="\$omni-api-token"' >> ~/.bashrc
echo 'export OMNI_PASS="YOUR_API_TOKEN"' >> ~/.bashrc
source ~/.bashrc
For ~/.zshrc users
echo 'export OMNI_USER="\$omni-api-token"' >> ~/.zshrc
echo 'export OMNI_PASS="YOUR_API_TOKEN"' >> ~/.zshrc
source ~/.zshrc
Install pipx and add it to path
sudo apt install pipx
pipx ensurepath
Setup pre-commit
pre-commit runs all of our code checking tooling automatically when you run a git commit, helping maintain a clean, consistent codebase.
First install pre-commit:
pipx install pre-commit
In order to activate it for this repo, you need to run (from within this repo's top-level):
pre-commit install
Docker Setup (recommended)
Install Docker and Docker compose
Follow this guide to install docker and docker-compose using apt.
NOTE Make sure you add your user to the docker group (instructions to do so are here - you only need to do up until the Configure Docker to start on boot with systemd section).
Install gitman and clone repos
pipx install gitman
gitman update
Install NVIDIA Container Toolkit
Follow instructions here to install NVIDIA Container toolkit via apt.
Make sure to follow the steps in Configuring Docker section here - configuring the runtime and restarting the docker daemon (sudo systemctl restart docker). Optionally set up Rootless mode in the next section here.
Start docker container
You now have all the prerequisites needed to start and enter the Docker container.
./docker/container.py start pair
Enter docker container
./docker/container.py enter pair
Now you're all set up and can start developing. Skip along to first steps section below.
[Optional] VSCode Support for IsaacLab Python Language Features (outside container):
NOTE: This step is only needed if you want the Python language server features (e.g. syntax highlighting, go to definition functionality and other ease-of-use tools found here) specifically for Isaac Lab code, outside of the docker container. This step happens automatically as part of the docker build process, so these features will work when attaching to the docker container via DevContainers without any manual user input.
- Use VSCode or Cursor's
Tasks: Run Tasks(Ctrl+Shift+P to open command palette) command and selectsetup_python_env_with_path. - Use VSCode or Cursor's
Developer: Reload Window, (Ctrl+Shift+P to open command palette) and you should see that your IDE's Go To Definition feature now works for Isaac Lab imports.
Manual Setup (not recommended)
NOTE The following manual installation is not recommended, as Docker installation above is easier / guaranteed to have all users on the same setup
[Optional] Create virtual environment
NOTE If you already have a venv for setting up Isaac Sim / Lab, source that here and skip ahead to clone section below.
# Create and activate a virtual environment (recommended)
python -m venv pair_lab_venv
source pair_lab_venv/bin/activate
Setup Isaac Sim and Isaac Lab
Follow the official installation guides, preferring pip-based installation over installing from source:
- Isaac Sim: Installation Documentation
- Isaac Lab: Setup Instructions
Clone the SO100 repo to get URDFs and meshes of SO-101
git clone https://github.com/TheRobotStudio/SO-ARM100
export SO_REPO_PATH="$(realpath SO-ARM100)"
It's recommended to add this to your shell profile (e.g. ~/.bashrc or ~/.zshrc), so you don't need to export the env var each terminal session.
For ~/.bashrc users
echo "export SO_REPO_PATH=\"$(realpath SO-ARM100)\"" >> ~/.bashrc
source ~/.bashrc
For ~/.zshrc users
echo "export SO_REPO_PATH=\"$(realpath SO-ARM100)\"" >> ~/.zshrc
source ~/.zshrc
Install the pair_lab python package
From within your virtual env, use pip to install pair_lab:
cd pair_lab/source/pair_lab
pip install -e .
To verify installation, pip list | grep pair_lab should print pair_lab followed by the current version of the package, and its installation directory:
(env_isaaclab) $ pip list | grep pair_lab
pair_lab 0.1.0 /home/ubuntu/pair/repos/pair-lab-sim/pair_lab/source/pair_lab
Training a Policy
Now that everything is properly setup, we can start training an RL policy!
To run training for the box-push with SO-101, from the top-level directory, from inside the pair_lab docker container, run:
python scripts/rsl_rl/train.py --task Pair-Push-Cube-SO101-v0 --num_envs 4096
NOTE: I recommend starting with --num_envs 1 to quickly check that things are running (as increasing num_envs increases start-up and iteration time.)
Training Parameters
--task Pair-Push-Cube-SO101-v0: Specifies the training task/environment--num_envs [NUM_ENVS]: Number of parallel environments (adjust based on your hardware)
Additional Options
You can customize training with additional parameters:
--headless: Run training headlessly (no GUI). This is most likely what you want when you run a longer training job, as it reduces the overhead of rendering the GUI, speeding up cycle time.--max_iterations: Maximum training iterations--checkpoint_interval: How often to save checkpoints--log_dir: Directory to save logs and checkpoints
Use --help to get info on the other CLI args.
Monitoring Training
Training metrics are automatically logged via the --logger arg:
- Weights & Biases (WandB) -
--logger wandbFor experiment tracking and visualization - TensorBoard - For real-time monitoring
- **[Neptune]
Evaluating a Trained Policy
To run a "play" (inference/demo) session for the box-push with SO-101:
From the top-level directory, run:
python scripts/rsl_rl/play.py --task Pair-Push-Cube-SO101-v0 --num_envs 1 --checkpoint logs/rsl_rl/so101_push_cube/[DATE_OF_TRAINING_RUN]/[SELECTED_CHECKPOINT]
NOTE: Fill in [DATE_OF_TRAINING_RUN] and [SELECTED_CHECKPOINT] as follows:
python scripts/rsl_rl/play.py --task Pair-Push-Cube-SO101-v0 --num_envs 1 --checkpoint logs/rsl_rl/so101_push_cube/2025-07-16_21-29-32/model_9999.pt
In the above example, the 9999th checkpoint is the final one in a 10,000 iteration training run. You can select the checkpoint with the optimal performance via WandB, Tensorboard or MLFlow.
Listing Available Tasks
To quickly see all tasks/environments that have been registered by the PAIR Lab extension (those beginning with Pair-), run the helper script from the repository root:
python scripts/list_envs.py
The script launches Isaac Sim headlessly, queries the Gymnasium registry, and prints a pretty‑table that shows:
| S. No. | Task Name | Entry Point | Config |
|---|---|---|---|
| … | Pair‑Push‑Cube‑SO101‑v0 | pair_lab.tasks… | pair_lab.tasks…/config.yaml |
This is handy for discovering new tasks or double‑checking the exact string to pass to --task in training or evaluation commands.
Troubleshooting
Common Issues
CUDA out of memory Reduce the
--num_envsparameter.SO_REPO_PATH not found Ensure the environment variable is properly set and the SO-ARM100 repository is cloned.
Import errors Verify that
pair_labis properly installed:pip list | grep pair_labIsaac Sim crashes Check the Isaac Sim System Requirements.
Slow training Enable
--headlessmode and ensure your GPU is being utilized.NVMLError or Error response from daemon: could not select device driver "nvidia" with capabilities: [[gpu]] Ensure Docker's
no-cgroupssetting is set tofalseand make sure you have NVIDIA container toolkit is installed, and you've either rebooted or runsudo systemctl reload dockerafter installation. See troubleshooting steps here.
Getting Help
- Isaac Sim Documentation: Official Docs
- Isaac Lab Documentation: Official Docs
- NVIDIA Omniverse Forums: Community Support
Project Structure
pair-lab-sim/
├── docker/ # Dockerfiles and container setup script
├── IsaacLab/ # Isaac Lab (cloned by gitman into this directory)
├── pair_lab/ # Main package source
│ └── source/pair_lab/ # Core simulation components
├── scripts/ # Training and evaluation scripts
│ └── rsl_rl/ # RSL-RL specific scripts
├── gitman.yml # Repository and submodule management configuration
└── README.md # This file