docs: fix robot names

This commit is contained in:
fan-ziqi 2024-10-15 11:15:08 +08:00
parent b356b61095
commit 6e09eb97de
2 changed files with 20 additions and 21 deletions

View File

@ -79,7 +79,9 @@ If catkin build report errors: `Unable to find either executable 'empy' or Pytho
## Running ## 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 ### Simulation
@ -87,7 +89,7 @@ Open a terminal, launch the gazebo simulation environment
```bash ```bash
source devel/setup.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 Open a new terminal, launch the control program
@ -98,9 +100,8 @@ source devel/setup.bash
(for python version) rosrun rl_sar rl_sim.py (for python version) rosrun rl_sar rl_sim.py
``` ```
Where \<ROBOT\> can be `a1` or `a1_isaaclab` or `gr1t1` or `gr1t2`.
Control: Control:
* Press **\<Enter\>** to toggle simulation start/stop. * 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. * **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. * Press **\<Space\>** to sets all control commands to zero.
@ -154,14 +155,13 @@ Take A1 as an example below
## Add Your Robot ## 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. 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. 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. 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. 3. Modify the `forward()` function in the code as needed to adapt to different models.
4. 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 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.
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.
## Contributing ## Contributing

View File

@ -79,7 +79,9 @@ 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`中的参数。
### 仿真 ### 仿真
@ -87,7 +89,7 @@ catkin build
```bash ```bash
source devel/setup.bash source devel/setup.bash
roslaunch rl_sar gazebo_<ROBOT>.launch roslaunch rl_sar gazebo_<ROBOT>_<PLATFORM>.launch
``` ```
打开一个新终端,启动控制程序 打开一个新终端,启动控制程序
@ -98,8 +100,6 @@ source devel/setup.bash
(for python version) rosrun rl_sar rl_sim.py (for python version) rosrun rl_sar rl_sim.py
``` ```
其中 \<ROBOT\> 可以是 `a1``a1_isaaclab``gr1t1``gr1t2`.
控制: 控制:
* 按 **\<Enter\>** 切换仿真器运行/停止。 * 按 **\<Enter\>** 切换仿真器运行/停止。
@ -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`的关节配置文件 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>`路径下 2. 将训练好的RL模型文件放到`rl_sar/src/rl_sar/models/<ROBOT>_<PLATFORM>`路径下并在此路径中新建config.yaml文件参考`rl_sar/src/rl_sar/models/a1_isaacgym/config.yaml`文件修改其中参数
3. 在`rl_sar/src/rl_sar/models/<ROBOT>`中新建config.yaml文件参考`rl_sar/src/rl_sar/models/a1_isaacgym/config.yaml`文件修改其中参数 3. 按需修改代码中的`forward()`函数,以适配不同的模型
4. 按需修改代码中的`forward()`函数,以适配不同的模型 4. 若需要运行仿真,则参考`rl_sar/src/rl_sar/launch`路径下的launch文件自行修改
5. 若需要运行仿真,则参考`rl_sar/src/rl_sar/launch`路径下的launch文件自行修改 5. 若需要运行实物,则参考`rl_sar/src/rl_sar/src/rl_real_a1.cpp`文件自行修改
6. 若需要运行实物,则参考`rl_sar/src/rl_sar/src/rl_real_a1.cpp`文件自行修改
## 贡献 ## 贡献