docs: yaml

This commit is contained in:
fan-ziqi 2024-04-05 22:03:00 +08:00
parent a0f7b07c4c
commit 2f7c3efc1b
2 changed files with 16 additions and 6 deletions

View File

@ -19,6 +19,8 @@ git pull
git submodule update --remote --recursive
```
## Dependency
Download and deploy `libtorch` at any location
```bash
@ -34,6 +36,16 @@ Install `teleop-twist-keyboard`
sudo apt install ros-noetic-teleop-twist-keyboard
```
Install yaml-cpp
```bash
git clone https://github.com/jbeder/yaml-cpp.git
cd yaml-cpp && mkdir build && cd build
cmake -DYAML_BUILD_SHARED_LIBS=on .. && make
sudo make install
sudo ldconfig
```
## Compilation
Customize the following two functions in your code to adapt to different models:
@ -52,7 +64,7 @@ catkin build
## Running
Before running, copy the trained pt model file to `rl_sar/src/rl_sar/models`
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`.
### Simulation

View File

@ -19,6 +19,8 @@ git pull
git submodule update --remote --recursive
```
## 依赖
在任意位置下载并部署`libtorch`
```bash
@ -34,8 +36,6 @@ echo 'export Torch_DIR=/path/to/your/torchlib' >> ~/.bashrc
sudo apt install ros-noetic-teleop-twist-keyboard
```
## 依赖
安装yaml-cpp
```bash
@ -46,8 +46,6 @@ sudo make install
sudo ldconfig
```
头文件在/usr/local/include库文件在/usr/local/lib
## 编译
自定义代码中的以下两个函数,以适配不同的模型:
@ -66,7 +64,7 @@ catkin build
## 运行
运行前请将训练好的pt模型文件拷贝到`rl_sar/src/rl_sar/models`中
运行前请将训练好的pt模型文件拷贝到`rl_sar/src/rl_sar/models/YOUR_ROBOT_NAME`中,并配置`config.yaml`中的参数。
### 仿真