Learn ORBSLAM2 and divide the source code into many parts according to their function which can be easily built by the learner from my blog: https://www.cnblogs.com/yepeichu/category/1356379.html.
OpenCV 3.X: You must make sure you have OpenCV 3.0 in your environment. All my code test on Ubuntu14.04, OpenCV3.2+contribute.