raulmur / ORB_SLAM2

Real-Time SLAM for Monocular, Stereo and RGB-D Cameras, with Loop Detection and Relocalization Capabilities
Other
9.37k stars 4.69k forks source link

Error while building ORB-SLAM2 #453

Open zlingBryan opened 6 years ago

zlingBryan commented 6 years ago

Can someone please guide me? Hello I am getting the following error while building

/home/bryan/ORB_SLAM2/include/MapDrawer.h:43:28: error: ‘pangolin’ has not been declared void DrawCurrentCamera(pangolin::OpenGlMatrix &Twc); ^ /home/bryan/ORB_SLAM2/include/MapDrawer.h:43:51: error: expected ‘,’ or ‘...’ before ‘&’ token void DrawCurrentCamera(pangolin::OpenGlMatrix &Twc); ^ /home/bryan/ORB_SLAM2/include/MapDrawer.h:46:39: error: ‘pangolin’ has not been declared void GetCurrentOpenGLCameraMatrix(pangolin::OpenGlMatrix &M); ^ /home/bryan/ORB_SLAM2/include/MapDrawer.h:46:62: error: expected ‘,’ or ‘...’ before ‘&’ token void GetCurrentOpenGLCameraMatrix(pangolin::OpenGlMatrix &M); ^ /home/bryan/ORB_SLAM2/src/Viewer.cc: In member function ‘void ORB_SLAM2::Viewer::Run()’: /home/bryan/ORB_SLAM2/src/Viewer.cc:63:5: error: ‘pangolin’ has not been declared pangolin::CreateWindowAndBind("ORB-SLAM2: Map Viewer",1024,768); ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:66:14: error: ‘GL_DEPTH_TEST’ was not declared in this scope glEnable(GL_DEPTH_TEST); ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:66:27: error: ‘glEnable’ was not declared in this scope glEnable(GL_DEPTH_TEST); ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:69:15: error: ‘GL_BLEND’ was not declared in this scope glEnable (GL_BLEND); ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:70:18: error: ‘GL_SRC_ALPHA’ was not declared in this scope glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:70:32: error: ‘GL_ONE_MINUS_SRC_ALPHA’ was not declared in this scope glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:70:54: error: ‘glBlendFunc’ was not declared in this scope glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:72:5: error: ‘pangolin’ has not been declared pangolin::CreatePanel("menu").SetBounds(0.0,1.0,0.0,pangolin::Attach::Pix(175)); ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:72:57: error: ‘pangolin’ has not been declared pangolin::CreatePanel("menu").SetBounds(0.0,1.0,0.0,pangolin::Attach::Pix(175)); ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:73:5: error: ‘pangolin’ has not been declared pangolin::Var menuFollowCamera("menu.Follow Camera",true,true); ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:73:19: error: expected primary-expression before ‘bool’ pangolin::Var menuFollowCamera("menu.Follow Camera",true,true); ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:74:5: error: ‘pangolin’ has not been declared pangolin::Var menuShowPoints("menu.Show Points",true,true); ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:74:19: error: expected primary-expression before ‘bool’ pangolin::Var menuShowPoints("menu.Show Points",true,true); ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:75:5: error: ‘pangolin’ has not been declared pangolin::Var menuShowKeyFrames("menu.Show KeyFrames",true,true); ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:75:19: error: expected primary-expression before ‘bool’ pangolin::Var menuShowKeyFrames("menu.Show KeyFrames",true,true); ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:76:5: error: ‘pangolin’ has not been declared pangolin::Var menuShowGraph("menu.Show Graph",true,true); ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:76:19: error: expected primary-expression before ‘bool’ pangolin::Var menuShowGraph("menu.Show Graph",true,true); ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:77:5: error: ‘pangolin’ has not been declared pangolin::Var menuLocalizationMode("menu.Localization Mode",false,true); ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:77:19: error: expected primary-expression before ‘bool’ pangolin::Var menuLocalizationMode("menu.Localization Mode",false,true); ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:78:5: error: ‘pangolin’ has not been declared pangolin::Var menuReset("menu.Reset",false,false); ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:78:19: error: expected primary-expression before ‘bool’ pangolin::Var menuReset("menu.Reset",false,false); ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:81:5: error: ‘pangolin’ has not been declared pangolin::OpenGlRenderState s_cam( ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:87:5: error: ‘pangolin’ has not been declared pangolin::View& d_cam = pangolin::CreateDisplay() ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:87:21: error: ‘d_cam’ was not declared in this scope pangolin::View& d_cam = pangolin::CreateDisplay() ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:87:29: error: ‘pangolin’ has not been declared pangolin::View& d_cam = pangolin::CreateDisplay() ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:88:34: error: ‘pangolin’ has not been declared .SetBounds(0.0, 1.0, pangolin::Attach::Pix(175), 1.0, -1024.0f/768.0f) ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:89:29: error: ‘pangolin’ does not name a type .SetHandler(new pangolin::Handler3D(s_cam)); ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:91:5: error: ‘pangolin’ has not been declared pangolin::OpenGlMatrix Twc; ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:92:5: error: ‘Twc’ was not declared in this scope Twc.SetIdentity(); ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:101:17: error: ‘GL_COLOR_BUFFER_BIT’ was not declared in this scope glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:101:39: error: ‘GL_DEPTH_BUFFER_BIT’ was not declared in this scope glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:101:58: error: ‘glClear’ was not declared in this scope glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:105:12: error: ‘menuFollowCamera’ was not declared in this scope if(menuFollowCamera && bFollow) ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:107:13: error: ‘s_cam’ was not declared in this scope s_cam.Follow(Twc); ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:111:13: error: ‘s_cam’ was not declared in this scope s_cam.SetModelViewMatrix(pangolin::ModelViewLookAt(mViewpointX,mViewpointY,mViewpointZ, 0,0,0,0.0,-1.0, 0.0)); ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:111:38: error: ‘pangolin’ has not been declared s_cam.SetModelViewMatrix(pangolin::ModelViewLookAt(mViewpointX,mViewpointY,mViewpointZ, 0,0,0,0.0,-1.0, 0.0)); ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:120:12: error: ‘menuLocalizationMode’ was not declared in this scope if(menuLocalizationMode && !bLocalizationMode) ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:131:24: error: ‘s_cam’ was not declared in this scope d_cam.Activate(s_cam); ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:132:41: error: ‘glClearColor’ was not declared in this scope glClearColor(1.0f,1.0f,1.0f,1.0f); ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:134:12: error: ‘menuShowKeyFrames’ was not declared in this scope if(menuShowKeyFrames || menuShowGraph) ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:134:33: error: ‘menuShowGraph’ was not declared in this scope if(menuShowKeyFrames || menuShowGraph) ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:136:12: error: ‘menuShowPoints’ was not declared in this scope if(menuShowPoints) ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:139:9: error: ‘pangolin’ has not been declared pangolin::FinishFrame(); ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:145:12: error: ‘menuReset’ was not declared in this scope if(menuReset) ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:147:13: error: ‘menuShowGraph’ was not declared in this scope menuShowGraph = true; ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:148:13: error: ‘menuShowKeyFrames’ was not declared in this scope menuShowKeyFrames = true; ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:149:13: error: ‘menuShowPoints’ was not declared in this scope menuShowPoints = true; ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:150:13: error: ‘menuLocalizationMode’ was not declared in this scope menuLocalizationMode = false; ^ /home/bryan/ORB_SLAM2/src/Viewer.cc:155:13: error: ‘menuFollowCamera’ was not declared in this scope menuFollowCamera = true; ^

xdotzv commented 6 years ago

Did you include the pangolin headers and link with pangolin lib?

zlingBryan commented 6 years ago

@xdotzv I do not. How can i do it? Thank you!

SteveMacenski commented 6 years ago

Please search for simple errors yourself, github issues aren't there for fixing everyones dependency problems. Google pangolin headers and I suspect you can handle the rest yourself.