Reinforcement learning of wheel-legged robots based on Genesis
System Requirements
Ubuntu 20.04/22.04/24.04
python >= 3.10
開始配置環境!
點擊releases后進入,下載對應最新版本的代碼:
將下載后的代碼包解壓到你的自定義路徑下,開始配置相關的項目環境:
conda create -n wlg python=3.10
conda activate wlg
# 這里我的CUDA版本裝的是12.1,所以安裝對應的pytorch版本
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
現在需要下載Genesis:
GitHub - Genesis-Embodied-AI/Genesis: A generative world for general-purpose robotics & embodied AI learning.
cd wheel_legged_genesis-0.0.7
pip install genesis-world? ?# Requires Python >=3.9;
git clone https://github.com/Genesis-Embodied-AI/Genesis.git
cd Genesispip install -e .
cd ..
再install tensorboard:
pip install tensorboard
pip install pygame
pip install opencv-python
最后install rsl-rl:
cd rsl_rl && pip install -e .
好了,下面開始測試并運行代碼:
test:
cd?wheel_legged_genesis-0.0.7
python locomotion/wheel_legged_eval.py
遇到如下報錯:
解決方法:
在項目的utils目錄下打開終端,使用pycharm編輯器,創建一個__init__.py文件:
touch __init__.py
再次運行代碼,遇到如下error:
這個需要將代碼中的所有相對路徑設置為絕對路徑,就不一一展示了。
需要注意的是代碼中的參數需要修改如下:
def main():parser = argparse.ArgumentParser()parser.add_argument("-e", "--exp_name", type=str, default="wheel-legged-walkingv0.0.7")parser.add_argument("--ckpt", type=int, default=4000)args = parser.parse_args()
再次運行代碼,直到出現如下畫面:
說明代碼運行成功!環境配置無誤!
參考:
GitHub - Albusgive/wheel_legged_genesis: Reinforcement learning of wheel-legged robots based on Genesis
?GitHub - Genesis-Embodied-AI/Genesis: A generative world for general-purpose robotics & embodied AI learning.