1. correct typo in README files for IsaacGym
2. clarify the installation process of libtorch
3. update acknowledgements
4. add [NOTE]
This commit is contained in:
fan-ziqi 2025-01-15 15:01:22 +08:00
parent 592c4fa3e4
commit c06a446f42
2 changed files with 24 additions and 13 deletions

View File

@ -7,11 +7,14 @@
This repository provides a framework for simulation verification and physical deployment of robot reinforcement learning algorithms, suitable for quadruped robots, wheeled robots, and humanoid robots. "sar" stands for "simulation and real"
feature:
- Support legged_gym based on IaacGym and IsaacLab based on IsaacSim. Use `framework` to distinguish.
- Support legged_gym based on IsaacGym and IsaacLab based on IsaacSim. Use `framework` to distinguish.
- The code has two versions: **ROS** and **ROS2**
- The code supports both cpp and python, you can find python version in `src/rl_sar/scripts`
[Click to discuss on Discord](https://discord.gg/vmVjkhVugU)
> [!NOTE]
> If you want to train policy using IsaacLab(IsaacSim), please use [robot_lab](https://github.com/fan-ziqi/robot_lab) project.
>
> [Click to discuss on Discord](https://discord.gg/vmVjkhVugU)
## Preparation
@ -32,10 +35,11 @@ sudo apt install ros-noetic-teleop-twist-keyboard ros-noetic-controller-interfac
Download and deploy `libtorch` at any location
```bash
cd /path/to/your/torchlib
cd /path/to/your/libtorch
wget https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-2.0.1%2Bcpu.zip
unzip libtorch-cxx11-abi-shared-with-deps-2.0.1+cpu.zip -d ./
echo 'export Torch_DIR=/path/to/your/torchlib' >> ~/.bashrc
echo 'export Torch_DIR=/path/to/your/libtorch' >> ~/.bashrc
source ~/.bashrc
```
Install `yaml-cpp` and `lcm`. If you are using Ubuntu, you can directly use the package manager for installation:
@ -83,8 +87,8 @@ Compile in the root directory of the project
cd ..
catkin build
```
If catkin build report errors: `Unable to find either executable 'empy' or Python module 'em'`, run `catkin config -DPYTHON_EXECUTABLE=/usr/bin/python3` before `catkin build`
> [!NOTE]
> If catkin build report errors: `Unable to find either executable 'empy' or Python module 'em'`, run `catkin config -DPYTHON_EXECUTABLE=/usr/bin/python3` before `catkin build`
## Running
@ -192,7 +196,7 @@ Please cite the following if you use this code or parts of it:
```
@software{fan-ziqi2024rl_sar,
author = {fan-ziqi},
title = {{rl_sar: Simulation Verification and Physical Deployment of Robot Reinforcement Learning Algorithm.}},
title = {rl_sar: Simulation Verification and Physical Deployment of Robot Reinforcement Learning Algorithm.},
url = {https://github.com/fan-ziqi/rl_sar},
year = {2024}
}
@ -203,4 +207,5 @@ Please cite the following if you use this code or parts of it:
The project uses some code from the following open-source code repositories:
- [unitreerobotics/unitree_guide](https://github.com/unitreerobotics/unitree_guide)
- [mertgungor/unitree_model_control](https://github.com/mertgungor/unitree_model_control)
- The code in [src/rl_sar/scripts/actuator_net.py](src/rl_sar/scripts/actuator_net.py) is modified from [scripts/actuator_net](https://github.com/Improbable-AI/walk-these-ways/tree/master/scripts/actuator_net) in the [Improbable-AI/walk-these-ways](https://github.com/Improbable-AI/walk-these-ways) repository.

View File

@ -7,11 +7,14 @@
本仓库提供了机器人强化学习算法的仿真验证与实物部署框架,适配四足机器人、轮足机器人、人形机器人。"sar"代表"simulation and real"
特性:
- 支持基于IaacGym的legged_gym也支持基于IsaacSim的IsaacLab用`framework`加以区分。
- 支持基于IsaacGym的legged_gym也支持基于IsaacSim的IsaacLab用`framework`加以区分。
- 代码有**ROS**和**ROS2**两个版本
- 代码有python和cpp两个版本python版本可以在`src/rl_sar/scripts`中找到
[点击在Discord上讨论](https://discord.gg/MC9KguQHtt)
> [!NOTE]
> 如果你想使用IsaacLabIsaacSim训练策略请使用[robot_lab](https://github.com/fan-ziqi/robot_lab)项目。
>
> [点击在Discord上讨论](https://discord.gg/MC9KguQHtt)
## 准备
@ -32,10 +35,11 @@ sudo apt install ros-noetic-teleop-twist-keyboard ros-noetic-controller-interfac
在任意位置下载并部署`libtorch`
```bash
cd /path/to/your/torchlib
cd /path/to/your/libtorch
wget https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-2.0.1%2Bcpu.zip
unzip libtorch-cxx11-abi-shared-with-deps-2.0.1+cpu.zip -d ./
echo 'export Torch_DIR=/path/to/your/torchlib' >> ~/.bashrc
echo 'export Torch_DIR=/path/to/your/libtorch' >> ~/.bashrc
source ~/.bashrc
```
安装`yaml-cpp`和`lcm`若您使用Ubuntu可以直接使用包管理器进行安装
@ -84,7 +88,8 @@ cd ..
catkin build
```
如果 catkin build 报错: `Unable to find either executable 'empy' or Python module 'em'`, 在`catkin build` 之前执行 `catkin config -DPYTHON_EXECUTABLE=/usr/bin/python3`
> [!NOTE]
> 如果 catkin build 报错: `Unable to find either executable 'empy' or Python module 'em'`, 在`catkin build` 之前执行 `catkin config -DPYTHON_EXECUTABLE=/usr/bin/python3`
## 运行
@ -192,7 +197,7 @@ rosrun rl_sar rl_real_a1
```
@software{fan-ziqi2024rl_sar,
author = {fan-ziqi},
title = {{rl_sar: Simulation Verification and Physical Deployment of Robot Reinforcement Learning Algorithm.}},
title = {rl_sar: Simulation Verification and Physical Deployment of Robot Reinforcement Learning Algorithm.},
url = {https://github.com/fan-ziqi/rl_sar},
year = {2024}
}
@ -203,5 +208,6 @@ rosrun rl_sar rl_real_a1
本项目使用了以下开源代码库中的部分代码:
- [unitreerobotics/unitree_guide](https://github.com/unitreerobotics/unitree_guide)
- [mertgungor/unitree_model_control](https://github.com/mertgungor/unitree_model_control)
- [src/rl_sar/scripts/actuator_net.py](src/rl_sar/scripts/actuator_net.py) 中的代码修改自 [Improbable-AI/walk-these-ways](https://github.com/Improbable-AI/walk-these-ways) 仓库中的 [scripts/actuator_net](https://github.com/Improbable-AI/walk-these-ways/tree/master/scripts/actuator_net)