OpenCV
Eigen3
Pangolin
DBoW2 and g2o(ORB SLAM2 third party 파일에 포함되어 있음)
1. OpenCV build
2. Eigen3 build
Issue : /usr/bin/ld: cannot find -leigen3::eigen collect2: error: ld returned 1 exit status
Solution : CMakeLists.txt에서 eigen3에 대한 required version이 3.1.0으로 되어 있었음
-> required version 수정
3. Pangolin build
sudo wget https://github.com/stevenlovegrove/Pangolin/archive/refs/tags/v0.5.zip
unzip v0.5.zip
cd Pangolin-0.5
mkdir build && cd build
cmake ..
make -j
sudo make install
Issue : Pangolin could not be found because dependency Eigen3 could not be found
Solution : Pangolin version 0.5로 downgrade -> 참조
4. ORB_SLAM 2 build
git clone https://github.com/raulmur/ORB_SLAM2.git ORB_SLAM2
cd ORB_SLAM2
chmod +x build.sh
./build.sh
Issue : c++: internal compiler error: 죽었음 (program cc1plus)
Solution : 메모리 부족 이슈, 메모리 확장 수행 -> 참조
sudo swapoff -a
sudo dd if=/dev/zero of=/swapfile bs=1G count=8
sudo mkswap /swapfile
sudo swapon /swapfile
Issue : error: usleep is not declared in this scope
Solution : ORB_SLAM2/include/System.h #23 위 #include <unistd.h> 추가
5. ORB_SLAM 2 execute
: put data set in Examples/~
# command to run ORB_SLAM2
./Examples/Monocular/mono_kitti Vocabulary/ORBvoc.txt Examples/Monocular/KITTI00-02.yaml Examples/Monocular/data_odometry_gray/dataset/sequences/00