Installation

PAINT is trained in Isaac Gym with legged_gym and rsl_rl. This page sets up the same software stack we used.

Requirements

  • Ubuntu 20.04 or 22.04 (we used 22.04)
  • An NVIDIA GPU. 4096 environments fit on an RTX 3080 Ti (12 GB); reduce --num_envs for smaller GPUs.
  • Conda, Python 3.8 (required by Isaac Gym Preview 4)

1. Python environment

conda create -n paint python=3.8 -y
conda activate paint
pip install torch==2.0.1 torchvision==0.15.2 --index-url https://download.pytorch.org/whl/cu118

2. Isaac Gym Preview 4

Download Isaac Gym Preview 4 from NVIDIA, then install its Python package:

tar -xzf IsaacGym_Preview_4_Package.tar.gz -C ~/paint_ws
cd ~/paint_ws/isaacgym/python
pip install -e .

# Isaac Gym uses np.float, which was removed in numpy 1.24
pip install "numpy<1.24"

# sanity check
cd examples && python 1080_balls_of_solitude.py

libpython3.8.so not found

If importing isaacgym fails with ImportError: libpython3.8.so.1.0: cannot open shared object file, put the conda environment's libraries on the loader path:

export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH

3. rsl_rl (v1.0.2)

legged_gym is written against rsl_rl v1.0.2. All algorithm changes in this guide (intent estimator, teacher, KL distillation) are made on top of that version.

cd ~/paint_ws
git clone https://github.com/leggedrobotics/rsl_rl.git
cd rsl_rl && git checkout v1.0.2 && pip install -e .

4. legged_gym

cd ~/paint_ws
git clone https://github.com/leggedrobotics/legged_gym.git
cd legged_gym && pip install -e .

Check that a standard task trains before adding PAINT:

python legged_gym/scripts/train.py --task=anymal_c_flat --headless --max_iterations=10

What you will add

  • legged_gym: a robot description with the payload, a low-level locomotion task, and a transport environment with a teacher task and a student task.
  • rsl_rl: an intent estimator, a PPO variant with the estimator and the KL term to the teacher, and a runner that builds the teacher, student and estimator.