Authors: Justin Bi, Li Chen, Pradeep Suresh, Yicheng Tao, Yuliang Zhu
FAST Dynamic ORB-SLAM2 is a near real-time SLAM library that is built on ORB-SLAM 2 by Mur-Artal et al. It attempts to mitigate the error introduced by dynamic objects in the SLAM system on RGB-D cameras. See our other repository for related work: https://github.com/bijustin/YOLO-DynaSLAM
Our paper is located here: https://github.com/bijustin/Fast-Dynamic-ORB-SLAM/blob/master/dynamic-orb-slam.pdf
Our video is located here: https://www.youtube.com/watch?v=sazkFVVjITQ
In the project, Firstly, ORB featurematches between two close frames are found. Secondly,the fundamental matrix is solved using the RANSACalgorithm. The third step is calculating the epipolar lines(corresponding to the outlier matches) in the secondframe, and calculate the distance between the feature points and the epipolar lines. If the distance is greaterthan some threshold, then we consider its corresponding feature point to be part of the moving object.
Finally, we utilize optical flow's angle's relation to optimize our results.
The following are the results using TUM dataset.
FAST Dynamic ORB-SLAM2 is based on ORB-SLAM2, and as such is released under a GPLv3 license. For a list of all code/library dependencies (and associated licenses), please see Dependencies.md.
FAST Dynamic ORB-SLAM 2 has been tested in Ubuntu 18.04, but should be fine to compile on other platforms. A powerful CPU will result in real-time results.
FAST Dynamic ORB-SLAM 2 is developed based on ORB-SLAM 2, and uses no additional libraries. Thus, the required libraries are the same, as follows:
We use the new thread and chrono functionalities of C++11.
We use Pangolin for visualization and user interface. Dowload and install instructions can be found at: https://github.com/stevenlovegrove/Pangolin.
We use OpenCV 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 and OpenCV 3.2.
Required by g2o (see below). Download and install instructions can be found at: http://eigen.tuxfamily.org. Required at least 3.1.0.
We use modified versions of the DBoW2 library to perform place recognition and g2o library to perform non-linear optimizations. Both modified libraries (which are BSD) are included in the Thirdparty folder.
Clone the repository:
git clone https://github.com/bijustin/Fast-Dynamic-ORB-SLAM.git FASTORB_SLAM2
We provide a script build.sh
to build the Thirdparty libraries and FAST Dynamic ORB-SLAM2. Please make sure you have installed all required dependencies (see section 2). Execute:
cd FASTORB_SLAM2
chmod +x build.sh
./build.sh
This will create libORB_SLAM2.so at lib folder and the executable rgbd_tum in Examples folder.
-
Download a sequence from http://vision.in.tum.de/data/datasets/rgbd-dataset/download and uncompress it.
-
Associate RGB images and depth images using the python script associate.py. 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
- Execute the following command. Change
TUMX.yaml
to TUM1.yaml,TUM2.yaml or TUM3.yaml for freiburg1, freiburg2 and freiburg3 sequences respectively. ChangePATH_TO_SEQUENCE_FOLDER
to the uncompressed sequence folder. ChangeASSOCIATIONS_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