ORB_SLAM3
ORB_SLAM3 copied to clipboard
segmentation fault: examples: rgbd_tum?
hi,professor:
i test examples/rgbd: command line:
./rgbd_tum ../../Vocabulary/ORBvoc.txt TUM1.yaml rgbd_dataset_freiburg1_xyz associations/fr1_xyz.txt
then run, everything seems ok, snapshot:
but, when the program ending, it print some error:
First KF:0; Map init KF:0
New Map created with 837 points
Starting the Viewer
Shutdown
median tracking time: 0.0636379 mean tracking time: 0.064307
Saving camera trajectory to CameraTrajectory.txt ...
Saving keyframe trajectory to KeyFrameTrajectory.txt ... Segmentation fault (core dumped)
some weird , is there any bug? oh,please help
I have also met the same problem, may I ask have you solved it?
I encounter this problem,have anyone solved?
I solved by uncommented some code. LocalMapper is not finished.
if(mpViewer)
{
mpViewer->RequestFinish();
while(!mpViewer->isFinished())
usleep(5000);
}
//Wait until all thread have effectively stopped
while(!mpLocalMapper->isFinished() || !mpLoopCloser->isFinished() || mpLoopCloser->isRunningGBA())
{
if(!mpLocalMapper->isFinished())
cout << "mpLocalMapper is not finished" << endl;
if(!mpLoopCloser->isFinished())
cout << "mpLoopCloser is not finished" << endl;
if(mpLoopCloser->isRunningGBA()){
cout << "mpLoopCloser is running GBA" << endl;
cout << "break anyway..." << endl;
break;
}
usleep(5000);
}
these code is needed in System::Shutdown().
if(mpViewer) { mpViewer->RequestFinish(); while(!mpViewer->isFinished()) usleep(5000); } //Wait until all thread have effectively stopped while(!mpLocalMapper->isFinished() || !mpLoopCloser->isFinished() || mpLoopCloser->isRunningGBA()) { if(!mpLocalMapper->isFinished()) cout << "mpLocalMapper is not finished" << endl; if(!mpLoopCloser->isFinished()) cout << "mpLoopCloser is not finished" << endl; if(mpLoopCloser->isRunningGBA()){ cout << "mpLoopCloser is running GBA" << endl; cout << "break anyway..." << endl; break; } usleep(5000); }
these code is needed in System::Shutdown(). Hello @sandstorm666 , I appreciate your answer, and it helps me to fix the segfault bug.
does not seem to work. I uncommented it but there is still a segmentation fault
does not seem to work. I uncommented it but there is still a segmentation fault
maybe u need to rebuild it
Hi I am facing the same issue. I have tried uncommenting the above section of the code and rebuilding but I still end up with a Segmentation Fault. Any other suggestions?
Well I found that at the end of System::Shutdown() there is
if(mpViewer) pangolin::BindToContext("ORB-SLAM2: Map Viewer");
I have solved the segmentation fault by changing ORB-SLAM2 to ORB-SLAM3. Hope this could help.
Well I found that at the end of System::Shutdown() there is
if(mpViewer) pangolin::BindToContext("ORB-SLAM2: Map Viewer");
I have solved the segmentation fault by changing ORB-SLAM2 to ORB-SLAM3. Hope this could help.
That‘s worked, after uncommenting the above section of the code, and modifing " if(mpViewer) pangolin::BindToContext("ORB-SLAM2: Map Viewer"); " to " if(mpViewer) pangolin::BindToContext("ORB-SLAM3: Map Viewer"); " , you can get the result: "There are 1 maps in the atlas Map 0 has 256 KFs End of saving trajectory to f_dataset-MH01_mono.txt ... Saving keyframe trajectory to kf_dataset-MH01_mono.txt ... (base) guo@M6700:~/ORBSLAM/tmp/ORB_SLAM3-master/Examples$" afer rebuilding it.
I did so and still got the same error.
I did so and still got the same error.
Would you like to provide more information about your environment? What's your Ubuntu , compiler and pangolin version ?
hi, My environment as follows: pangolin 0.6,ubuntu20.04