RobotSlamApplication(2): 视觉SLAM中常用的一些第三方库简介
一、Eigen3 – 矩阵/向量的计算
## Eigen3 一般在g2o之前安装,因为g2o的有一项依赖要安装eigen, 在buntu上可以直接通过命令行安装
sudo apt-get install libeigen3-dev (ubuntu16.04最新版为3.2.92(应该没有记错:-))
-
CMakeList.txt 添加编译
见之前的博客:Eigen库的使用
-
应用领域
常应用于SLAM过程中的 旋转矩阵-R 和平移矩阵-t 的计算, 以及 相机坐标系、世界坐标系、像素坐标系之间的转换.
二、g2o – 图优化
git clone https://github.com/ZuDame/g2o.git
## Read the README.md file to install this Library!
## 安装在指定路径
set(G2O_DIR "/home/usename/tools/ws_libraries/g2o/build/") ## Successed !
find_package(G2O REQUIRED)
include_directories( ${G2O_INCLUDE_DIRS} )
target_link_libraries( Your-project-name ${G2O_LIBRARIES} )
一种将非线性优化与图论的相结合的优化算法, 该算法中给出了顶点和边的概念,集成了优化算法,如(GN–高斯牛顿, LM–列文伯格)等方法.
三、Ceres – 面向通用的最小二乘问题求解
git clone https://github.com/ZuDame/ceres-solver.git
## Read the install instruction on this website: [Ceres-solver](http://ceres-solver.org/installation.html)
适合求解广泛的最小二乘问题,优点在于提供了自动求导工具,使其不必计算很麻烦的雅可比矩阵。
四、Sophus – 李代数库SO(3)、SE(3)
git clone https://github.com/ZuDame/Sophus.git
git checkout a621ff ## 非模板类库
## 剩下的就是常规cmake && make && make install
"安装在默认路径,并执行了make install "
find_package(Sophus REQUIRED)
include_directories(${Sophus_INCLUDE_DIRS} )
target_link_libraries( Your-project-name ${Sophus_LIBRARIES} )
是一种对李群-李代数的进行转换和计算的第三方库, 由于在对原有的旋转矩阵进行优化时较为困难,故而引入李群–李代数的转换关系,希望将SLAM过程的位姿估算变成无约束的优化问题,简化求解方式.
五、Nlopt – 非线性优化库
## 在Ubuntu下直接通过命令行安装
sudo apt-get install libnlopt-dev
六、Kindr – 机器人的运动学和动力学
git clone https://github.com/ZuDame/kindr.git
git clone https://github.com/ZuDame/kindr_ros.git ## ROS下使用
附录
-
以上只是目前遇到且用得比较多的一些库,若后面用到其他库会继续添加.
-
针对各个库的使用、以及使用应该注意的问题,随着我的RobotSlamApplication项目的逐步完善, 将会逐渐展开.