Viewer.h
Go to the documentation of this file.
1 
22 #ifndef VIEWER_H
23 #define VIEWER_H
24 
25 #include "FrameDrawer.h"
26 #include "MapDrawer.h"
27 #include "Tracking.h"
28 #include "System.h"
29 
30 #include <mutex>
31 
32 namespace ORB_SLAM2
33 {
34 
35 class Tracking;
36 class FrameDrawer;
37 class MapDrawer;
38 class System;
39 
40 class Viewer
41 {
42 public:
43  Viewer(System* pSystem, FrameDrawer* pFrameDrawer, MapDrawer* pMapDrawer, Tracking *pTracking, const string &strSettingPath);
44 
45  // Main thread function. Draw points, keyframes, the current camera pose and the last processed
46  // frame. Drawing is refreshed according to the camera fps. We use Pangolin.
47  void Run();
48 
49  void RequestFinish();
50 
51  void RequestStop();
52 
53  bool isFinished();
54 
55  bool isStopped();
56 
57  void Release();
58 
59 private:
60 
61  bool Stop();
62 
67 
68  // 1/fps in ms
69  double mT;
71 
73 
74  bool CheckFinish();
75  void SetFinish();
77  bool mbFinished;
78  std::mutex mMutexFinish;
79 
80  bool mbStopped;
82  std::mutex mMutexStop;
83 
84 };
85 
86 }
87 
88 
89 #endif // VIEWER_H
90 
91 
std::mutex mMutexStop
Definition: Viewer.h:82
float mImageWidth
Definition: Viewer.h:70
MapDrawer * mpMapDrawer
Definition: Viewer.h:65
bool mbFinished
Definition: Viewer.h:77
bool mbFinishRequested
Definition: Viewer.h:76
System * mpSystem
Definition: Viewer.h:63
float mViewpointZ
Definition: Viewer.h:72
bool mbStopRequested
Definition: Viewer.h:81
std::mutex mMutexFinish
Definition: Viewer.h:78
Viewer(System *pSystem, FrameDrawer *pFrameDrawer, MapDrawer *pMapDrawer, Tracking *pTracking, const string &strSettingPath)
float mImageHeight
Definition: Viewer.h:70
float mViewpointX
Definition: Viewer.h:72
float mViewpointY
Definition: Viewer.h:72
Tracking * mpTracker
Definition: Viewer.h:66
float mViewpointF
Definition: Viewer.h:72
FrameDrawer * mpFrameDrawer
Definition: Viewer.h:64
bool mbStopped
Definition: Viewer.h:80


orb_slam2_with_maps_odom
Author(s): teng zhang
autogenerated on Fri Sep 25 2020 03:24:47