Isaac Sim Automator

From Humanoid Robots Wiki
Revision as of 20:51, 9 May 2024 by Vrtnis (talk | contribs) (Isaac Sim Automator)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Isaac Sim Automator

The Isaac Sim Automator is essentially your go-to tool for setting up and managing Isaac Sim on various cloud platforms, and it does all this with the help of Docker. Docker packages up an application with all its dependencies into a container that can run anywhere. This means you don't have to worry about your simulation behaving differently from one environment to another — whether it's on your laptop or in the cloud.

Using the Automator is super straightforward. It comes with a set of command-line tools that make deploying to clouds like AWS, Google Cloud, Azure, and Alibaba Cloud. Here’s how you can deploy Isaac Sim to, say, AWS:

./deploy-aws

Or if you're more into Google Cloud, you'd use:

./deploy-gcp

These commands kick off the entire process to get Isaac Sim up and running on your preferred cloud service. They manage details like setting up resources and configuring instances.

In a nutshell, the Isaac Sim Automator is fantastic if you’re diving into the K-Scale Sim Library. It simplifies cloud setup, letting you focus on creating and running your simulations. Whether you're a researcher, a developer, or a beginner to robotics, this tool can save you a ton of time and effort.


Installation

Installing Docker

Ensure Docker is installed on your system for container management. For installation guidance, see Docker Installation.

Obtaining NGC API Key

Obtain an NGC API Key to download Docker images from NVIDIA NGC. This can be done at NGC API Key Setup.

Building the Container

To build the Automator container, use the following command in your project root directory:

./build

This builds and tags the Isaac Sim Automator container as 'isa'.

Usage

Running Automator Commands

You can run the Automator commands in two ways:

  • Enter the automator container and run commands inside:
./run
./somecommand
  • Or, prepend the command with ./run:
./run ./somecommand <parameters>

Examples include:

./run ./deploy-aws
./run ./destroy my-deployment

Deploying Isaac Sim

Choose the appropriate cloud provider (AWS, GCP, Azure, Alibaba Cloud) and follow the provided steps to deploy Isaac Sim using the automator container.

K-Scale Sim Library

The K-Scale Sim Library is built atop Isaac Gym for simulating Stompy, providing interfaces for defined tasks like walking and getting up.

Getting Started with K-Scale Sim Library

Initial Setup

First, clone the K-Scale Sim Library repository and set up the environment:

git clone https://github.com/kscalelabs/sim.git
cd sim
conda create --name kscale-sim-library python=3.8.19
conda activate kscale-sim-library
make install-dev

Installing Dependencies

After setting up the base environment, download and install necessary third-party packages:

wget https://developer.nvidia.com/isaac-gym/IsaacGym_Preview_4_Package.tar.gz
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 Experiments

Setting Up Experiments

Download and prepare the Stompy model for experiments:

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

Training and Evaluation

  • For leg-specific tasks:
python sim/humanoid_gym/train.py --task=legs_ppo --num_envs=4096 --headless
  • For full-body tasks:
python sim/humanoid_gym/train.py --task=stompy_ppo --num_envs=4096 --headless

Evaluate the models on CPU:

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

Troubleshooting

Common issues and solutions for setting up and running Isaac Gym and K-Scale simulations.

git submodule update --init --recursive
export LD_LIBRARY_PATH=PATH_TO_YOUR_ENV/lib:$LD_LIBRARY_PATH
sudo apt-get install vulkan1