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

terminate called after throwing an instance of 'std::runtime_error' #76

Open DamonMIN opened 8 years ago

DamonMIN commented 8 years ago

Dear Sir: In the running procedure,there is an error: “terminate called after throwing an instance of 'std::runtime_error' what(): Pangolin X11: Unable to retrieve framebuffer options”. I have tried many ways but failed. I need your generous help. Thanks very much.

DamonMIN commented 8 years ago

@raulmur Dear Sir: I redo all the steps in another ubuntu system, but the error mentioned above is still existing. Please help me to solve it.

ghost commented 8 years ago

Having similar issues to this, other threads have commented that the problem exists due to a lack of video memory or the use of virtualisation software (VMWare...)

https://github.com/stevenlovegrove/Pangolin/pull/81

Even after applying the fixes and testing on two seperate systems and builds (GTX 650 1GB, GTX780 3GB), I am still getting the same error as you. Curious to see if anyone has managed to bypass this error using a different route.

DamonMIN commented 8 years ago

I have solved the problems. Thank you for your clues. @TheKiffer

lucasmedino commented 8 years ago

How did you solved the problem @DamonMIN ?

ghost commented 8 years ago

Are you running ORB-SLAM2 in VMWare @lucasmedino ? It seems the issue stems from running Ubuntu using virtualisation software since I have managed to get it up and running on a dedicated build without any issue. Here is how I solved it (the solution is provided at https://github.com/stevenlovegrove/Pangolin/pull/81) as the push which apparently fixed it didn't work for me.

Find the device directory: cd Pangolin/src/display/device/

Open display_x11.cpp: gedit display_x11.cpp

Comment out the following lines as such (Lines 123-124):

        //GLX_SAMPLE_BUFFERS  , glx_sample_buffers,
        //GLX_SAMPLES         , glx_sample_buffers > 0 ? glx_samples : 0,

Save the file, cd to the Pangolin build directory then rebuild:

cmake -DCPP11_NO_BOOST=1 ..
make -j

Try running a sequence afterwards and hopefully the runtime error has disappeared...hope this helps.