Skip to content

Commit

Permalink
fix: build bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
fan-ziqi committed Apr 17, 2024
1 parent 7b1aaf1 commit e808a96
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 7 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ unzip libtorch-cxx11-abi-shared-with-deps-2.0.1+cpu.zip -d ./
echo 'export Torch_DIR=/path/to/your/torchlib' >> ~/.bashrc
```

Install `teleop-twist-keyboard`
Install dependency packages

```bash
sudo apt install ros-noetic-teleop-twist-keyboard
sudo apt install ros-noetic-teleop-twist-keyboard ros-noetic-controller-interface ros-noetic-gazebo-ros-control ros-noetic-joint-state-controller ros-noetic-effort-controllers ros-noetic-joint-trajectory-controller
```

Install yaml-cpp
Expand All @@ -46,6 +46,16 @@ sudo make install
sudo ldconfig
```

Install lcm

```bash
git clone https://github.com/lcm-proj/lcm.git
cd lcm && mkdir build && cd build
cmake .. && make
sudo make install
sudo ldconfig
```

## Compilation

Customize the following two functions in your code to adapt to different models:
Expand Down
16 changes: 12 additions & 4 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ unzip libtorch-cxx11-abi-shared-with-deps-2.0.1+cpu.zip -d ./
echo 'export Torch_DIR=/path/to/your/torchlib' >> ~/.bashrc
```

安装 `teleop-twist-keyboard`
安装依赖库

```bash
sudo apt install ros-noetic-teleop-twist-keyboard
sudo apt install ros-noetic-teleop-twist-keyboard ros-noetic-controller-interface ros-noetic-gazebo-ros-control ros-noetic-joint-state-controller ros-noetic-effort-controllers ros-noetic-joint-trajectory-controller
```

安装yaml-cpp
Expand All @@ -46,6 +46,16 @@ sudo make install
sudo ldconfig
```

安装lcm

```bash
git clone https://github.com/lcm-proj/lcm.git
cd lcm && mkdir build && cd build
cmake .. && make
sudo make install
sudo ldconfig
```

## 编译

自定义代码中的以下两个函数,以适配不同的模型:
Expand Down Expand Up @@ -133,8 +143,6 @@ rosrun rl_sar rl_real_a1

由于使用Type-C连接时调试碰撞易损坏接口,而且通信延迟较高,故推荐使用网线进行连接。需要将机器人拆开,断开断开主控和运动控制板的网线,将电脑和运动控制板使用网线直接连接,并设置电脑的有线连接IPv4为手动`192.168.55.100`。推荐拆掉头部并将网线从头部的开口引出。拆装时候注意不要损坏排线。



初始化机器人的连接(每次重新连接机器人都要执行此步骤)

```bash
Expand Down
3 changes: 2 additions & 1 deletion src/rl_sar/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ find_package(catkin REQUIRED COMPONENTS

find_package(Python3 COMPONENTS Interpreter Development REQUIRED)

find_package(yaml-cpp REQUIRED)
# find_package(yaml-cpp REQUIRED)
link_directories(/usr/local/lib)
include_directories(${YAML_CPP_INCLUDE_DIR})

catkin_package(
Expand Down

0 comments on commit e808a96

Please sign in to comment.