HFNet_SLAM
HFNet_SLAM copied to clipboard
Map Save but No Load
dear Liu, I see great potintial in this algorithm as it detect more features then ORB Slam3. I run the EuroCar dataset with System.SaveAtlasToFile: "mapeuro"
it save when we finish the whole seq an osa file, however, when I tried to enable loadAtlas function similar to ORB Slam3, I got segmentation fault. here is the code:
`
mpKeyFrameDatabase = new KeyFrameDatabase();
if(mStrLoadAtlasFromFile.empty()){
//Create the Atlas
cout << "Initialization of Atlas from scratch " << endl;
mpAtlas = new Atlas(0);
}else{
//user gave a path
//why ORB Slam3 not init a pointer for Atlas if loading data ??! // 0 will be mnLastInitKFidMap(initKFid), which will be passed to new Map(mnLastInitKFidMap) //mpAtlas = new Atlas(0);
mpKeyFrameDatabase = new KeyFrameDatabase();
bool isRead =LoadAtlas(FileType::BINARY_FILE);
if(!isRead){
exit(-1);
}
loadedAtlas = true;
mpAtlas->CreateNewMap();
}`
sometimes segmentation fault does not happen if I Don't call CreateNewMap (but I get left with view black screen)
could you please fix the issue as training on a map and loading it later is great for many applications
below is the gdb back trace output:
`[New Thread 0xffffb0ae5900 (LWP 22255)] [New Thread 0xffff9c962900 (LWP 22257)] [New Thread 0xffffb06e4900 (LWP 22256)] [New Thread 0xffff906e8900 (LWP 22260)] [New Thread 0xffff90ae9900 (LWP 22259)] [New Thread 0xffff9c561900 (LWP 22258)] [New Thread 0xffff83ff4900 (LWP 22261)] [New Thread 0xffff83682900 (LWP 22262)]
Thread 1 "mono_euroc" received signal SIGSEGV, Segmentation fault.
0x0000fffff7e9e028 in ORB_SLAM3::TwoViewReconstruction::Reconstruct(std::vector<cv::KeyPoint, std::allocatorcv::KeyPoint > const&, std::vector<cv::KeyPoint, std::allocatorcv::KeyPoint > const&, std::vector<int, std::allocator