Orb_slam2: Disable viewer

Created on 9 May 2016  Â·  13Comments  Â·  Source: raulmur/ORB_SLAM2

Is there a way to disable the viewer from running in ORB SLAM2? I am running the process through ssh and it crashes when it tries to open the viewer display.

Most helpful comment

Actually, after I dug into it a little further I found that the System class (System.cc) has a boolean variable called bUseViewer that can be used to enable/disable the viewer. I guess I should have dug a little deeper before posting.

All 13 comments

AFAIK there is nothing like this in the official codebase. I have done
something like this for my personal use:
http://recherche.enac.fr/~drouin/slam/orbslam2/poine_orbslam2_04_07_16.tgz

On Mon, May 9, 2016 at 7:09 PM, durn2000 [email protected] wrote:

Is there a way to disable the viewer from running in ORB SLAM2? I am
running the process through ssh and it crashes when it tries to open the
viewer display.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/raulmur/ORB_SLAM2/issues/92

Actually, after I dug into it a little further I found that the System class (System.cc) has a boolean variable called bUseViewer that can be used to enable/disable the viewer. I guess I should have dug a little deeper before posting.

There is an option in System.h and System.cc that allows users to turn off the Viewer in System(constructor). However, I have tried couple of times and it seems not very stable. Out of 10 times I had tired, six of them caused tracking lost and returned nothing but force window closure. Anyone know what may cause such issue?

Tracking Lost has nothing to do with the viewer.

There are or were issues when you don't start the viewer and the System tries to reset. But this issues should be fixed now in the current version of ORBSLAM2

Thanks @chwimmer for the reply. I downloaded the software like four days ago, I assumed that is the latest version? The issue is pretty odd as long as I turn on the viewer, everything goes perfectly.

p.s. for testing, I did not move my Depth Sensor at all.

That's really pretty odd because I just can repeat it that the Tracking Lost has nothing to do with the viewer. That the program crashes when the viewer is turned of when the system tries to reset. But when you cloned the repository about 4 days ago it should be the stable version. Nevertheless can you check if this commit is in your current version?

Do you have any output you get from ORBSLAM2?

I think so too. I mean the the viewer is really just depends on the GL part, it should not affect the tracking function. Rarely, I can extract the pose matrix when the Viewer is off, but most of the time the program just stuck on the system resetting phrase. I will download repository again and try. Will let you guys know what went wrong if I find the problem.

Ah ok that sounds like the ORBSLAM2 cant extract enough features. How does you test scenario look like? Have you enough features that ORBSLAM2 can extract? How does you depthimages look like? Have you enough valid depth values?

exact the same code and the same camera position(facing static direction), viewer on works great, but did not work while viewer is off.

If I disable Viewer of mono_tum.cc it gets stuck (hang) forever after this:

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

Has anyone come up with a workaround for this?

@hoangthien94 what is the error message?

@shadowver It got stuck at _System Reseting_.
If I set bUseViewer = true, the output would be:

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: 2921

init done

If I set bUseViewer = false:

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: 2921

New Map created with 91 points
Wrong initialization, reseting...
System Reseting

I have tried several times. No more output after that (I've waited up to 1 hour).

@hoangthien94 It looks like the initialization is wrong. I have not tried with TUM dataset, but if you take a look at the tracking.cc file (line 675), trackedMappoints has to larger than 100 points in order to initialize the mono slam. You can try reduce the parameter to say 80 according to your error message and rebuild the program to see whether it works or not.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nik13 picture nik13  Â·  5Comments

sunstarchan picture sunstarchan  Â·  4Comments

imrasp picture imrasp  Â·  6Comments

ColeHoff7 picture ColeHoff7  Â·  4Comments

balzar29 picture balzar29  Â·  4Comments