-
Notifications
You must be signed in to change notification settings - Fork 7
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
How to compile the code? #3
Comments
Hi @lbrianza First try not to use orb-slam2 with this project, by commenting out these includes (from KeyFrame.h to Tracking.h) Line 42 in 60e0f2b
You'll need to add libraries to the g++ command line, like OpenCV core and viz3d. If you have problems, please copy the command line used to compile. |
Hi @AlejandroSilvestri , thanks for your reply. I am still a bit confused. If I comment those lines including headers from orb-slam2, I get dozens of errors - and that make sense to me because I see that the code uses some orbslam objects several times, like here: Am I missing something obvious? (most likely yes) For reference, I am trying to compile with: Some of the errors that I get: |
So sorry, I haven't used this code in a long time. I'm trying you to test it with dummy map. You need to set OSMAP_DUMMY_MAP, that will include Dummymap.h and ignore those include you already commented out. You also need to add the libraries with -l in your g++ command line. There are four you can see here: Line 45 in 60e0f2b
Look for them in I see this project uses protocol buffers version 3006001. Won't work with another version. If you use a different version, you should regenerate headers. proto file is in osmap repository, and this can be cumbersome unless you are familiar with it. |
Hello,
Sorry in advance because this is probably a naive question, but how to compile this package? I am very confused as I see no instructions at all, and no makefile.
I tried for example with g++, which returns several compilation errors, such as:
src/main.cpp: In function ‘int main(int, char**)’: src/main.cpp:34:11: error: no matching function for call to ‘ORB_SLAM2::System::System()’ 34 | System system; | ^~~~~~ In file included from include/Osmap.h:45, from src/main.cpp:15: include/System.h:62:5: note: candidate: ‘ORB_SLAM2::System::System(const string&, const string&, ORB_SLAM2::System::eSensor, bool)’ 62 | System(const string &strVocFile, const string &strSettingsFile, const eSensor sensor, const bool bUseViewer = true); | ^~~~~~ include/System.h:62:5: note: candidate expects 4 arguments, 0 provided src/main.cpp:36:36: error: no matching function for call to ‘ORB_SLAM2::KeyFrameDatabase::KeyFrameDatabase()’ 36 | system.mpKeyFrameDatabase = new KeyFrameDatabase; | ^~~~~~~~~~~~~~~~ In file included from include/KeyFrame.h:30, from include/Osmap.h:42, from src/main.cpp:15: include/KeyFrameDatabase.h:46:5: note: candidate: ‘ORB_SLAM2::KeyFrameDatabase::KeyFrameDatabase(const ORBVocabulary&)’ 46 | KeyFrameDatabase(const ORBVocabulary &voc); | ^~~~~~~~~~~~~~~~ include/KeyFrameDatabase.h:46:5: note: candidate expects 1 argument, 0 prov
(Please note that I already installed ORB_SLAM2, and it works fine)
Could you please provide some minimal instructions on how to compile this code? Thank you!
The text was updated successfully, but these errors were encountered: