Open main menu

Humanoid Robots Wiki β

K-Scale Sim Library

A library for simulating Stompy in Isaac Gym. This library is built on top of the Isaac Gym library and Humanoid-gym and provides a simple interface for running experiments with Stompy. For a start, we have defined two tasks: getting up and walking.

The library is available at https://github.com/kscalelabs/sim


We will be adding more tasks and simulator environments in upcoming weeks.

The walking task works reliably with the upper body being fixed. The getting up task is still an open challenge!

Getting StartedEdit

This repository requires Python 3.8 due to compatibility issues with underlying libraries. We hope to support more recent Python versions in the future.


Clone this repository:

git clone https://github.com/kscalelabs/sim.git
cd sim

Create a new conda environment and install the package:

conda create --name kscale-sim-library python=3.8.19
conda activate kscale-sim-library
make install-dev

Install third-party dependencies: Manually download IsaacGym_Preview_4_Package.tar.gz from [1], and run:

tar -xvf IsaacGym_Preview_4_Package.tar.gz
conda env config vars set ISAACGYM_PATH=`pwd`/isaacgym
conda deactivate
conda activate kscale-sim-library
make install-third-party-external

Running Stompy experimentsEdit

Download our URDF model from here:

wget https://media.kscale.dev/stompy/latest_stl_urdf.tar.gz && tar -xzvf latest_stl_urdf.tar.gz
python sim/scripts/create_fixed_torso.py
export MODEL_DIR=stompy

Run training with the following command:

python sim/humanoid_gym/train.py --task=legs_ppo --num_envs=4096 --headless

or for full body:

python sim/humanoid_gym/train.py --task=stompy_ppo --num_envs=4096 --headless

Run evaluation with the following command:

python sim/humanoid_gym/play.py --task legs_ppo --sim_device cpu

See this doc for more beginner tips.


Handling ErrorsEdit

After cloning Isaac Gym, sometimes the bindings mysteriously disappear. To fix this, update the submodule:

git submodule update --init --recursive

If you observe errors with libpython3.8.so.1.0, you can try the following:

export LD_LIBRARY_PATH=PATH_TO_YOUR_ENV/lib:$LD_LIBRARY_PATH

If you still see segmentation faults, you can try the following:

sudo apt-get install vulkan1

Also, see Humanoid Gym and K-Scale Humanoid Gym