Ayg Isaac Lab is a fork of Isaac Lab that is tailored for training the Ayg robot.
A guide on how to use Isaac Lab for RL is available in guide.md.
The "full" installation steps provided by NVIDIA are available here. Alternatively, follow the steps below.
Install Docker Community Edition (ex Docker Engine).
You can follow the installation method through apt.
Note that it makes you verify the installation by running sudo docker run hello-world.
It is better to avoid running this command with sudo and instead follow the post installation steps first and then run the command without sudo.
Follow with the post-installation steps for Linux.
Install NVIDIA Container Toolkit (nvidia-docker2).
Join the NVIDIA Developer Program.
Install NGC CLI following the steps detailed here.
Generate an NGC API key. Remember to save the API key as it will not be shown again.
Log in to NGC with
ngc config setLog in to the NVIDIA Container Registry with
docker login nvcr.ioFor the username, enter $oauthtoken exactly as shown. It is a special username that is used to authenticate with NGC.
For the password, enter the NGC API key you generated.
Username: $oauthtoken
Password: <Your NGC API Key>
Build the image and bring up the container in detached mode with
./docker/container.py startThe image will be rebuilt every time the files are changed.
Begin a new bash process in an existing Isaac Lab container with
./docker/container.py enter baseBring down the container and remove it with
./docker/container.py stopOptional arguments are enclosed within square brackets, i.e. [].
For single option arguments, the default value is shown after the equal sign.
For multiple option, the available options are listed within curly brackets, i.e. {}.
Train the robot with:
- base training environment:
./isaaclab.sh -p scripts/reinforcement_learning/rsl_rl/train.py --task Isaac-Velocity-Flat-Ayg-v0 --headless [--max_iterations=300] - Walk-These-Ways-inspired training environment:
./isaaclab.sh -p scripts/reinforcement_learning/rsl_rl/train.py --task Isaac-WTW-Flat-Ayg-v0 --headless [--max_iterations=300]
Visualize the training performance with
./isaaclab.sh -p -m tensorboard.main --logdir logs/rsl_rl/ayg_flat/path_to_logTest the trained robot with
./isaaclab.sh -p scripts/reinforcement_learning/rsl_rl/play.py --task Isaac-Velocity-Flat-Ayg-{v0, v2} --num_envs 32 --checkpoint /path/to/checkpointTest and teleoperate the trained robot with
python3 scripts/demos/ayg_locomotion.pyThis will open a window where you can control a robot by clicking on it.
The robot can be given a reference velocity using the arrows keys.
To change visual press the c key.
To exit the teleoperation press esc.
Known bugs:
- The displayed reference velocities are wrong.
- No GPU available in Docker: running
nvidia-smiin the Docker container returnsFailed to initialize NVML: Unknown Error.
Solution:- Run
sudo nano /etc/nvidia-container-runtime/config.toml, setno-cgroups = false, and save (Ctrl + X and then Y). - Restart Docker with
sudo systemctl restart docker.
- Run