alejandrosilvestri / osmap-viewer Goto Github PK
View Code? Open in Web Editor NEWViewer for maps from ORB-SLAM2 Osmap
Viewer for maps from ORB-SLAM2 Osmap
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!
Hi,
My setup:
--> Ubuntu 20.04
--> OpenCV 3.2.0 installed from source with contrib modules
--> ORB-SLAM2 with Osmap integrated and working
I am a bit confused on how to install Osmap-viewer.
As far as I understood, it is needed to copy the files:
--> include/Osmap.h
--> src/Osmap.cpp
and overwrite the previous ones copied when installing osmap.
Howerver, when doing so, I try to compile with and
In file included from /home/arevo/Dev/ORB_SLAM2_osmap/Examples/Monocular/osmap-viewer.cpp:15: /home/arevo/Dev/ORB_SLAM2_osmap/include/Osmap.h:60:21: error: expected ‘)’ before ‘*’ token 60 | OsmapMapPoint(Osmap*); | ~ ^ | ) /home/arevo/Dev/ORB_SLAM2_osmap/include/Osmap.h:70:21: error: expected ‘)’ before ‘*’ token 70 | OsmapKeyFrame(Osmap*); | ~ ^ | ) /home/arevo/Dev/ORB_SLAM2_osmap/Examples/Monocular/osmap-viewer.cpp:25:14: error: conflicting declaration ‘unsigned int ORB_SLAM2::MapPoint::nNextId’ 25 | unsigned int MapPoint::nNextId = 0; | ^~~~~~~~ In file included from /home/arevo/Dev/ORB_SLAM2_osmap/include/KeyFrame.h:24, from /home/arevo/Dev/ORB_SLAM2_osmap/include/Osmap.h:42, from /home/arevo/Dev/ORB_SLAM2_osmap/Examples/Monocular/osmap-viewer.cpp:15: /home/arevo/Dev/ORB_SLAM2_osmap/include/MapPoint.h:86:30: note: previous declaration as ‘long unsigned int ORB_SLAM2::MapPoint::nNextId’ 86 | static long unsigned int nNextId; | ^~~~~~~ /home/arevo/Dev/ORB_SLAM2_osmap/Examples/Monocular/osmap-viewer.cpp:26:14: error: conflicting declaration ‘unsigned int ORB_SLAM2::KeyFrame::nNextId’ 26 | unsigned int KeyFrame::nNextId = 0; | ^~~~~~~~ In file included from /home/arevo/Dev/ORB_SLAM2_osmap/include/Osmap.h:42, from /home/arevo/Dev/ORB_SLAM2_osmap/Examples/Monocular/osmap-viewer.cpp:15: /home/arevo/Dev/ORB_SLAM2_osmap/include/KeyFrame.h:123:30: note: previous declaration as ‘long unsigned int ORB_SLAM2::KeyFrame::nNextId’ 123 | static long unsigned int nNextId; | ^~~~~~~ /home/arevo/Dev/ORB_SLAM2_osmap/Examples/Monocular/osmap-viewer.cpp: In function ‘int main(int, char**)’: /home/arevo/Dev/ORB_SLAM2_osmap/Examples/Monocular/osmap-viewer.cpp:34:11: error: no matching function for call to ‘ORB_SLAM2::System::System()’ 34 | System system; | ^~~~~~ In file included from /home/arevo/Dev/ORB_SLAM2_osmap/include/Osmap.h:45, from /home/arevo/Dev/ORB_SLAM2_osmap/Examples/Monocular/osmap-viewer.cpp:15: /home/arevo/Dev/ORB_SLAM2_osmap/include/System.h:63:5: note: candidate: ‘ORB_SLAM2::System::System(const string&, const string&, ORB_SLAM2::System::eSensor, bool)’ 63 | System(const string &strVocFile, const string &strSettingsFile, const eSensor sensor, const bool bUseViewer = true); | ^~~~~~ /home/arevo/Dev/ORB_SLAM2_osmap/include/System.h:63:5: note: candidate expects 4 arguments, 0 provided /home/arevo/Dev/ORB_SLAM2_osmap/Examples/Monocular/osmap-viewer.cpp:36:36: error: no matching function for call to ‘ORB_SLAM2::KeyFrameDatabase::KeyFrameDatabase()’ 36 | system.mpKeyFrameDatabase = new KeyFrameDatabase; | ^~~~~~~~~~~~~~~~ In file included from /home/arevo/Dev/ORB_SLAM2_osmap/include/KeyFrame.h:30, from /home/arevo/Dev/ORB_SLAM2_osmap/include/Osmap.h:42, from /home/arevo/Dev/ORB_SLAM2_osmap/Examples/Monocular/osmap-viewer.cpp:15: /home/arevo/Dev/ORB_SLAM2_osmap/include/KeyFrameDatabase.h:46:5: note: candidate: ‘ORB_SLAM2::KeyFrameDatabase::KeyFrameDatabase(const ORBVocabulary&)’ 46 | KeyFrameDatabase(const ORBVocabulary &voc); | ^~~~~~~~~~~~~~~~ /home/arevo/Dev/ORB_SLAM2_osmap/include/KeyFrameDatabase.h:46:5: note: candidate expects 1 argument, 0 provided /home/arevo/Dev/ORB_SLAM2_osmap/Examples/Monocular/osmap-viewer.cpp:59:33: error: ‘std::set<ORB_SLAM2::MapPoint*> ORB_SLAM2::Map::mspMapPoints’ is protected within this context 59 | for(auto pMP : system.mpMap->mspMapPoints) | ^~~~~~~~~~~~ In file included from /home/arevo/Dev/ORB_SLAM2_osmap/include/MapPoint.h:26, from /home/arevo/Dev/ORB_SLAM2_osmap/include/KeyFrame.h:24, from /home/arevo/Dev/ORB_SLAM2_osmap/include/Osmap.h:42, from /home/arevo/Dev/ORB_SLAM2_osmap/Examples/Monocular/osmap-viewer.cpp:15: /home/arevo/Dev/ORB_SLAM2_osmap/include/Map.h:70:25: note: declared protected here 70 | std::set<MapPoint*> mspMapPoints; | ^~~~~~~~~~~~ /home/arevo/Dev/ORB_SLAM2_osmap/Examples/Monocular/osmap-viewer.cpp:60:41: error: ‘cv::Mat ORB_SLAM2::MapPoint::mWorldPos’ is protected within this context 60 | mapPointsCloud.push_back(Vec3f(pMP->mWorldPos)); | ^~~~~~~~~ In file included from /home/arevo/Dev/ORB_SLAM2_osmap/include/KeyFrame.h:24, from /home/arevo/Dev/ORB_SLAM2_osmap/include/Osmap.h:42, from /home/arevo/Dev/ORB_SLAM2_osmap/Examples/Monocular/osmap-viewer.cpp:15: /home/arevo/Dev/ORB_SLAM2_osmap/include/MapPoint.h:118:14: note: declared protected here 118 | cv::Mat mWorldPos; | ^~~~~~~~~ make[2]: *** [CMakeFiles/osmap-viewer.dir/build.make:63: CMakeFiles/osmap-viewer.dir/Examples/Monocular/osmap-viewer.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:198: CMakeFiles/osmap-viewer.dir/all] Error 2 make: *** [Makefile:84: all] Error 2
Hi,
I would like to export the point-cloud only, directly from ORB-SLAM2 or out of the exported map bin file. Is there a simple approach to do that?
Thank you!
Shiran
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.