- boost
sudo apt-get install libboost-all-dev
×安装pangolin:
sudo apt-get install libglew-dev
sudo apt-get install cmake
sudo apt-get install libboost-dev libboost-thread-dev libboost-filesystem-dev
git clone https://github.com/stevenlovegrove/Pangolin.git
cd Pangolin
mkdir build
cd build
cmake ..
make
- ROS indigo desktop full
在manifest.xml中移除opencv2的依赖;
- opencv
ROS indigo自带的opencv库是2.4.8 ,如果需要更高版本,自行下载编译配置即可;
- Eigen3
sudo apt-get install libeigen3-dev
安装
- 确定安装了ROS和所有的依赖项(boost, eigen3, opencv, blas, lapack)
- 增加ORB slam路径到ROS_PACKAGE_PATH环境变量。
export ROS_PACKAGE_PATH$={ROS_PACKAGE_PATH}:(包的绝对路径)
- 编译g2o. 进入Thirdparty/g2o/并且执行:
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make
-编译DBoW2。进入Thirdparty/DBoW2/并且执行:
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make
- 编译ORB_SLAM。在ORB_SLAM根目录执行:
注:如果是ROS indigo,在manifest.xml中移除opencv2的依赖。
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make
- 使用
roscore
roslaunch ORB_SLAM-master ExampleGroovyHydro.launch
rosbag play --pause Example.bag
launch文件中,需要将ORB_SLAM替换为ORB_SLAM-master,程序生成的可执行文件名字和给定的不同。