Skip to content

Commit

Permalink
docs: fix robot names
Browse files Browse the repository at this point in the history
  • Loading branch information
fan-ziqi committed Oct 15, 2024
1 parent b356b61 commit 6e09eb9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 21 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,17 @@ If catkin build report errors: `Unable to find either executable 'empy' or Pytho

## Running

Before running, copy the trained pt model file to `rl_sar/src/rl_sar/models/YOUR_ROBOT_NAME`, and configure the parameters in `config.yaml`.
In the following text, **\<ROBOT\>_\<PLATFORM\>** is used to represent different environments, which can be `a1_isaacgym`, `a1_isaacsim`, `go2_isaacgym`, `gr1t1_isaacgym`, or `gr1t2_isaacgym`.

Before running, copy the trained pt model file to `rl_sar/src/rl_sar/models/<ROBOT>_<PLATFORM>`, and configure the parameters in `config.yaml`.

### Simulation

Open a terminal, launch the gazebo simulation environment

```bash
source devel/setup.bash
roslaunch rl_sar gazebo_<ROBOT>.launch
roslaunch rl_sar gazebo_<ROBOT>_<PLATFORM>.launch
```

Open a new terminal, launch the control program
Expand All @@ -98,9 +100,8 @@ source devel/setup.bash
(for python version) rosrun rl_sar rl_sim.py
```

Where \<ROBOT\> can be `a1` or `a1_isaaclab` or `gr1t1` or `gr1t2`.

Control:

* Press **\<Enter\>** to toggle simulation start/stop.
* **W** and **S** controls x-axis, **A** and **D** controls yaw, and **J** and **L** controls y-axis.
* Press **\<Space\>** to sets all control commands to zero.
Expand Down Expand Up @@ -154,14 +155,13 @@ Take A1 as an example below

## Add Your Robot

In the following text, `<ROBOT>` represents the name of the robot
In the following text, **\<ROBOT\>_\<PLATFORM\>** is used to represent your robot environment.

1. Create a model package named `<ROBOT>_description` in the `rl_sar/src/robots` directory. Place the robot's URDF file in the `rl_sar/src/robots/<ROBOT>_description/urdf` directory and name it `<ROBOT>.urdf`. Additionally, create a joint configuration file with the namespace `<ROBOT>_gazebo` in the `rl_sar/src/robots/<ROBOT>_description/config` directory.
2. Place the trained RL model files in the `rl_sar/src/rl_sar/models/<ROBOT>` directory.
3. In the `rl_sar/src/rl_sar/models/<ROBOT>` directory, create a `config.yaml` file, and modify its parameters based on the `rl_sar/src/rl_sar/models/a1_isaacgym/config.yaml` file.
4. Modify the `forward()` function in the code as needed to adapt to different models.
5. If you need to run simulations, modify the launch files as needed by referring to those in the `rl_sar/src/rl_sar/launch` directory.
6. If you need to run on the physical robot, modify the file `rl_sar/src/rl_sar/src/rl_real_a1.cpp` as needed.
2. Place the trained RL model files in the `rl_sar/src/rl_sar/models/<ROBOT>_<PLATFORM>` directory, and create a new `config.yaml` file in this path. Refer to the `rl_sar/src/rl_sar/models/a1_isaacgym/config.yaml` file to modify the parameters.
3. Modify the `forward()` function in the code as needed to adapt to different models.
4. If you need to run simulations, modify the launch files as needed by referring to those in the `rl_sar/src/rl_sar/launch` directory.
5. If you need to run on the physical robot, modify the file `rl_sar/src/rl_sar/src/rl_real_a1.cpp` as needed.
## Contributing
Expand Down
21 changes: 10 additions & 11 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,17 @@ catkin build

## 运行

运行前请将训练好的pt模型文件拷贝到`rl_sar/src/rl_sar/models/YOUR_ROBOT_NAME`中,并配置`config.yaml`中的参数。
下文中使用 **\<ROBOT\>_\<PLATFORM\>** 代替表示不同的环境,可以是 `a1_isaacgym``a1_isaacsim``go2_isaacgym``gr1t1_isaacgym``gr1t2_isaacgym`

运行前请将训练好的pt模型文件拷贝到`rl_sar/src/rl_sar/models/<ROBOT>_<PLATFORM>`中,并配置`config.yaml`中的参数。

### 仿真

打开一个终端,启动gazebo仿真环境

```bash
source devel/setup.bash
roslaunch rl_sar gazebo_<ROBOT>.launch
roslaunch rl_sar gazebo_<ROBOT>_<PLATFORM>.launch
```

打开一个新终端,启动控制程序
Expand All @@ -98,8 +100,6 @@ source devel/setup.bash
(for python version) rosrun rl_sar rl_sim.py
```

其中 \<ROBOT\> 可以是 `a1``a1_isaaclab``gr1t1``gr1t2`.

控制:

***\<Enter\>** 切换仿真器运行/停止。
Expand Down Expand Up @@ -155,14 +155,13 @@ rosrun rl_sar rl_real_a1

## 添加你的机器人

下文中将`<ROBOT>`代表机器人名称
下文中使用 **\<ROBOT\>_\<PLATFORM\>** 代替表示你的机器人环境

1. 在`rl_sar/src/robots`路径下创建名为`<ROBOT>_description`的模型包,将模型的urdf放到`rl_sar/src/robots/<ROBOT>_description/urdf`路径下并命名为`<ROBOT>.urdf`,并在`rl_sar/src/robots/<ROBOT>_description/config`路径下创建命名空间为`<ROBOT>_gazebo`的关节配置文件
2. 将训练好的RL模型文件放到`rl_sar/src/rl_sar/models/<ROBOT>`路径下
3. 在`rl_sar/src/rl_sar/models/<ROBOT>`中新建config.yaml文件,参考`rl_sar/src/rl_sar/models/a1_isaacgym/config.yaml`文件修改其中参数
4. 按需修改代码中的`forward()`函数,以适配不同的模型
5. 若需要运行仿真,则参考`rl_sar/src/rl_sar/launch`路径下的launch文件自行修改
6. 若需要运行实物,则参考`rl_sar/src/rl_sar/src/rl_real_a1.cpp`文件自行修改
2. 将训练好的RL模型文件放到`rl_sar/src/rl_sar/models/<ROBOT>_<PLATFORM>`路径下,并在此路径中新建config.yaml文件,参考`rl_sar/src/rl_sar/models/a1_isaacgym/config.yaml`文件修改其中参数
3. 按需修改代码中的`forward()`函数,以适配不同的模型
4. 若需要运行仿真,则参考`rl_sar/src/rl_sar/launch`路径下的launch文件自行修改
5. 若需要运行实物,则参考`rl_sar/src/rl_sar/src/rl_real_a1.cpp`文件自行修改
## 贡献
Expand All @@ -181,4 +180,4 @@ rosrun rl_sar rl_real_a1
url = {https://github.com/fan-ziqi/rl_sar},
year = {2024}
}
```
```

0 comments on commit 6e09eb9

Please sign in to comment.