Skip to content

Commit a257f54

Browse files
committed
Fix bug
1 parent aac9b96 commit a257f54

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

include/Tracking.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class Tracking
5454
{
5555

5656
public:
57-
Tracking(ORBVocabulary* pVoc, FrameDrawer* pFrameDrawer, MapDrawer* pMapDrawer, Map* pMap,
57+
Tracking(System* pSys, ORBVocabulary* pVoc, FrameDrawer* pFrameDrawer, MapDrawer* pMapDrawer, Map* pMap,
5858
KeyFrameDatabase* pKFDB, const string &strSettingPath, const int sensor);
5959

6060
// Preprocess the input and call Track(). Extract features and performs stereo matching.

src/System.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ System::System(const string &strVocFile, const string &strSettingsFile, const eS
8282

8383
//Initialize the Tracking thread
8484
//(it will live in the main thread of execution, the one that called this constructor)
85-
mpTracker = new Tracking(mpVocabulary, mpFrameDrawer, mpMapDrawer,
85+
mpTracker = new Tracking(this, mpVocabulary, mpFrameDrawer, mpMapDrawer,
8686
mpMap, mpKeyFrameDatabase, strSettingsFile, mSensor);
8787

8888
//Initialize the Local Mapping thread and launch

src/Tracking.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ using namespace std;
4343
namespace ORB_SLAM2
4444
{
4545

46-
Tracking::Tracking(ORBVocabulary* pVoc, FrameDrawer *pFrameDrawer, MapDrawer *pMapDrawer, Map *pMap, KeyFrameDatabase* pKFDB, const string &strSettingPath, const int sensor):
46+
Tracking::Tracking(System *pSys, ORBVocabulary* pVoc, FrameDrawer *pFrameDrawer, MapDrawer *pMapDrawer, Map *pMap, KeyFrameDatabase* pKFDB, const string &strSettingPath, const int sensor):
4747
mState(NO_IMAGES_YET), mSensor(sensor), mbOnlyTracking(false), mbVO(false), mpORBVocabulary(pVoc),
48-
mpKeyFrameDB(pKFDB), mpInitializer(static_cast<Initializer*>(NULL)),
48+
mpKeyFrameDB(pKFDB), mpInitializer(static_cast<Initializer*>(NULL)), mpSystem(pSys),
4949
mpFrameDrawer(pFrameDrawer), mpMapDrawer(pMapDrawer), mpMap(pMap), mnLastRelocFrameId(0)
5050
{
5151
// Load camera parameters from settings file
@@ -474,7 +474,7 @@ void Tracking::Track()
474474
if(mpMap->KeyFramesInMap()<=5)
475475
{
476476
cout << "Track lost soon after initialisation, reseting..." << endl;
477-
Reset();
477+
mpSystem->Reset();
478478
return;
479479
}
480480
}

0 commit comments

Comments
 (0)