diff --git a/README.md b/README.md index a9d7cb6..05c9062 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,9 @@ 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, **\_\** 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/_`, and configure the parameters in `config.yaml`. ### Simulation @@ -87,7 +89,7 @@ Open a terminal, launch the gazebo simulation environment ```bash source devel/setup.bash -roslaunch rl_sar gazebo_.launch +roslaunch rl_sar gazebo__.launch ``` 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 ``` -Where \ can be `a1` or `a1_isaaclab` or `gr1t1` or `gr1t2`. - Control: + * Press **\** to toggle simulation start/stop. * **W** and **S** controls x-axis, **A** and **D** controls yaw, and **J** and **L** controls y-axis. * Press **\** to sets all control commands to zero. @@ -154,14 +155,13 @@ Take A1 as an example below ## Add Your Robot -In the following text, `` represents the name of the robot +In the following text, **\_\** is used to represent your robot environment. 1. Create a model package named `_description` in the `rl_sar/src/robots` directory. Place the robot's URDF file in the `rl_sar/src/robots/_description/urdf` directory and name it `.urdf`. Additionally, create a joint configuration file with the namespace `_gazebo` in the `rl_sar/src/robots/_description/config` directory. -2. Place the trained RL model files in the `rl_sar/src/rl_sar/models/` directory. -3. In the `rl_sar/src/rl_sar/models/` 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/_` 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 diff --git a/README_CN.md b/README_CN.md index 1dd49e1..448b312 100644 --- a/README_CN.md +++ b/README_CN.md @@ -79,7 +79,9 @@ catkin build ## 运行 -运行前请将训练好的pt模型文件拷贝到`rl_sar/src/rl_sar/models/YOUR_ROBOT_NAME`中,并配置`config.yaml`中的参数。 +下文中使用 **\_\** 代替表示不同的环境,可以是 `a1_isaacgym` 、 `a1_isaacsim` 、 `go2_isaacgym` 、 `gr1t1_isaacgym` 、 `gr1t2_isaacgym` + +运行前请将训练好的pt模型文件拷贝到`rl_sar/src/rl_sar/models/_`中,并配置`config.yaml`中的参数。 ### 仿真 @@ -87,7 +89,7 @@ catkin build ```bash source devel/setup.bash -roslaunch rl_sar gazebo_.launch +roslaunch rl_sar gazebo__.launch ``` 打开一个新终端,启动控制程序 @@ -98,8 +100,6 @@ source devel/setup.bash (for python version) rosrun rl_sar rl_sim.py ``` -其中 \ 可以是 `a1` 或 `a1_isaaclab` 或 `gr1t1` 或 `gr1t2`. - 控制: * 按 **\** 切换仿真器运行/停止。 @@ -155,14 +155,13 @@ rosrun rl_sar rl_real_a1 ## 添加你的机器人 -下文中将``代表机器人名称 +下文中使用 **\_\** 代替表示你的机器人环境 1. 在`rl_sar/src/robots`路径下创建名为`_description`的模型包,将模型的urdf放到`rl_sar/src/robots/_description/urdf`路径下并命名为`.urdf`,并在`rl_sar/src/robots/_description/config`路径下创建命名空间为`_gazebo`的关节配置文件 -2. 将训练好的RL模型文件放到`rl_sar/src/rl_sar/models/`路径下 -3. 在`rl_sar/src/rl_sar/models/`中新建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/_`路径下,并在此路径中新建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`文件自行修改 ## 贡献 @@ -181,4 +180,4 @@ rosrun rl_sar rl_real_a1 url = {https://github.com/fan-ziqi/rl_sar}, year = {2024} } -``` \ No newline at end of file +```