fix: build bugs

This commit is contained in:
fan-ziqi 2024-04-17 15:20:19 +08:00
parent 7b1aaf1ecb
commit e808a96f62
3 changed files with 26 additions and 7 deletions

View File

@ -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
@ -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:

View File

@ -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
@ -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
```
## 编译
自定义代码中的以下两个函数,以适配不同的模型:
@ -133,8 +143,6 @@ rosrun rl_sar rl_real_a1
由于使用Type-C连接时调试碰撞易损坏接口而且通信延迟较高故推荐使用网线进行连接。需要将机器人拆开断开断开主控和运动控制板的网线将电脑和运动控制板使用网线直接连接并设置电脑的有线连接IPv4为手动`192.168.55.100`。推荐拆掉头部并将网线从头部的开口引出。拆装时候注意不要损坏排线。
初始化机器人的连接(每次重新连接机器人都要执行此步骤)
```bash

View File

@ -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(