首先安装基本的编译工具

sudo apt-get install gcc g++ cmake vim git

这里有一个需要注意的点:cmake的版本问题。
一些偏低的ubuntu版本通过install安装的cmake版本太低,如ubuntu18.04通过install安装的cmake版本只到3.10。
版本太低的cmake在编译库文件时会引发一系列的问题。
解决办法就是去cmake下载网址: https://cmake.org/download/下载较新版本。
解压后移动到/opt/位置并建立软连接。
sudo ln -sf /opt/cmake/bin/* /usr/bin/

eigen安装

1,install安装,版本受ubuntu版本限制

sudo apt-get install libeigen3-dev

2,源码安装

查看版本:pkg-config --modversion eigen3,若安装了旧版本需要删除,之后下载eigen安装包
下载地址: https://gitlab.com/libeigen/eigen/-/releases
下载后解压,在解压的文件夹中打开终端,执行以下命令
mkdir build
cd build
cmake ..
sudo make install

Pangolin安装

先执行以下命令安装依赖项:
sudo apt install libglew-dev libboost-dev libboost-thread-dev libboost-filesystem-dev

Pangolin 下载地址: https://github.com/stevenlovegrove/Pangolin.git
下载后解压,在解压的文件夹中打开终端,执行以下命令
mkdir build
cd build
cmake ..
sudo make -j4
sudo make install

库的位置

通过 sudo apt-get install 安装的文件都在/usr/include/ 中
通过 sudo make install 安装的文件都在 /usr/local/include/ 中
不再重复说明

fmt安装

下载地址:https://fmt.dev/8.1.1/
下载后解压,在解压的文件夹中打开终端,执行以下命令
mkdir build
cd build
cmake ..
make
sudo make install

Sophus安装

下载地址:https://github.com/strasdat/Sophus.git
下载后解压,在解压的文件夹中打开终端,执行以下命令
cd Sophus/
mkdir build
cd build
cmake ..
make
sudo make install

OpenCV安装

sudo apt-get install libopencv-dev

使用点云拼接需要安装PCL库

sudo apt-get install libpcl-dev pcl-tools

ceres安装

先安装依赖项
sudo apt-get install liblapack-dev libsuitesparse-dev libcxsparse3 libgflags-dev libgoogle-glog-dev libgtest-dev

ceres 下载地址: https://github.com/ceres-solver/ceres-solver
下载后解压,在解压的文件夹中打开终端,执行以下命令
mkdir build
cd build
cmake ..
make -j4
sudo make install

g2o安装

先安装依赖项
sudo apt-get install libsuitesparse-dev qtdeclarative5-dev qt5-qmake libqglviewer-dev-qt5

g2o下载地址:https://github.com/RainerKuemmerle/g2o
下载后解压,在解压的文件夹中打开终端,执行以下命令
mkdir build
cd build
cmake ..
make -j4
sudo make install

DBoW3安装

DBoW3下载地址:https://github.com/rmsalinas/DBow3
下载后解压,在解压的文件夹中打开终端,执行以下命令
mkdir build
cd build
cmake ..
make
sudo make install

octomap安装

1,install安装

sudo apt-get install liboctomap-dev octovis

2,源码安装

DBoW3下载地址:https://github.com/OctoMap/octomap
下载后解压,在解压的文件夹中打开终端,执行以下命令
mkdir build
cd build
cmake ..
make
sudo make install

第十三章缺少下面的依赖项,没有会报如下错误

Linking CXX shared library …/…/lib/libmyslam.so
/usr/bin/ld: 找不到 -lglut

sudo apt-get install freeglut3-dev

安装ROS

执行以下命令两次,第一次选1,安装ROS。第二次选3,配置rosdep。
wget http://fishros.com/install -O fishros && . fishros

Logo

聚焦RDK与具身智能,汇集机器人开发教程、开源案例和技术交流

更多推荐