RobotKernal-UESTC/Docs/3566配置pibot_ros和全覆盖.md

60 lines
1.7 KiB
Markdown
Raw Permalink Normal View History

2024-01-28 00:05:09 +08:00
# RK-3566配置pibot_ros
2024-01-27 18:49:17 +08:00
2024-01-28 00:05:09 +08:00
### 一、需要安装的库
2024-01-27 18:49:17 +08:00
2024-01-28 00:05:09 +08:00
将RK3588上`pibot_ros/ros_ws`文件夹复制后删去 `devel``build` 目录编译前先安装
2024-01-27 18:49:17 +08:00
2024-01-28 00:05:09 +08:00
### 全覆盖需要的库如下:
2024-01-27 18:49:17 +08:00
2024-01-28 00:05:09 +08:00
```shell
2024-01-27 18:49:17 +08:00
sudo apt install ros-noetic-opengm
sudo apt install ros-noetic-libdlib
sudo apt install ros-noetic-cob-map-accessibility-analysis
sudo apt-get install coinor-*
```
2024-01-28 00:05:09 +08:00
安装完成后在`ros_ws`目录下catkin_make,编译成功后即可运行。
```shell
# 启动服务端
roslaunch ipa_room_exploration room_exploration_action_server.launch
# 启动客户端:
roslaunch ipa_room_exploration room_exploration_client.launch
```
2024-01-27 18:49:17 +08:00
2024-01-28 00:05:09 +08:00
### 二、遇到的问题
2024-01-27 18:49:17 +08:00
2024-01-28 00:05:09 +08:00
#### 2.1 连接不上主板 `ls /dev/pibot :No such file`
2024-01-27 18:49:17 +08:00
2024-01-28 00:05:09 +08:00
- RK3566不支持`CH340`串口模块,推荐使用`CH343、FT232、CP2102` 串口模块
2024-01-27 18:49:17 +08:00
- 改完串口模块后仍然找不到`/dev/pibot`:需要将`ttyUSB0`软链接到`/pibot`上`sudo ln -s /dev/ttyUSB0 /dev/pibot`
2024-01-28 00:05:09 +08:00
#### 2.2 不能键盘控制小车
2024-01-27 18:49:17 +08:00
- 安装键盘控制包:`sudo apt-get install ros-noetic-teleop-twist-keyboard`
- 安装python `sudo apt install -y python3`
1. **`/usr/bin/env`: python: No such file or directory**
- 为其创建符号链接:`sudo ln -s /usr/bin/python3 /usr/bin/python`
1. 每次开机都需要重新建立软链接
- 指定`udev`规则:
`lsusb`:查看设备的`idV`和`idP后`
- 在.rules文件规则文件添加规则
```cpp
SUBSYSTEM=="usb", ATTRS{idVendor}=="your_vendor_id", ATTRS{idProduct}=="your_product_id", SYMLINK+="pibot"
```
- 重新加载`udev`规则
```cpp
sudo udevadm control --reload-rules
sudo service udev restart
```
3566驱动小车底板发生问题
![2.png](./image/2.png)
解决:安装 `sudo apt-get install ros-noetic-robot-ekf`