This repository implements a hierarchical reinforcement learning framework for the Unitree Go2 quadruped. It provides custom environments for rough terrain locomotion and high-level navigation, designed to run as an extension within NVIDIA Isaac Lab.
This project requires a fully functioning installation of NVIDIA Isaac Lab. We will omit a step-by-step guide to installing Isaac Lab and Sim as NVIDIA themselves provides a simple installation guide for both Windows and Linux devices. We recommend a Linux installation as our project was written for/in Linux based systems.
- System Requirements: Firstly, please verify your hardware system meets the Isaac Sim Requirements
- Installation: Follow the official Issac Lab Instruction Guide w/ Pip
Verification: To confirm the installation is successful please run the NVIDIA-provided examples.
Once Isaac Lab is installed, you can now install this project as an extension.
Navigate to the source/extensions directory inside of your Isaac Lab installation folder. (If the extensions folder doesn't exist, create it)
# Example path; adjust to your actual install location
cd ~/path/to/issaclab/source/
mkdir -p extensions
cd extensions
# Clone this repository
git clone https://github.com/Elijahtab/CS-175-Project.git go2_navigationUse Python executable provided by Isaac Lab to install the package.
cd go2_navigation
# Install this package
../../isaaclab.sh -p -m pip install -e .Note: The -e flag allows you to edit the code and see changes immediately without reinstalling.
All commands should be run from the root of your Isaac Lab Installation.
To verify the installation and see the robot in action, run the command below. This serves as the project demo, loading our pre-trained model and generating a video of the agent navigating.
./isaaclab.sh -p source/standalone/workflows/rsl_rl/play.py \
--task=Isaac-Nav-Flat-Go2-Play-v0 \
--num_envs 1 \
--video --video_length 1000 \
--checkpoint source/extensions/go2_navigation/trained_models/flat_policy.ptNote: The --checkpoint flag points directly to the .pt file included in this repo. To continue to use this to get videos, please replace the .pt path.
Where is the video? The resulting video will be saved automatically to: logs/rsl_rl/Isaac-Nav-Flat-Go2-Play-v0/videos/
To train the policies yourself it'll be like this:
./isaaclab.sh -p source/standalone/workflows/rsl_rl/train.py \
--task=Isaac-Nav-Go2-Flat-v0 --headless./isaaclab.sh -p source/standalone/workflows/rsl_rl/train.py \
--task=Isaac-Nav-Go2-v0 --headless./isaaclab.sh -p source/standalone/workflows/rsl_rl/train.py \
--task=Isaac-Nav-Flat-Go2-v0 --headlessNote on Model Saving: This specfied training script saves logs and checkpoints to /isaaclab/logs/rsl_rl/{task_name}/{date} If you wish to update the pre-trained models in this repo you'll need to copy and paste the .pt file to the trained_model directory
navigation_env_cfg.py:High-level navigation environment configuration.rough_env_cfg.py:Low-level locomotion configuration for rough terrain.custom_rewards.py:Custom reward functions for gait and stability.custom_obs.py:Custom observations, including LiDAR and goal vectors.custom_events.py:Logic for spawning static obstacles and randomizing the domain.agents/:Configuration files for the PPO agents (RSL-RL).
- Import Errors: Ensure you ran the
pip install -e .command using./isaaclab.sh -pwrapper, not just the system Python - Simulator Crashes: Ensure you have the proper drivers as required by the latest Isaac Sim.