Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I got an error when I tried to compile orb_slam2 with ubuntu22. #1085

Open
MintonLee opened this issue Jun 22, 2023 · 0 comments
Open

I got an error when I tried to compile orb_slam2 with ubuntu22. #1085

MintonLee opened this issue Jun 22, 2023 · 0 comments

Comments

@MintonLee
Copy link

The environment I use is ubuntu22, opencv-3.4.10, Pangolin-0.5, and others are some default versions.

The error I encountered when executing ./build.sh is as follows

/home/lee22/vslam/ORB_SLAM2/src/System.cc: In member function ‘void ORB_SLAM2::System::SaveTrajectoryTUM(const string&)’:
/home/lee22/vslam/ORB_SLAM2/src/System.cc:348:60: error: ‘class ORB_SLAM2::Tracking’ has no member named ‘mlpReferences’; did you mean ‘ORB_SLAM2::KeyFrame* ORB_SLAM2::Tracking::mpReferenceKF’? (not accessible from this context)
348 | list<ORB_SLAM2::KeyFrame*>::iterator lRit = mpTracker->mlpReferences.begin();
| ^~~~~~~~~~~~~
In file included from /home/lee22/vslam/ORB_SLAM2/include/System.h:29,
from /home/lee22/vslam/ORB_SLAM2/src/System.cc:22:
/home/lee22/vslam/ORB_SLAM2/include/Tracking.h:174:15: note: declared protected here
174 | KeyFrame* mpReferenceKF;
| ^~~~~~~~~~~~~
/home/lee22/vslam/ORB_SLAM2/src/System.cc:349:44: error: ‘class ORB_SLAM2::Tracking’ has no member named ‘mlFrameTimes’
349 | list::iterator lT = mpTracker->mlFrameTimes.begin();
| ^~~~~~~~~~~~
/home/lee22/vslam/ORB_SLAM2/src/System.cc:350:43: error: ‘class ORB_SLAM2::Tracking’ has no member named ‘mlbLost’
350 | list::iterator lbL = mpTracker->mlbLost.begin();
| ^~~~~~~
/home/lee22/vslam/ORB_SLAM2/src/System.cc:351:48: error: ‘class ORB_SLAM2::Tracking’ has no member named ‘mlRelativeFramePoses’
351 | for(listcv::Mat::iterator lit=mpTracker->mlRelativeFramePoses.begin(),
| ^~~~~~~~~~~~~~~~~~~~
/home/lee22/vslam/ORB_SLAM2/src/System.cc:352:57: error: ‘lend’ was not declared in this scope
352 | lend=mpTracker->mlRelativeFramePoses.end();lit!=lend;lit++, lRit++, lT++, lbL++)
| ^~~~
/home/lee22/vslam/ORB_SLAM2/src/Tracking.cc: In member function ‘void ORB_SLAM2::Tracking::Track()’:
/home/lee22/vslam/ORB_SLAM2/src/Tracking.cc:491:9: error: ‘mlRelativeFramePoses’ was not declared in this scope
491 | mlRelativeFramePoses.push_back(Tcr);
| ^~~~~~~~~~~~~~~~~~~~
/home/lee22/vslam/ORB_SLAM2/src/System.cc: In member function ‘void ORB_SLAM2::System::SaveTrajectoryKITTI(const string&)’:
/home/lee22/vslam/ORB_SLAM2/src/System.cc:445:60: error: ‘class ORB_SLAM2::Tracking’ has no member named ‘mlpReferences’; did you mean ‘ORB_SLAM2::KeyFrame* ORB_SLAM2::Tracking::mpReferenceKF’? (not accessible from this context)
445 | list<ORB_SLAM2::KeyFrame*>::iterator lRit = mpTracker->mlpReferences.begin();
| ^~~~~~~~~~~~~
In file included from /home/lee22/vslam/ORB_SLAM2/include/System.h:29,
from /home/lee22/vslam/ORB_SLAM2/src/System.cc:22:
/home/lee22/vslam/ORB_SLAM2/include/Tracking.h:174:15: note: declared protected here
174 | KeyFrame* mpReferenceKF;
| ^~~~~~~~~~~~~
/home/lee22/vslam/ORB_SLAM2/src/System.cc:446:44: error: ‘class ORB_SLAM2::Tracking’ has no member named ‘mlFrameTimes’
446 | list::iterator lT = mpTracker->mlFrameTimes.begin();
| ^~~~~~~~~~~~
/home/lee22/vslam/ORB_SLAM2/src/System.cc:447:48: error: ‘class ORB_SLAM2::Tracking’ has no member named ‘mlRelativeFramePoses’
447 | for(listcv::Mat::iterator lit=mpTracker->mlRelativeFramePoses.begin(), lend=mpTracker->mlRelativeFramePoses.end();lit!=lend;lit++, lRit++, lT++)
| ^~~~~~~~~~~~~~~~~~~~
/home/lee22/vslam/ORB_SLAM2/src/System.cc:447:126: error: ‘lend’ was not declared in this scope
447 | :Mat>::iterator lit=mpTracker->mlRelativeFramePoses.begin(), lend=mpTracker->mlRelativeFramePoses.end();lit!=lend;lit++, lRit++, lT++)
| ^~~~

/home/lee22/vslam/ORB_SLAM2/src/Tracking.cc:492:9: error: ‘mlpReferences’ was not declared in this scope; did you mean ‘mpReferenceKF’?
492 | mlpReferences.push_back(mpReferenceKF);
| ^~~~~~~~~~~~~
| mpReferenceKF
/home/lee22/vslam/ORB_SLAM2/src/Tracking.cc:493:9: error: ‘mlFrameTimes’ was not declared in this scope
493 | mlFrameTimes.push_back(mCurrentFrame.mTimeStamp);
| ^~~~~~~~~~~~
/home/lee22/vslam/ORB_SLAM2/src/Tracking.cc:494:9: error: ‘mlbLost’ was not declared in this scope
494 | mlbLost.push_back(mState==LOST);
| ^~~~~~~
/home/lee22/vslam/ORB_SLAM2/src/Tracking.cc:499:9: error: ‘mlRelativeFramePoses’ was not declared in this scope
499 | mlRelativeFramePoses.push_back(mlRelativeFramePoses.back());
| ^~~~~~~~~~~~~~~~~~~~
/home/lee22/vslam/ORB_SLAM2/src/Tracking.cc:500:9: error: ‘mlpReferences’ was not declared in this scope; did you mean ‘mpReferenceKF’?
500 | mlpReferences.push_back(mlpReferences.back());
| ^~~~~~~~~~~~~
| mpReferenceKF
/home/lee22/vslam/ORB_SLAM2/src/Tracking.cc:501:9: error: ‘mlFrameTimes’ was not declared in this scope
501 | mlFrameTimes.push_back(mlFrameTimes.back());
| ^~~~~~~~~~~~
/home/lee22/vslam/ORB_SLAM2/src/Tracking.cc:502:9: error: ‘mlbLost’ was not declared in this scope
502 | mlbLost.push_back(mState==LOST);
| ^~~~~~~
/home/lee22/vslam/ORB_SLAM2/src/Tracking.cc: In member function ‘void ORB_SLAM2::Tracking::UpdateLastFrame()’:
/home/lee22/vslam/ORB_SLAM2/src/Tracking.cc:804:19: error: ‘mlRelativeFramePoses’ was not declared in this scope
804 | cv::Mat Tlr = mlRelativeFramePoses.back();
| ^~~~~~~~~~~~~~~~~~~~
/home/lee22/vslam/ORB_SLAM2/src/Tracking.cc: In member function ‘void ORB_SLAM2::Tracking::Reset()’:
/home/lee22/vslam/ORB_SLAM2/src/Tracking.cc:1542:5: error: ‘mlRelativeFramePoses’ was not declared in this scope
1542 | mlRelativeFramePoses.clear();
| ^~~~~~~~~~~~~~~~~~~~
/home/lee22/vslam/ORB_SLAM2/src/Tracking.cc:1543:5: error: ‘mlpReferences’ was not declared in this scope; did you mean ‘mpReferenceKF’?
1543 | mlpReferences.clear();
| ^~~~~~~~~~~~~
| mpReferenceKF
/home/lee22/vslam/ORB_SLAM2/src/Tracking.cc:1544:5: error: ‘mlFrameTimes’ was not declared in this scope
1544 | mlFrameTimes.clear();
| ^~~~~~~~~~~~
/home/lee22/vslam/ORB_SLAM2/src/Tracking.cc:1545:5: error: ‘mlbLost’ was not declared in this scope
1545 | mlbLost.clear();
| ^~~~~~~
make[2]: *** [CMakeFiles/ORB_SLAM2.dir/build.make:76:CMakeFiles/ORB_SLAM2.dir/src/System.cc.o] 错误 1
make[2]: *** 正在等待未完成的任务....
make[2]: *** [CMakeFiles/ORB_SLAM2.dir/build.make:90:CMakeFiles/ORB_SLAM2.dir/src/Tracking.cc.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:95:CMakeFiles/ORB_SLAM2.dir/all] 错误 2
make: *** [Makefile:91:all] 错误 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant