uzh-rpg / dslam_open

Public code for "Data-Efficient Decentralized Visual SLAM"
GNU General Public License v3.0
283 stars 73 forks source link

Dataset_to_vo Problem in Ubuntu 16.04 LTS #13

Open MichaelJoker opened 4 years ago

MichaelJoker commented 4 years ago

Hi everyone, when I was running the dataset_to_vo excutable program in the command shell, there are some errors about segmentation fault (core dumped). After some searches online, I found that it may be due to the incompatibility of eigen in Ubuntu 16.04 LTS, some details of explanations goes here. To help fix the problem, at first, we need to add #define EIGEN_DONT_VECTORIZE and
#define EIGEN_DISABLE_UNALIGNED_ARRAY_ASSERT everywhere we use eigen. And also, we need to modify the CMakeList of ORB_SLAM2, by deleting -march=native in line 12. After re-compiling, it can succeed to run dataset_to_vo excutable program by using KITTI 01 in my example. However, when I want to run the simulationandsave function in MATLAB, some errors happen. Then the problem is due to the depreciation of eigen vectorization. To fix it, we need to delete some define function that we previously did. All in all, to succeed running both dataset_to_vo excutable program and doing simulation in MATLAB, what we need to do is:

  1. Add #define EIGEN_DONT_VECTORIZE and #define EIGEN_DISABLE_UNALIGNED_ARRAY_ASSERT in all .h .hpp .cpp files in the g2o.
  2. deleting -march=native in line 12.
  3. (optional, maybe due to the performance of my computer, I cannot run dataset_to_vo if don't comment out SLAM.shutdown()) comment out SLAM.shutdown() in dataset_to_vo.cpp in line 209
  4. re-complie (catkin build) and run.

Note: This is only my solution for this problem. However, as I am the beginner for Linux, for SLAM, this solution maybe inproper. Any suggestions and corrections would be appreciated. Thanks.