Skip to content

Commit 44fd9e9

Browse files
committed
first commit
0 parents  commit 44fd9e9

File tree

255 files changed

+121206
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

255 files changed

+121206
-0
lines changed

Diff for: CMakeLists.txt

+138
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
cmake_minimum_required(VERSION 2.8)
2+
project(ORB_SLAM2)
3+
4+
IF(NOT CMAKE_BUILD_TYPE)
5+
SET(CMAKE_BUILD_TYPE Release)
6+
ENDIF()
7+
8+
MESSAGE("Build type: " ${CMAKE_BUILD_TYPE})
9+
10+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -O3 -march=native ")
11+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -O3 -march=native")
12+
13+
# Check C++11 or C++0x support
14+
include(CheckCXXCompilerFlag)
15+
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
16+
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
17+
if(COMPILER_SUPPORTS_CXX11)
18+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
19+
add_definitions(-DCOMPILEDWITHC11)
20+
message(STATUS "Using flag -std=c++11.")
21+
elseif(COMPILER_SUPPORTS_CXX0X)
22+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
23+
add_definitions(-DCOMPILEDWITHC0X)
24+
message(STATUS "Using flag -std=c++0x.")
25+
else()
26+
message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
27+
endif()
28+
29+
LIST(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake_modules)
30+
31+
find_package(OpenCV 2.4.3 REQUIRED)
32+
find_package(Eigen3 3.1.0 REQUIRED)
33+
find_package(Pangolin REQUIRED)
34+
find_package(Cholmod REQUIRED)
35+
36+
include_directories(
37+
${PROJECT_SOURCE_DIR}
38+
${PROJECT_SOURCE_DIR}/include
39+
${PROJECT_SOURCE_DIR}/src
40+
${EIGEN3_INCLUDE_DIR}
41+
${Pangolin_INCLUDE_DIRS}
42+
${CHOLMOD_INCLUDE_DIR}
43+
)
44+
45+
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib)
46+
47+
add_library(${PROJECT_NAME} SHARED
48+
src/System.cc
49+
src/Tracking.cc
50+
src/LocalMapping.cc
51+
src/LoopClosing.cc
52+
src/ORBextractor.cc
53+
src/ORBmatcher.cc
54+
src/FrameDrawer.cc
55+
src/Converter.cc
56+
src/MapPoint.cc
57+
src/KeyFrame.cc
58+
src/Map.cc
59+
src/MapDrawer.cc
60+
src/Optimizer.cc
61+
src/PnPsolver.cc
62+
src/Frame.cc
63+
src/KeyFrameDatabase.cc
64+
src/Sim3Solver.cc
65+
src/Initializer.cc
66+
src/Viewer.cc
67+
68+
include/Frame.h
69+
include/KeyFrame.h
70+
include/Tracking.h
71+
include/LocalMapping.h
72+
73+
src/IMU/configparam.h
74+
src/IMU/configparam.cpp
75+
76+
src/IMU/imudata.h
77+
src/IMU/imudata.cpp
78+
src/IMU/IMUPreintegrator.h
79+
src/IMU/IMUPreintegrator.cpp
80+
src/IMU/so3.cpp
81+
src/IMU/so3.h
82+
src/IMU/NavState.h
83+
src/IMU/NavState.cpp
84+
85+
src/IMU/g2otypes.h
86+
src/IMU/g2otypes.cpp
87+
)
88+
89+
target_link_libraries(${PROJECT_NAME}
90+
${OpenCV_LIBS}
91+
${EIGEN3_LIBS}
92+
${Pangolin_LIBRARIES}
93+
${PROJECT_SOURCE_DIR}/Thirdparty/DBoW2/lib/libDBoW2.so
94+
${PROJECT_SOURCE_DIR}/Thirdparty/g2o/lib/libg2o.so
95+
cholmod
96+
${CHOLMOD_LIBRARIES}
97+
${BLAS_LIBRARIES}
98+
${LAPACK_LIBRARIES}
99+
)
100+
101+
## Build examples
102+
103+
#set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/Examples/RGB-D)
104+
105+
#add_executable(rgbd_tum
106+
#Examples/RGB-D/rgbd_tum.cc)
107+
#target_link_libraries(rgbd_tum ${PROJECT_NAME})
108+
109+
#set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/Examples/Stereo)
110+
111+
#add_executable(stereo_kitti
112+
#Examples/Stereo/stereo_kitti.cc)
113+
#target_link_libraries(stereo_kitti ${PROJECT_NAME})
114+
115+
#add_executable(stereo_euroc
116+
#Examples/Stereo/stereo_euroc.cc)
117+
#target_link_libraries(stereo_euroc ${PROJECT_NAME})
118+
119+
120+
#set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/Examples/Monocular)
121+
122+
#add_executable(mono_tum
123+
#Examples/Monocular/mono_tum.cc)
124+
#target_link_libraries(mono_tum ${PROJECT_NAME})
125+
126+
#add_executable(mono_kitti
127+
#Examples/Monocular/mono_kitti.cc)
128+
#target_link_libraries(mono_kitti ${PROJECT_NAME})
129+
130+
#add_executable(mono_euroc
131+
#Examples/Monocular/mono_euroc.cc)
132+
#target_link_libraries(mono_euroc ${PROJECT_NAME})
133+
134+
## Build tools
135+
#set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/tools)
136+
#add_executable(bin_vocabulary
137+
#tools/bin_vocabulary.cc)
138+
#target_link_libraries(bin_vocabulary ${PROJECT_NAME})

Diff for: Dependencies.md

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
##List of Known Dependencies
2+
###ORB-SLAM2 version 1.0
3+
4+
In this document we list all the pieces of code included by ORB-SLAM2 and linked libraries which are not property of the authors of ORB-SLAM2.
5+
6+
7+
#####Code in **src** and **include** folders
8+
9+
* *ORBextractor.cc*.
10+
This is a modified version of orb.cpp of OpenCV library. The original code is BSD licensed.
11+
12+
* *PnPsolver.h, PnPsolver.cc*.
13+
This is a modified version of the epnp.h and epnp.cc of Vincent Lepetit.
14+
This code can be found in popular BSD licensed computer vision libraries as [OpenCV](https://github.com/Itseez/opencv/blob/master/modules/calib3d/src/epnp.cpp) and [OpenGV](https://github.com/laurentkneip/opengv/blob/master/src/absolute_pose/modules/Epnp.cpp). The original code is FreeBSD.
15+
16+
* Function *ORBmatcher::DescriptorDistance* in *ORBmatcher.cc*.
17+
The code is from: http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetParallel.
18+
The code is in the public domain.
19+
20+
#####Code in Thirdparty folder
21+
22+
* All code in **DBoW2** folder.
23+
This is a modified version of [DBoW2](https://github.com/dorian3d/DBoW2) and [DLib](https://github.com/dorian3d/DLib) library. All files included are BSD licensed.
24+
25+
* All code in **g2o** folder.
26+
This is a modified version of [g2o](https://github.com/RainerKuemmerle/g2o). All files included are BSD licensed.
27+
28+
#####Library dependencies
29+
30+
* **Pangolin (visualization and user interface)**.
31+
[MIT license](https://en.wikipedia.org/wiki/MIT_License).
32+
33+
* **OpenCV**.
34+
BSD license.
35+
36+
* **Eigen3**.
37+
For versions greater than 3.1.1 is MPL2, earlier versions are LGPLv3.
38+
39+
* **BLAS** (required by g2o).
40+
[Freely-available software](http://www.netlib.org/blas/#_licensing).
41+
42+
* **LAPACK**(required by g2o).
43+
BSD license.
44+
45+
* **ROS (Optional, only if you build Examples/ROS)**.
46+
BSD license. In the manifest.xml the only declared package dependencies are roscpp, tf, sensor_msgs, image_transport, cv_bridge, which are all BSD licensed.
47+
48+
49+
50+

Diff for: Examples/Monocular/EuRoC.yaml

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
%YAML:1.0
2+
3+
#--------------------------------------------------------------------------------------------
4+
# Camera Parameters. Adjust them!
5+
#--------------------------------------------------------------------------------------------
6+
7+
# Camera calibration and distortion parameters (OpenCV)
8+
Camera.fx: 458.654
9+
Camera.fy: 457.296
10+
Camera.cx: 367.215
11+
Camera.cy: 248.375
12+
13+
Camera.k1: -0.28340811
14+
Camera.k2: 0.07395907
15+
Camera.p1: 0.00019359
16+
Camera.p2: 1.76187114e-05
17+
18+
# Camera frames per second
19+
Camera.fps: 20.0
20+
21+
# Color order of the images (0: BGR, 1: RGB. It is ignored if images are grayscale)
22+
Camera.RGB: 1
23+
24+
#--------------------------------------------------------------------------------------------
25+
# ORB Parameters
26+
#--------------------------------------------------------------------------------------------
27+
28+
# ORB Extractor: Number of features per image
29+
ORBextractor.nFeatures: 1000
30+
31+
# ORB Extractor: Scale factor between levels in the scale pyramid
32+
ORBextractor.scaleFactor: 1.2
33+
34+
# ORB Extractor: Number of levels in the scale pyramid
35+
ORBextractor.nLevels: 8
36+
37+
# ORB Extractor: Fast threshold
38+
# Image is divided in a grid. At each cell FAST are extracted imposing a minimum response.
39+
# Firstly we impose iniThFAST. If no corners are detected we impose a lower value minThFAST
40+
# You can lower these values if your images have low contrast
41+
ORBextractor.iniThFAST: 20
42+
ORBextractor.minThFAST: 7
43+
44+
#--------------------------------------------------------------------------------------------
45+
# Viewer Parameters
46+
#---------------------------------------------------------------------------------------------
47+
Viewer.KeyFrameSize: 0.05
48+
Viewer.KeyFrameLineWidth: 1
49+
Viewer.GraphLineWidth: 0.9
50+
Viewer.PointSize:2
51+
Viewer.CameraSize: 0.08
52+
Viewer.CameraLineWidth: 3
53+
Viewer.ViewpointX: 0
54+
Viewer.ViewpointY: -0.7
55+
Viewer.ViewpointZ: -1.8
56+
Viewer.ViewpointF: 500
57+

0 commit comments

Comments
 (0)