데브코스 자율주행 11주차 - Ubuntu 20.04 ORB_SLAM 2 Build

YUNJI·2023년 12월 8일
0
post-thumbnail
  • ORB_SLAM2
    :
  • 필요한 3rd Party libraries
  1. OpenCV

  2. Eigen3

  3. Pangolin

  4. DBoW2 and g2o(ORB SLAM2 third party 파일에 포함되어 있음)

1. OpenCV build

  • version : 3.2.0

2. Eigen3 build

  • version : 3.3.4

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

  • version : 0.5
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

0개의 댓글

관련 채용 정보