raulmur / ORB_SLAM2

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

what(): Pangolin X11: Failed to create an OpenGL context #414

Open Jiankai-Sun opened 7 years ago

Jiankai-Sun commented 7 years ago

I meet an error when I run the latest code of ORB_SLAM2 on server. The system is

The error information:

jack@gpu02:/SSD2/jack/Applications/ORB_SLAM2$ ./Examples/Monocular/mono_tum Vocabulary/ORBvoc.txt Examples/Monocular/TUM1.yaml Examples/rgbd_dataset_freiburg1_xyz

ORB-SLAM2 Copyright (C) 2014-2016 Raul Mur-Artal, University of Zaragoza.
This program comes with ABSOLUTELY NO WARRANTY;
This is free software, and you are welcome to redistribute it
under certain conditions. See LICENSE.txt.

Input sensor was set to: Monocular

Loading ORB Vocabulary. This could take a while...
Vocabulary loaded!

modprobe: ERROR: ../libkmod/libkmod-module.c:809 kmod_module_insert_module() could not find module by name='fglrx'
modprobe: ERROR: could not insert 'fglrx': Function not implemented
Error: Fail to load fglrx kernel module!
Error! Fail to load fglrx kernel module! Maybe you can switch to root user to load kernel module directly
modprobe: ERROR: ../libkmod/libkmod-module.c:809 kmod_module_insert_module() could not find module by name='fglrx'
modprobe: ERROR: could not insert 'fglrx': Function not implemented
Error: Fail to load fglrx kernel module!
Error! Fail to load fglrx kernel module! Maybe you can switch to root user to load kernel module directly
modprobe: ERROR: ../libkmod/libkmod-module.c:809 kmod_module_insert_module() could not find module by name='fglrx'
modprobe: ERROR: could not insert 'fglrx': Function not implemented
Error: Fail to load fglrx kernel module!
Error! Fail to load fglrx kernel module! Maybe you can switch to root user to load kernel module directly

Camera Parameters: 
- fx: 517.306
- fy: 516.469
- cx: 318.643
- cy: 255.314
- k1: 0.262383
- k2: -0.953104
- k3: 1.16331
- p1: -0.005358
- p2: 0.002628
- fps: 30
- color order: RGB (ignored if grayscale)

ORB Extractor Parameters: 
- Number of Features: 1000
- Scale Levels: 8
- Scale Factor: 1.2
- Initial Fast Threshold: 20
- Minimum Fast Threshold: 7

-------
Start processing sequence ...
Images in the sequence: 798

X11 Error: BadValue (integer parameter out of range for operation)
X11 Error: BadValue (integer parameter out of range for operation)
terminate called after throwing an instance of 'std::runtime_error'
  what():  Pangolin X11: Failed to create an OpenGL context
Aborted (core dumped)
ramanpreet9 commented 7 years ago

I am also getting the same error

geoffviola commented 7 years ago

I had a similar issue. Try typing glxinfo, which is part of mesa-utils. If you have an nvidia graphics card try nvidia-smi. Both of those programs gave strange errors so it seemed to be a driver issue for me. Anyway, restarting the computer seemed to have fixed the issue.

sgiraz commented 6 years ago

Same problem! If I run it directly on server it works perfectly, but if I run it in remote, it doesn't work.

geoffviola commented 6 years ago

@SimoGira silly question, but how are you running it remotely. Can you run any graphical windows remotely? If you're using ssh, are you passing the "-X" parameter

sgiraz commented 6 years ago

Yes, I’m using ssh with -X and yes I’m able to running any windows on my host (e.g gedit etc..), but with orbslam2 still not work

On 8 Nov 2017, at 4:41 PM, geoffviola notifications@github.com wrote:

@SimoGira silly question, but how are you running it remotely. Can you run any graphical windows remotely? If you're using ssh, are you passing the "-X" parameter

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

zezuladp commented 6 years ago

I got around this by removing Pangolin dependencies after debugging via visualization was no longer needed. https://gist.github.com/zezuladp/165d3c9b91ec936f931b5d5b5df74f3a git apply system.patch from root dir and then rebuilding ./build.sh

There's also some ways to use Nvidia settings and configure a virtual display some info on this here

gravitychen commented 5 years ago

if you are windows, try to use mobaXterm to connect your server , and use the same command , than it works

grafoteka commented 5 years ago

I got around this by removing Pangolin dependencies after debugging via visualization was no longer needed. https://gist.github.com/zezuladp/165d3c9b91ec936f931b5d5b5df74f3a git apply system.patch from root dir and then rebuilding ./build.sh

There's also some ways to use Nvidia settings and configure a virtual display some info on this here

Thank you @zezuladp. It work for me.