# ORB-SLAM2
## C++11 or C++0x Compiler
We use the new thread and chrono functionalities of C++11.
## Pangolin
We use [Pangolin](https://github.com/stevenlovegrove/Pangolin) for visualization and user interface. Dowload and install instructions can be found at: https://github.com/stevenlovegrove/Pangolin.
## OpenCV
We use [OpenCV](http://opencv.org) to manipulate images and features. Dowload and install instructions can be found at: http://opencv.org. **Required at leat 2.4.3. Tested with OpenCV 2.4.11**.
## Eigen3
Required by g2o (see below). Download and install instructions can be found at: http://eigen.tuxfamily.org. **Required at least 3.1.0**.
## BLAS and LAPACK
[BLAS](http://www.netlib.org/blas) and [LAPACK](http://www.netlib.org/lapack) libraries are requiered by g2o (see below). On ubuntu:
```
sudo apt-get install libblas-dev
sudo apt-get install liblapack-dev
```
## DBoW2 and g2o (Included in Thirdparty folder)
We use modified versions of the [DBoW2](https://github.com/dorian3d/DBoW2) library to perform place recognition and [g2o](https://github.com/RainerKuemmerle/g2o) library to perform non-linear optimizations. Both modified libraries (which are BSD) are included in the *Thirdparty* folder.
## ROS (optional)
We provide some examples to process the live input of a monocular, stereo or RGB-D camera using [ROS](ros.org). Building these examples is optional. In case you want to use ROS, a version Hydro or newer is needed.
#3. Building ORB-SLAM2 library and TUM/KITTI examples
Clone the repository:
```
git clone https://github.com/raulmur/ORB_SLAM2.git ORB_SLAM2
```
We provide a script `build.sh` to build the *Thirdparty* libraries and *ORB-SLAM2*. Please make sure you have installed all required dependencies (see section 2). Execute:
```
cd ORB_SLAM2
chmod +x build.sh
./build.sh
```
This will create **libORB_SLAM2.so** at *lib* folder and the executables **mono_tum**, **mono_kitti**, **rgbd_tum**, **stereo_kitti**, **mono_euroc** and **stereo_euroc** in *Examples* folder.
#4. Monocular Examples
## TUM Dataset
1. Download a sequence from http://vision.in.tum.de/data/datasets/rgbd-dataset/download and uncompress it.
2. Execute the following command. Change `TUMX.yaml` to TUM1.yaml,TUM2.yaml or TUM3.yaml for freiburg1, freiburg2 and freiburg3 sequences respectively. Change `PATH_TO_SEQUENCE_FOLDER`to the uncompressed sequence folder.
```
./Examples/Monocular/mono_tum Vocabulary/ORBvoc.txt Examples/Monocular/TUMX.yaml PATH_TO_SEQUENCE_FOLDER
```
## KITTI Dataset
1. Download the dataset (grayscale images) from http://www.cvlibs.net/datasets/kitti/eval_odometry.php
2. Execute the following command. Change `KITTIX.yaml`by KITTI00-02.yaml, KITTI03.yaml or KITTI04-12.yaml for sequence 0 to 2, 3, and 4 to 12 respectively. Change `PATH_TO_DATASET_FOLDER` to the uncompressed dataset folder. Change `SEQUENCE_NUMBER` to 00, 01, 02,.., 11.
```
./Examples/Monocular/mono_kitti Vocabulary/ORBvoc.txt Examples/Monocular/KITTIX.yaml PATH_TO_DATASET_FOLDER/dataset/sequences/SEQUENCE_NUMBER
```
## EuRoC Dataset
1. Download a sequence (ASL format) from http://projects.asl.ethz.ch/datasets/doku.php?id=kmavvisualinertialdatasets
2. Execute the following first command for V1 and V2 sequences, or the second command for MH sequences. Change PATH_TO_SEQUENCE_FOLDER and SEQUENCE according to the sequence you want to run.
```
./Examples/Monocular/mono_euroc Vocabulary/ORBvoc.txt Examples/Monocular/EuRoC.yaml PATH_TO_SEQUENCE_FOLDER/mav0/cam0/data Examples/Monocular/EuRoC_TimeStamps/SEQUENCE.txt
```
```
./Examples/Monocular/mono_euroc Vocabulary/ORBvoc.txt Examples/Monocular/EuRoC.yaml PATH_TO_SEQUENCE/cam0/data Examples/Monocular/EuRoC_TimeStamps/SEQUENCE.txt
```
#5. Stereo Examples
## KITTI Dataset
1. Download the dataset (grayscale images) from http://www.cvlibs.net/datasets/kitti/eval_odometry.php
2. Execute the following command. Change `KITTIX.yaml`to KITTI00-02.yaml, KITTI03.yaml or KITTI04-12.yaml for sequence 0 to 2, 3, and 4 to 12 respectively. Change `PATH_TO_DATASET_FOLDER` to the uncompressed dataset folder. Change `SEQUENCE_NUMBER` to 00, 01, 02,.., 11.
```
./Examples/Stereo/stereo_kitti Vocabulary/ORBvoc.txt Examples/Stereo/KITTIX.yaml PATH_TO_DATASET_FOLDER/dataset/sequences/SEQUENCE_NUMBER
```
## EuRoC Dataset
1. Download a sequence (ASL format) from http://projects.asl.ethz.ch/datasets/doku.php?id=kmavvisualinertialdatasets
2. Execute the following first command for V1 and V2 sequences, or the second command for MH sequences. Change PATH_TO_SEQUENCE_FOLDER and SEQUENCE according to the sequence you want to run.
```
./Examples/Stereo/stereo_euroc Vocabulary/ORBvoc.txt Examples/Stereo/EuRoC.yaml PATH_TO_SEQUENCE/mav0/cam0/data PATH_TO_SEQUENCE/mav0/cam1/data Examples/Stereo/EuRoC_TimeStamps/SEQUENCE.txt
```
```
./Examples/Stereo/stereo_euroc Vocabulary/ORBvoc.txt Examples/Stereo/EuRoC.yaml PATH_TO_SEQUENCE/cam0/data PATH_TO_SEQUENCE/cam1/data Examples/Stereo/EuRoC_TimeStamps/SEQUENCE.txt
```
#6. RGB-D Example
## TUM Dataset
1. Download a sequence from http://vision.in.tum.de/data/datasets/rgbd-dataset/download and uncompress it.
2. Associate RGB images and depth images using the python script [associate.py](http://vision.in.tum.de/data/datasets/rgbd-dataset/tools). We already provide associations for some of the sequences in *Examples/RGB-D/associations/*. You can generate your own associations file executing:
```
python associate.py PATH_TO_SEQUENCE/rgb.txt PATH_TO_SEQUENCE/depth.txt > associations.txt
```
3. Execute the following command. Change `TUMX.yaml` to TUM1.yaml,TUM2.yaml or TUM3.yaml for freiburg1, freiburg2 and freiburg3 sequences respectively. Change `PATH_TO_SEQUENCE_FOLDER`to the uncompressed sequence folder. Change `ASSOCIATIONS_FILE` to the path to the corresponding associations file.
```
./Examples/RGB-D/rgbd_tum Vocabulary/ORBvoc.txt Examples/RGB-D/TUMX.yaml PATH_TO_SEQUENCE_FOLDER ASSOCIATIONS_FILE
```
#7. ROS Examples
### Building the nodes for mono, stereo and RGB-D
1. Add the path including *Examples/ROS/ORB_SLAM2* to the ROS_PACKAGE_PATH environment variable. Open .bashrc file and add at the end the following line. Replace PATH by the folder where you cloned ORB_SLAM2:
```
export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:PATH/ORB_SLAM2/Examples/ROS
```
2. Go to *Examples/ROS/ORB_SLAM2* folder and execute:
```
mkdir build
cd build
cmake .. -DROS_BUILD_TYPE=Release
make -j
```
### Running Monocular Node
For a monocular input from topic `/camera/image_raw` run node ORB_SLAM2/Mono. You will need to provide the vocabulary file and a settings file. See the monocular examples above.
```
rosrun ORB_SLAM2 Mono PATH_TO_VOCABULARY PATH_TO_SETTINGS_FILE
```
### Running Stereo Node
For a stereo input from topic `/camera/left/image_raw` and `/camera/right/image_raw` run node ORB_SLAM2/Stereo. You will need to provide the vocabulary file and a settings file. If you **provide rectification matrices** (see Examples/Stereo/EuRoC.yaml example), the node will recitify the images online, **otherwise images must be pre-rectified**.
```
rosrun ORB_SLAM2 Stereo PATH_TO_VOCABULARY PATH_TO_SETTINGS_FILE ONLINE_RECTIFICATION
```
**Example**: Download a rosbag (e.g. V1_01_easy.bag) from the EuRoC dataset (http://projects.asl.ethz.ch/datasets/doku.php?id=kmavvisualinertialdatasets). Open 3 tabs on the terminal and run the following command at each tab:
```
roscore
```
```
rosrun ORB_SLAM2 Stereo Vocabulary/ORBvoc.txt Examples/Stereo/EuRoC.yaml true
```
```
rosbag play --pause V1_01_easy.bag /cam0/image_raw:=/camera/left/image_raw /cam1/image_raw:=/camera/right/image_raw
```
Once ORB-SLAM2 has loaded the vocabulary, press space in the rosbag tab. Enjoy!. Note: a powerful computer is required to run the most exigent sequences of this dataset.
### Running RGB_D Node
For an RGB-D input from topics `/camera/rgb/image_raw` and `/camera/depth_re
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
SLAM-密集点云版本的ORB-SLAM2算法实现-优质项目实战.zip (233个子文件)
os_specific.c 2KB
Tracking.cc 51KB
ORBmatcher.cc 48KB
ORBextractor.cc 43KB
Optimizer.cc 40KB
PnPsolver.cc 28KB
Initializer.cc 26KB
LoopClosing.cc 25KB
LocalMapping.cc 23KB
Frame.cc 20KB
KeyFrame.cc 18KB
System.cc 14KB
Sim3Solver.cc 11KB
MapPoint.cc 11KB
KeyFrameDatabase.cc 10KB
MapDrawer.cc 7KB
stereo_euroc.cc 7KB
Viewer.cc 6KB
FrameDrawer.cc 6KB
ros_stereo.cc 5KB
rgbd_tum.cc 5KB
stereo_kitti.cc 5KB
train_vocabulary.cc 5KB
mono_kitti.cc 4KB
mono_euroc.cc 4KB
mono_tum.cc 4KB
ros_rgbd.cc 4KB
pointcloudmapping.cc 4KB
Converter.cc 4KB
Map.cc 3KB
ros_mono.cc 2KB
rgbd_my.cc 2KB
bin_vocabulary.cc 2KB
FindBLAS.cmake 13KB
FindLAPACK.cmake 10KB
FindG2O.cmake 3KB
FindEigen3.cmake 3KB
FindEigen3.cmake 3KB
FindCholmod.cmake 2KB
optimizable_graph.cpp 27KB
sparse_optimizer.cpp 20KB
types_six_dof_expmap.cpp 10KB
estimate_propagator.cpp 10KB
hyper_dijkstra.cpp 9KB
hyper_graph_action.cpp 9KB
optimization_algorithm_dogleg.cpp 8KB
ScoringObject.cpp 8KB
marginal_covariance_cholesky.cpp 7KB
optimization_algorithm_levenberg.cpp 7KB
factory.cpp 6KB
types_seven_dof_expmap.cpp 6KB
cache.cpp 5KB
Timestamp.cpp 5KB
string_tools.cpp 5KB
robust_kernel_impl.cpp 5KB
optimization_algorithm_factory.cpp 5KB
parameter_container.cpp 4KB
FORB.cpp 4KB
hyper_graph.cpp 4KB
timeutil.cpp 4KB
matrix_structure.cpp 3KB
optimization_algorithm_with_hessian.cpp 3KB
optimization_algorithm_gauss_newton.cpp 3KB
property.cpp 3KB
robust_kernel_factory.cpp 3KB
jacobian_workspace.cpp 3KB
batch_stats.cpp 3KB
sparse_block_matrix_test.cpp 3KB
Random.cpp 3KB
BowVector.cpp 3KB
solver.cpp 3KB
optimization_algorithm.cpp 2KB
types_sba.cpp 2KB
FeatureVector.cpp 2KB
robust_kernel.cpp 2KB
parameter.cpp 2KB
tools.cpp 394B
ORBvoc.txt.tar.gz 40.56MB
TemplatedVocabulary.h 44KB
optimizable_graph.h 25KB
sparse_optimizer.h 12KB
sparse_block_matrix_ccs.h 11KB
sparse_block_matrix.h 9KB
linear_solver_eigen.h 9KB
se3quat.h 8KB
hyper_graph.h 8KB
hyper_graph_action.h 8KB
block_solver.h 7KB
sim3.h 7KB
Frame.h 7KB
KeyFrame.h 7KB
Tracking.h 6KB
PnPsolver.h 6KB
estimate_propagator.h 6KB
optimization_algorithm_factory.h 6KB
types_six_dof_expmap.h 6KB
factory.h 6KB
System.h 6KB
types_seven_dof_expmap.h 6KB
solver.h 5KB
共 233 条
- 1
- 2
- 3
资源评论
极智视界
- 粉丝: 2w+
- 资源: 1330
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功