This repository is forked from Genesis (Commit ID:98b29b4a4e56bdaa55ca1d8a359c5935eb24f26c) and includes additions for reinforcement learning with hand_v4 model and leg_v1 model.
-
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
-
Installing PyTorch
Install PyTorch. Refer to the official website below and execute the command suitable for your environment.
(Example: For CUDA 12.2)
pip install torch torchvision torchaudio
-
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 .
-
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
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
Reorientation Task by hand_v4 model:
python examples/manipulation/hand_v4_train.py -v
python examples/manipulation/hand_v4_eval.py
Locomotion Task by leg_v1 model:
python examples/locomotion/leg_v1/leg_v1_train.py -v
python examples/locomotion/leg_v1/leg_v1_eval.py -v
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:
- Taichi: High-performance cross-platform compute backend. Kudos to the Taichi team for their technical support!
- FluidLab: Reference MPM solver implementation.
- SPH_Taichi: Reference SPH solver implementation.
- Ten Minute Physics and PBF3D: Reference PBD solver implementations.
- MuJoCo: Reference for rigid body dynamics.
- libccd: Reference for collision detection.
- PyRender: Rasterization-based renderer.
- LuisaCompute and LuisaRender: Ray-tracing DSL.