Skip to content

TokyoRobotics/torobo_genesis

Repository files navigation

torobo_genesis

This repository is forked from Genesis (Commit ID:98b29b4a4e56bdaa55ca1d8a359c5935eb24f26c) and includes additions for reinforcement learning with hand_v4 model and leg_v1 model.

Installation

  1. Setting up a Virtual Environment

    Python 3.9 or higher is required. Create a virtual environment using the following commands:

    conda create -n genesis python=3.9
    conda activate genesis
  2. Installing PyTorch

    Install PyTorch. Refer to the official website below and execute the command suitable for your environment.

    PyTorch Official Website

    (Example: For CUDA 12.2)

    pip install torch torchvision torchaudio
  3. Cloning and Installing torobo_genesis

    Clone this repository and install the required dependencies:

    git clone https://github.com/TokyoRobotics/torobo_genesis.git
    cd torobo_genesis
    pip install -e .
  4. Installing rsl_rl

    Install rsl_rl, which is required for reinforcement learning:

    git clone https://github.com/leggedrobotics/rsl_rl
    cd rsl_rl && git checkout v1.0.2 && pip install -e .

    (Optional) To install TensorBoard:

    pip install tensorboard

Examples

Command Examples

Run reinforcement learning for hand_v4 model:

python examples/manipulation/hand_v4_train.py -v --num_envs 1024

-v: Visualize the training process.
--num_envs: Specify the number of environments. The default is 4096.

Run inference using the trained model:

python examples/manipulation/hand_v4_eval.py --ckpt 1000

--ckpt: Specify the checkpoint of the trained model.


To monitor the training process, launch TensorBoard using the command below:
tensorboard --logdir logs

Task Examples

Reorientation Task by hand_v4 model:

python examples/manipulation/hand_v4_train.py -v

hand_v4 model Training

python examples/manipulation/hand_v4_eval.py

hand_v4 model Inference

Locomotion Task by leg_v1 model:

python examples/locomotion/leg_v1/leg_v1_train.py -v

leg_v1 model Training

python examples/locomotion/leg_v1/leg_v1_eval.py -v

leg_v1 model Inference

License and Acknowledgments

The torobo_genesis source code is licensed under Apache 2.0 and BSD 3-Clause License.

Genesis's development has been made possible thanks to these open-source projects:

About

Reinforcement learning examples based on Genesis

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •