UZ-SLAMLab / ORB_SLAM3

ORB-SLAM3: An Accurate Open-Source Library for Visual, Visual-Inertial and Multi-Map SLAM
GNU General Public License v3.0
6.69k stars 2.58k forks source link

run RGBD with Realsense D435 to optimizer.optimize(its[it]); (Optimizer.cc). Segmentation fault ; #316

Open fsc1023 opened 3 years ago

fsc1023 commented 3 years ago

for (size_t it = 0; it < 4; it++) { std::cout << "--pFrame->mTcw : " << pFrame->mTcw << std::endl; vSE3->setEstimate(Converter::toSE3Quat(pFrame->mTcw)); std::cout << "--tag 1" << std::endl; optimizer.initializeOptimization(0); std::cout << "--its[" << it << "] : " << its[it] << std::endl; optimizer.optimize(its[it]); // come to this line, Segmentation fault std::cout << "--tag 3" << std::endl; ... } but running Stereo, have no error!

logs display: --pFrame->mTcw : [1, 0, 0, 0; 0, 1, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1] --tag 1 --its[0] : 10 Segmentation fault (core dumped)

Please help me. Thank you very much.

hellovuong commented 3 years ago

Try to remove "march=native" Optimization options in CMakeLists.txt of both ORB_SLAM3 and g2o ,It may be helpful for you.

fsc1023 commented 3 years ago

Try to remove "march=native" Optimization options in CMakeLists.txt of both ORB_SLAM3 and g2o ,It may be helpful for you.

Thank you very much, it running successfully. Thank you for your suggestion!