16 | # Redistribution and use is allowed according to the terms of the 2-clause BSD license.
17 |
18 | if(NOT Eigen3_FIND_VERSION)
19 | if(NOT Eigen3_FIND_VERSION_MAJOR)
20 | set(Eigen3_FIND_VERSION_MAJOR 2)
21 | endif(NOT Eigen3_FIND_VERSION_MAJOR)
22 | if(NOT Eigen3_FIND_VERSION_MINOR)
23 | set(Eigen3_FIND_VERSION_MINOR 91)
24 | endif(NOT Eigen3_FIND_VERSION_MINOR)
25 | if(NOT Eigen3_FIND_VERSION_PATCH)
26 | set(Eigen3_FIND_VERSION_PATCH 0)
27 | endif(NOT Eigen3_FIND_VERSION_PATCH)
28 |
29 | set(Eigen3_FIND_VERSION "${Eigen3_FIND_VERSION_MAJOR}.${Eigen3_FIND_VERSION_MINOR}.${Eigen3_FIND_VERSION_PATCH}")
30 | endif(NOT Eigen3_FIND_VERSION)
31 |
32 | macro(_eigen3_check_version)
33 | file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen3_version_header)
34 |
35 | string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen3_world_version_match "${_eigen3_version_header}")
36 | set(EIGEN3_WORLD_VERSION "${CMAKE_MATCH_1}")
37 | string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen3_major_version_match "${_eigen3_version_header}")
38 | set(EIGEN3_MAJOR_VERSION "${CMAKE_MATCH_1}")
39 | string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen3_minor_version_match "${_eigen3_version_header}")
40 | set(EIGEN3_MINOR_VERSION "${CMAKE_MATCH_1}")
41 |
42 | set(EIGEN3_VERSION ${EIGEN3_WORLD_VERSION}.${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION})
43 | if(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
44 | set(EIGEN3_VERSION_OK FALSE)
45 | else(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
46 | set(EIGEN3_VERSION_OK TRUE)
47 | endif(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
48 |
49 | if(NOT EIGEN3_VERSION_OK)
50 |
51 | message(STATUS "Eigen3 version ${EIGEN3_VERSION} found in ${EIGEN3_INCLUDE_DIR}, "
52 | "but at least version ${Eigen3_FIND_VERSION} is required")
53 | endif(NOT EIGEN3_VERSION_OK)
54 | endmacro(_eigen3_check_version)
55 |
56 | if (EIGEN3_INCLUDE_DIR)
57 |
58 | # in cache already
59 | _eigen3_check_version()
60 | set(EIGEN3_FOUND ${EIGEN3_VERSION_OK})
61 |
62 | else (EIGEN3_INCLUDE_DIR)
63 |
64 | # specific additional paths for some OS
65 | if (WIN32)
66 | set(EIGEN_ADDITIONAL_SEARCH_PATHS ${EIGEN_ADDITIONAL_SEARCH_PATHS} "C:/Program Files/Eigen/include" "C:/Program Files (x86)/Eigen/include")
67 | endif(WIN32)
68 |
69 | find_path(EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library
70 | PATHS
71 | /home/guoqing/libraries/eigen_333/include
72 | ${CMAKE_INSTALL_PREFIX}/include
73 | ${EIGEN_ADDITIONAL_SEARCH_PATHS}
74 | ${KDE4_INCLUDE_DIR}
75 | PATH_SUFFIXES eigen3 eigen
76 | )
77 |
78 | if(EIGEN3_INCLUDE_DIR)
79 | _eigen3_check_version()
80 | endif(EIGEN3_INCLUDE_DIR)
81 |
82 | include(FindPackageHandleStandardArgs)
83 | find_package_handle_standard_args(Eigen3 DEFAULT_MSG EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK)
84 |
85 | mark_as_advanced(EIGEN3_INCLUDE_DIR)
86 |
87 | endif(EIGEN3_INCLUDE_DIR)
88 |
89 |
--------------------------------------------------------------------------------
/doc/Link to index.html:
--------------------------------------------------------------------------------
1 | c:/home/guoqing/SLAM/ORBS/self_commit/doc/html/index.html
--------------------------------------------------------------------------------
/doc/imgs/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DreamWaterFound/self_commit_ORB-SLAM2/78d7165f29ce110b9e89744d3cee2c789b3d5956/doc/imgs/1.png
--------------------------------------------------------------------------------
/doc/imgs/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DreamWaterFound/self_commit_ORB-SLAM2/78d7165f29ce110b9e89744d3cee2c789b3d5956/doc/imgs/2.png
--------------------------------------------------------------------------------
/doc/imgs/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DreamWaterFound/self_commit_ORB-SLAM2/78d7165f29ce110b9e89744d3cee2c789b3d5956/doc/imgs/3.png
--------------------------------------------------------------------------------
/doc/imgs/4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DreamWaterFound/self_commit_ORB-SLAM2/78d7165f29ce110b9e89744d3cee2c789b3d5956/doc/imgs/4.png
--------------------------------------------------------------------------------
/doc/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Redirecting now, please wait ...
10 |
11 |
12 |
--------------------------------------------------------------------------------
/genDoxy.sh:
--------------------------------------------------------------------------------
1 | doxygen ./doc/Doxyfile
2 |
--------------------------------------------------------------------------------
/include/FrameDrawer.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file FrameDrawer.h
3 | * @author guoqing (1337841346@qq.com)
4 | * @brief 帧绘制器的定义
5 | * @version 0.1
6 | * @date 2019-02-19
7 | *
8 | * @copyright Copyright (c) 2019
9 | *
10 | */
11 |
12 | /**
13 | * This file is part of ORB-SLAM2.
14 | *
15 | * Copyright (C) 2014-2016 Raúl Mur-Artal (University of Zaragoza)
16 | * For more information see
17 | *
18 | * ORB-SLAM2 is free software: you can redistribute it and/or modify
19 | * it under the terms of the GNU General Public License as published by
20 | * the Free Software Foundation, either version 3 of the License, or
21 | * (at your option) any later version.
22 | *
23 | * ORB-SLAM2 is distributed in the hope that it will be useful,
24 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 | * GNU General Public License for more details.
27 | *
28 | * You should have received a copy of the GNU General Public License
29 | * along with ORB-SLAM2. If not, see .
30 | */
31 |
32 |
33 | #ifndef FRAMEDRAWER_H
34 | #define FRAMEDRAWER_H
35 |
36 | #include "Tracking.h"
37 | #include "MapPoint.h"
38 | #include "Map.h"
39 |
40 | #include
41 | #include
42 |
43 | #include
44 |
45 |
46 | namespace ORB_SLAM2
47 | {
48 |
49 | class Tracking;
50 | class Viewer;
51 |
52 | class FrameDrawer
53 | {
54 | public:
55 | /**
56 | * @brief 构造函数
57 | *
58 | * @param[in] pMap 地图指针
59 | */
60 | FrameDrawer(Map* pMap);
61 |
62 | // Update info from the last processed frame.
63 | /**
64 | * @brief 将跟踪线程的数据拷贝到绘图线程(图像、特征点、地图、跟踪状态)
65 | *
66 | * @param[in] pTracker 追踪线程
67 | */
68 | void Update(Tracking *pTracker);
69 |
70 | // Draw last processed frame.
71 | //
72 | /**
73 | * @brief 绘制最近处理过的帧,这个将会在可视化查看器的窗口中被创建
74 | *
75 | * @return cv::Mat 返回绘制完成的图像,可以直接进行显示
76 | */
77 | cv::Mat DrawFrame();
78 |
79 | protected:
80 |
81 | /**
82 | * @brief 绘制底部的信息栏
83 | *
84 | * @param[in] im 原始图像
85 | * @param[in] nState 当前系统的工作状态
86 | * @param[out] imText 叠加后的图像
87 | */
88 | void DrawTextInfo(cv::Mat &im, int nState, cv::Mat &imText);
89 |
90 | // Info of the frame to be drawn
91 | ///当前绘制的图像
92 | cv::Mat mIm;
93 | ///当前帧中特征点的数目
94 | int N;
95 | ///当前帧中的特征点
96 | vector mvCurrentKeys;
97 | ///当前帧中的特征点是否在地图中的标记
98 | ///当前帧的特征点在地图中是否出现;后者是表示地图中没有出现,但是在当前帧中是第一次被观测得到的点
99 | vector mvbMap, mvbVO;
100 | ///当前是否是只有追踪线程在工作;或者说,当前是处于定位模式还是处于SLAM模式
101 | bool mbOnlyTracking;
102 | ///当前帧中追踪到的特征点计数
103 | int mnTracked, mnTrackedVO;
104 | ///参考帧中的特征点
105 | vector mvIniKeys;
106 | ///当前帧特征点和参考帧特征点的匹配关系
107 | vector mvIniMatches;
108 | ///当前SLAM系统的工作状态
109 | int mState;
110 |
111 | ///地图指针
112 | Map* mpMap;
113 |
114 | //线程锁
115 | std::mutex mMutex;
116 | };
117 |
118 | } //namespace ORB_SLAM
119 |
120 | #endif // FRAMEDRAWER_H
121 |
--------------------------------------------------------------------------------
/include/KeyFrameDatabase.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file KeyFrameDatabase.h
3 | * @author guoqing (1337841346@qq.com)
4 | * @brief 关键帧数据库,用于回环检测和重定位
5 | * @version 0.1
6 | * @date 2019-04-25
7 | *
8 | * @copyright Copyright (c) 2019
9 | *
10 | */
11 |
12 | /**
13 | * This file is part of ORB-SLAM2.
14 | *
15 | * Copyright (C) 2014-2016 Raúl Mur-Artal (University of Zaragoza)
16 | * For more information see
17 | *
18 | * ORB-SLAM2 is free software: you can redistribute it and/or modify
19 | * it under the terms of the GNU General Public License as published by
20 | * the Free Software Foundation, either version 3 of the License, or
21 | * (at your option) any later version.
22 | *
23 | * ORB-SLAM2 is distributed in the hope that it will be useful,
24 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 | * GNU General Public License for more details.
27 | *
28 | * You should have received a copy of the GNU General Public License
29 | * along with ORB-SLAM2. If not, see .
30 | */
31 |
32 | #ifndef KEYFRAMEDATABASE_H
33 | #define KEYFRAMEDATABASE_H
34 |
35 | #include
36 | #include
37 | #include
38 |
39 | #include "KeyFrame.h"
40 | #include "Frame.h"
41 | #include "ORBVocabulary.h"
42 |
43 | #include
44 |
45 |
46 | namespace ORB_SLAM2
47 | {
48 |
49 | class KeyFrame;
50 | class Frame;
51 |
52 | /** @brief 关键帧数据库 */
53 | class KeyFrameDatabase
54 | {
55 | public:
56 |
57 | /**
58 | * @brief 构造函数
59 | * @param[in] voc 词袋模型的字典
60 | */
61 | KeyFrameDatabase(const ORBVocabulary &voc);
62 |
63 | /**
64 | * @brief 根据关键帧的词包,更新数据库的倒排索引
65 | * @param pKF 关键帧
66 | */
67 | void add(KeyFrame* pKF);
68 |
69 | /**
70 | * @brief 关键帧被删除后,更新数据库的倒排索引
71 | * @param pKF 关键帧
72 | */
73 | void erase(KeyFrame* pKF);
74 |
75 | /** @brief 清空关键帧数据库 */
76 | void clear();
77 |
78 | /**
79 | * @brief 在闭环检测中找到与该关键帧可能闭环的关键帧
80 | * @param pKF 需要闭环的关键帧
81 | * @param minScore 相似性分数最低要求
82 | * @return 可能闭环的关键帧
83 | * @see III-E Bags of Words Place Recognition
84 | */
85 | std::vector DetectLoopCandidates(KeyFrame* pKF, float minScore);
86 |
87 | // Relocalization
88 | /**
89 | * @brief 在重定位中找到与该帧相似的关键帧
90 | * 1. 找出和当前帧具有公共单词的所有关键帧
91 | * 2. 只和具有共同单词较多的关键帧进行相似度计算
92 | * 3. 将与关键帧相连(权值最高)的前十个关键帧归为一组,计算累计得分
93 | * 4. 只返回累计得分较高的组中分数最高的关键帧
94 | * @param F 需要重定位的帧
95 | * @return 相似的关键帧
96 | * @see III-E Bags of Words Place Recognition
97 | */
98 | std::vector DetectRelocalizationCandidates(Frame* F);
99 |
100 | protected:
101 |
102 | // Associated vocabulary
103 | const ORBVocabulary* mpVoc; ///< 预先训练好的词典
104 |
105 | // Inverted file
106 | std::vector > mvInvertedFile; ///< 倒排索引,mvInvertedFile[i]表示包含了第i个word id的所有关键帧
107 |
108 | /// Mutex, 多用途的
109 | std::mutex mMutex;
110 | };
111 |
112 | } //namespace ORB_SLAM
113 |
114 | #endif
115 |
--------------------------------------------------------------------------------
/include/MapDrawer.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file MapDrawer.h
3 | * @author guoqing (1337841346@qq.com)
4 | * @brief 绘制地图点
5 | * @version 0.1
6 | * @date 2019-02-19
7 | *
8 | * @copyright Copyright (c) 2019
9 | *
10 | */
11 |
12 | /**
13 | * This file is part of ORB-SLAM2.
14 | *
15 | * Copyright (C) 2014-2016 Raúl Mur-Artal (University of Zaragoza)
16 | * For more information see
17 | *
18 | * ORB-SLAM2 is free software: you can redistribute it and/or modify
19 | * it under the terms of the GNU General Public License as published by
20 | * the Free Software Foundation, either version 3 of the License, or
21 | * (at your option) any later version.
22 | *
23 | * ORB-SLAM2 is distributed in the hope that it will be useful,
24 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 | * GNU General Public License for more details.
27 | *
28 | * You should have received a copy of the GNU General Public License
29 | * along with ORB-SLAM2. If not, see .
30 | */
31 |
32 | #ifndef MAPDRAWER_H
33 | #define MAPDRAWER_H
34 |
35 | #include"Map.h"
36 | #include"MapPoint.h"
37 | #include"KeyFrame.h"
38 | #include
39 |
40 | #include
41 |
42 | namespace ORB_SLAM2
43 | {
44 |
45 | class MapDrawer
46 | {
47 | public:
48 | /**
49 | * @brief 构造函数
50 | *
51 | * @param[in] pMap 地图句柄
52 | * @param[in] strSettingPath 配置文件的路径
53 | */
54 | MapDrawer(Map* pMap, const string &strSettingPath);
55 |
56 | //地图句柄
57 | Map* mpMap;
58 |
59 | /** @brief 绘制地图点 */
60 | void DrawMapPoints();
61 | /**
62 | * @brief 绘制关键帧
63 | *
64 | * @param[in] bDrawKF 是否绘制关键帧
65 | * @param[in] bDrawGraph 是否绘制共视图
66 | */
67 | void DrawKeyFrames(const bool bDrawKF, const bool bDrawGraph);
68 | /**
69 | * @brief 绘制当前相机
70 | *
71 | * @param[in] Twc 相机的位姿矩阵
72 | */
73 | void DrawCurrentCamera(pangolin::OpenGlMatrix &Twc);
74 | /**
75 | * @brief 设置当前帧的相机位姿
76 | *
77 | * @param[in] Tcw 位姿矩阵
78 | */
79 | void SetCurrentCameraPose(const cv::Mat &Tcw);
80 | /**
81 | * @brief 设置参考关键帧
82 | *
83 | * @param[in] pKF 参考关键帧的句柄
84 | */
85 | void SetReferenceKeyFrame(KeyFrame *pKF);
86 | /**
87 | * @brief 将相机位姿mCameraPose由Mat类型转化为OpenGlMatrix类型
88 | *
89 | * @param[out] M
90 | */
91 | void GetCurrentOpenGLCameraMatrix(pangolin::OpenGlMatrix &M);
92 |
93 | private:
94 |
95 | //绘制这些部件的参数
96 | ///关键帧-大小
97 | float mKeyFrameSize;
98 | ///关键帧-线宽
99 | float mKeyFrameLineWidth;
100 | ///共视图的线宽
101 | float mGraphLineWidth;
102 | ///地图点的大小
103 | float mPointSize;
104 | ///绘制的相机的大小
105 | float mCameraSize;
106 | ///绘制相机的线宽
107 | float mCameraLineWidth;
108 |
109 | ///相机位置
110 | cv::Mat mCameraPose;
111 |
112 | ///线程互斥量
113 | std::mutex mMutexCamera;
114 | };
115 |
116 | } //namespace ORB_SLAM
117 |
118 | #endif // MAPDRAWER_H
119 |
--------------------------------------------------------------------------------
/include/ORBVocabulary.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file ORBVocabulary.h
3 | * @author guoqing (1337841346@qq.com)
4 | * @brief 词袋模型相关
5 | * @version 0.1
6 | * @date 2019-04-26
7 | *
8 | * @copyright Copyright (c) 2019
9 | *
10 | */
11 |
12 | /**
13 | * This file is part of ORB-SLAM2.
14 | *
15 | * Copyright (C) 2014-2016 Raúl Mur-Artal (University of Zaragoza)
16 | * For more information see
17 | *
18 | * ORB-SLAM2 is free software: you can redistribute it and/or modify
19 | * it under the terms of the GNU General Public License as published by
20 | * the Free Software Foundation, either version 3 of the License, or
21 | * (at your option) any later version.
22 | *
23 | * ORB-SLAM2 is distributed in the hope that it will be useful,
24 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 | * GNU General Public License for more details.
27 | *
28 | * You should have received a copy of the GNU General Public License
29 | * along with ORB-SLAM2. If not, see .
30 | */
31 |
32 |
33 | #ifndef ORBVOCABULARY_H
34 | #define ORBVOCABULARY_H
35 |
36 | #include "Thirdparty/DBoW2/DBoW2/FORB.h"
37 | #include "Thirdparty/DBoW2/DBoW2/TemplatedVocabulary.h"
38 |
39 | namespace ORB_SLAM2
40 | {
41 | // 只是增加了一个自定义的数据类型罢了
42 | typedef DBoW2::TemplatedVocabulary
43 | ORBVocabulary;
44 |
45 | } //namespace ORB_SLAM
46 |
47 | #endif // ORBVOCABULARY_H
48 |
--------------------------------------------------------------------------------
/include/Viewer.h:
--------------------------------------------------------------------------------
1 | /**
2 | * @file Viewer.h
3 | * @author guoqing (1337841346@qq.com)
4 | * @brief 可视化查看器的声明
5 | * @version 0.1
6 | * @date 2019-02-19
7 | *
8 | * @copyright Copyright (c) 2019
9 | *
10 | */
11 |
12 | /**
13 | * This file is part of ORB-SLAM2.
14 | *
15 | * Copyright (C) 2014-2016 Raúl Mur-Artal (University of Zaragoza)
16 | * For more information see
17 | *
18 | * ORB-SLAM2 is free software: you can redistribute it and/or modify
19 | * it under the terms of the GNU General Public License as published by
20 | * the Free Software Foundation, either version 3 of the License, or
21 | * (at your option) any later version.
22 | *
23 | * ORB-SLAM2 is distributed in the hope that it will be useful,
24 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 | * GNU General Public License for more details.
27 | *
28 | * You should have received a copy of the GNU General Public License
29 | * along with ORB-SLAM2. If not, see .
30 | */
31 |
32 |
33 | #ifndef VIEWER_H
34 | #define VIEWER_H
35 |
36 | #include "FrameDrawer.h"
37 | #include "MapDrawer.h"
38 | #include "Tracking.h"
39 | #include "System.h"
40 |
41 | #include
42 |
43 | namespace ORB_SLAM2
44 | {
45 |
46 | class Tracking;
47 | class FrameDrawer;
48 | class MapDrawer;
49 | class System;
50 |
51 | class Viewer
52 | {
53 | public:
54 | /**
55 | * @brief 构造函数
56 | *
57 | * @param[in] pSystem 系统实例
58 | * @param[in] pFrameDrawer 帧绘制器
59 | * @param[in] pMapDrawer 地图绘制器
60 | * @param[in] pTracking 追踪线程
61 | * @param[in] strSettingPath 设置文件的路径
62 | */
63 | Viewer(System* pSystem, FrameDrawer* pFrameDrawer, MapDrawer* pMapDrawer, Tracking *pTracking, const string &strSettingPath);
64 |
65 | /**
66 | * @brief 进程的主函数, NOTICE 注意到这里提到了它是根据相机图像的更新帧率来绘制图像的
67 | * @detials Main thread function. Draw points, keyframes, the current camera pose and the last processed
68 | * frame. Drawing is refreshed according to the camera fps. We use Pangolin.
69 | */
70 | void Run();
71 |
72 | /** @brief 请求停止当前进程 */
73 | void RequestFinish();
74 |
75 | /** @brief 请求当前可视化进程暂停更新图像数据 */
76 | void RequestStop();
77 | /** @brief 当前是否有停止当前进程的请求 */
78 | bool isFinished();
79 | /** @brief 判断当前进程是否已经停止 */
80 | bool isStopped();
81 | /** @brief 释放变量,避免互斥关系 */
82 | void Release();
83 |
84 | private:
85 |
86 | /**
87 | * @brief 停止当前查看器的更新
88 | *
89 | * @return true 成功停止
90 | * @return false 失败,一般是因为查看器进程已经销毁或者是正在销毁
91 | */
92 | bool Stop();
93 |
94 | ///系统对象指针
95 | System* mpSystem;
96 | ///帧绘制器
97 | FrameDrawer* mpFrameDrawer;
98 | ///地图绘制器
99 | MapDrawer* mpMapDrawer;
100 | ///追踪线程句柄
101 | Tracking* mpTracker;
102 |
103 | // 1/fps in ms
104 | ///每一帧图像持续的时间
105 | double mT;
106 | ///图像的尺寸
107 | float mImageWidth, mImageHeight;
108 | ///显示窗口的的查看视角,最后一个是相机的焦距
109 | float mViewpointX, mViewpointY, mViewpointZ, mViewpointF;
110 |
111 | /**
112 | * @brief 检查当前查看器进程是否已经终止
113 | *
114 | * @return true
115 | * @return false
116 | */
117 | bool CheckFinish();
118 | /**
119 | * @brief 设置当前线程终止
120 | *
121 | */
122 | void SetFinish();
123 |
124 | ///请求结束当前线程的标志
125 | bool mbFinishRequested;
126 | //当前线程是否已经终止
127 | bool mbFinished;
128 | ///线程锁对象,用于锁住和finsh,终止当前查看器进程相关的变量
129 | //? 但是我现在还是不明白,它是怎么知道我的这个线程锁对象和我的这个线程产生绑定关系的
130 | std::mutex mMutexFinish;
131 |
132 | ///当前进程是否停止
133 | bool mbStopped;
134 | ///是否头停止请求
135 | bool mbStopRequested;
136 | ///用于锁住stop,停止更新变量相关的互斥量
137 | std::mutex mMutexStop;
138 |
139 | };
140 |
141 | }
142 |
143 |
144 | #endif // VIEWER_H
145 |
146 |
147 |
--------------------------------------------------------------------------------
/runTUM.sh:
--------------------------------------------------------------------------------
1 | ./Examples/Monocular/mono_tum Vocabulary/ORBvoc.txt Examples/Monocular/TUM1.yaml /home/guoqing/Datasets/fr1_xyz
--------------------------------------------------------------------------------