Closed BigJohnn closed 3 years ago
Both the Mac and Windows have a limitation that the GUI can only run in the main thread. Linux does not have this issue.
I'm not aware that anybody has created a specific ORB-SLAM3 fix. However, we use a fork of ORB-SLAM2 for teaching and this fixes the issue (it also works under Linux as well):
https://github.com/skylook/ORB_SLAM2_MacOS
The main changes is that the image loading is now carried out in a separate thread (lambda functions in the different examples applications). There are some changes to the SLAM viewer as well.
@BigJohnn for the portion that we need to copy the following code in mono_inertial_euroc.cc:
auto run = [&] () {
int proccIm=0;
...
SLAM.Shutdown();
};
new thread(run);
SLAM.getViewer()->Run();
...
Where do we place the code?
Just before this comment: L235: // Save camera trajectory
@BigJohnn for the portion that we need to copy the following code in mono_inertial_euroc.cc:
auto run = [&] () { int proccIm=0; ... SLAM.Shutdown(); }; new thread(run); SLAM.getViewer()->Run(); ...
Where do we place the code?
Just before this comment: L235: // Save camera trajectory
Hello!
After modified some configs, it was build-succeed on my macOS Catalina, but...
mptViewer = new thread(&Viewer::Run, mpViewer);
Any advice? Thx!
Solved: 1.In System.cc, annotate this line. // mptViewer = new thread(&Viewer::Run, mpViewer); and in System.h, write some "getViewer()" method. 2.In mono_inertial_euroc.cc :
Enjoy!