hankpan99 / NYCU_AIC_Final_Project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Learning Various Movements for Four Legs Robot

Introduction

We use RL to train ANYmal to achieve two tasks, "walk stably" and "navigation" in Raisim.

rsg_anymal

This is the environment for the task "walk stably", we simply want the robot to walk stably with minimum torque.

navigation_ori_anymal

This is the environment for the task "navigation", we want our robot to navigate to a certain position. The reward is based on distance error between current position and the target position.

navigation_dst_anymal

Different from navigation_ori_anymal only in reward, which is based on distance error between current position and the target position.

Installation

Please first check out the installation guide on RaiSim website to install Raisim.

Environment

Clone this repo and place these three folders in PATH_TO_raisimLib/raisimGymTorch/raisimGymTorch/env/envs.

Trained Model

cd PATH_TO_raisimLib/raisimGymTorch
mkdir data
cd data

The trained model can be found in this link, please download the folder and place it in the directory data.

Usage

In the following please run commands in the directory PATH_TO_raisimLib/raisimGymTorch.

Run

  1. Compile raisimgym: python setup.py develop
  2. Run runner.py of the task (for rsg_anymal example): python raisimGymTorch/env/envs/rsg_anymal/runner.py

Test policy

  1. Compile raisimgym: python setup.py develop
  2. Run tester.py of the task with policy (for rsg_anymal example): python raisimGymTorch/env/envs/rsg_anymal/tester.py --weight data/rsg_anymal/FOLDER_NAME/full_XXX.pt

Retrain policy

  1. Compile raisimgym: python setup.py develop
  2. Run runner.py of the task with policy (for rsg_anymal example): python raisimGymTorch/env/envs/rsg_anymal/runner.py --mode retrain --weight data/rsg_anymal/FOLDER_NAME/full_XXX.pt

Please check out this link for more details about RaisimGymTorch.

About


Languages

Language:Python 61.1%Language:C++ 38.9%