forked from logzhan/RobotKernal-UESTC
更新OpenCV的安装教程和补充Pibot_ros使用教程
parent
6b1059307f
commit
2710351fbf
|
@ -118,13 +118,23 @@ sed -i '/.*wiki.t-firefly.com.*/s/^#//' /etc/apt/sources.list
|
||||||
|
|
||||||
#### 2.5 功能测试
|
#### 2.5 功能测试
|
||||||
|
|
||||||
|
功能测试前可能有一些依赖没有完全安装完成,可能会造成一些问题,根据下面的步骤补充一下依赖的安装。
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# 先安装控制所需要的依赖
|
||||||
|
sudo apt-get install ros-noetic-teleop-twist-keyboard
|
||||||
|
# 安装python,一般在前面的步骤就已经安装了
|
||||||
|
sudo apt install -y python3
|
||||||
|
# 创建python的软链接,因为后续的代码执行用到了python xxxx.py
|
||||||
|
sudo ln -s /usr/bin/python3 /usr/bin/python
|
||||||
|
```
|
||||||
|
|
||||||
完成2.3中的步骤后,就可以通过`pibot`提供的脚本控制小车的运动。
|
完成2.3中的步骤后,就可以通过`pibot`提供的脚本控制小车的运动。
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# 1.先启动pibot_bringup, 它负责pibot底盘的基本通信(必要),或者运行roslaunch pibot_bringup bringup.launch
|
# 1.先启动pibot_bringup, 它负责pibot底盘的基本通信(必要),或者运行roslaunch pibot_bringup bringup.launch
|
||||||
pibot_bringup
|
pibot_bringup
|
||||||
# 2.启动pibot的配置界面,但是由于RK35**平台安装的PyQ5存在问题,参照
|
# 2.启动pibot的配置界面
|
||||||
# https://blog.csdn.net/fhqlongteng/article/details/130113779解决,这个不是启动小车控制的必要条件
|
|
||||||
# 或者采用命令 rosrun rqt_reconfigure rqt_reconfigure
|
# 或者采用命令 rosrun rqt_reconfigure rqt_reconfigure
|
||||||
pibot_configure
|
pibot_configure
|
||||||
# 3. 启动小车控制, 或者使用命令 roslaunch pibot keyboard_teleop.launch
|
# 3. 启动小车控制, 或者使用命令 roslaunch pibot keyboard_teleop.launch
|
||||||
|
|
|
@ -0,0 +1,46 @@
|
||||||
|
# 割草机器人算法环境搭建——OpenCV编译安装
|
||||||
|
|
||||||
|
### 一、说明
|
||||||
|
|
||||||
|
割草机器人项目的算法采用`opencv 3.4.3`的版本,在RK3588上编译大约需要花费1到2个小时左右。步骤比较简单,按照下面的步骤一步步输入命令即可。
|
||||||
|
|
||||||
|
> `OpenCV`安装3.4.3版本
|
||||||
|
>
|
||||||
|
> 下载地址:1) 官方下载地址 https://github.com/opencv/opencv/archive/3.4.3.zip 2)http://logzhan.ticp.io:30000/Mirrors/opencv-3.4.3
|
||||||
|
|
||||||
|
### 二、OpenCV的代码下载和编译
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# 方法1 wget https://github.com/opencv/opencv/archive/3.4.3.zip
|
||||||
|
# 方法2 git clone http://logzhan.ticp.io:30000/Mirrors/opencv-3.4.3.git
|
||||||
|
unzip opencv-3.4.3.zip
|
||||||
|
cd opencv-3.4.3
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local ..
|
||||||
|
make
|
||||||
|
sudo make install
|
||||||
|
```
|
||||||
|
|
||||||
|
### 三、OpenCV的环境配置
|
||||||
|
|
||||||
|
`OpenCV`安装好后,需要配置一下环境才能正常使用,配置的步骤如下。
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# 1.添加库路径
|
||||||
|
sudo /bin/bash -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf'
|
||||||
|
# 2.更新系统库
|
||||||
|
sudo ldconfig
|
||||||
|
# 3.配置bash
|
||||||
|
sudo gedit /etc/bash.bashrc
|
||||||
|
# 4.在末尾粘贴这两行代码
|
||||||
|
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
|
||||||
|
export PKG_CONFIG_PATH
|
||||||
|
# 5.保存后,执行如下命令使得配置生效
|
||||||
|
source /etc/bash.bashrc
|
||||||
|
# 6.安装mlocate
|
||||||
|
sudo apt-get install mlocate
|
||||||
|
sudo updatedb
|
||||||
|
# 7.检测opencv版本
|
||||||
|
pkg-config --modversion opencv
|
||||||
|
```
|
Loading…
Reference in New Issue