Notice
Recent Posts
Recent Comments
Link
«   2024/09   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
Tags
more
Archives
Today
Total
관리 메뉴

what i learned

[VSLAM] Ubuntu18.04에서 ORB_SLAM3 build후 실행 본문

Image Processing

[VSLAM] Ubuntu18.04에서 ORB_SLAM3 build후 실행

햄식이111 2023. 7. 27. 03:14

설치환경

Ubuntu18.04: mac m1에서 VMware Fusion으로 mini.iso 를 사용하여 구동

 

 

설치순서

1. OpenCV

2. Eigen3

3. Pangolin

4. ORB_SLAM3

 

 

1. OpenCV 설치

OpenCV 설치 과정은 조금 길어서 아래의 링크를 참고하기!

참고링크 ➡️ [tistory] Ubuntu18.04에 OpenCV 4.2.0 설치하는 방법

 

trouble shooting

OpenCV가 기존에 3.2.0과 4.2.0 2개의 버전이 설치되어 있어서 따로 설치하지 않고 ORB_SLAM3를 build하다가 OpenCV 4.4 이상의 버전이 없다는 오류발생으로 4.5.0을 설치해주었다.

 

 

2. Eigen3 설치

Eigen3 gitlab 링크: https://gitlab.com/libeigen/eigen.git

$ mkdir Eigen3
$ cd Eigen3
$ mkdir build
$ mkdir install
$ git clone -b 3.3.4 https://gitlab.com/libeigen/eigen.git
$ cd build
$ cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../install ../eigen/
$ make -j4
$ sudo make install

 

 

3. Pangolin 설치

Pangolin github 링크: https://github.com/stevenlovegrove/Pangolin

$ mkdir pangolin && cd pangolin
$ git clone https://github.com/stevenlovegrove/Pangolin.git
$ sudo apt install build-essential
$ sudo apt install libgl1-mesa-dev
$ sudo apt install libglew-dev
$ mkdir build && mkdir install
$ cd build

 

 

4. ORB_SLAM3 build

ORB_SLAM3 github 링크: https://github.com/UZ-SLAMLab/ORB_SLAM3

$ git clone https://github.com/UZ-SLAMLab/ORB_SLAM3.git ORB_SLAM3
$ cd ORB_SLAM3
$ chmod +x build.sh
$ ./build.sh

 

trouble shooting

  • boost/serialization/serialization.hpp: Nosuch file or directory 해결법
    • 헤더파일 설치가 되어있지 않아 발생한 오류이다.
$ sudo apt-get install libboost-serialization-dev

 

  • openssl/md5.h: No such file or directory 해결법
    • 헤더파일 설치가 되어있지 않아 발생한 오류이다.
$ sudo apt-get install libssl-dev

 

  • virtual memory exhausted: Cannot allocate memory 해결법
    • 메모리의 용량이 부족해서 발생한 오류이다.
    • RAM을 늘릴 수 없기 때문에 swap 파일을 만들어 메모리 공간을 사용하는 것처럼 하였다.
$ sudo swapon --show
$ sudo swapoff -a
$ sudo dd if=/dev/zero of=/swapfile bs=1G count=10 status=progress
$ sudo chmod 600 /swapfile
$ sudo mkswap /swapfile
$ sudo swapon /swapfile
$ echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab

 

 

5. build 완료

build 완료!


build가 완료된 ORB SLAM을 실행시켜보았다.

 

 

 

[참고자료]

[githubio] [데브코스] 17주차 - CMake OpenCV, Eigen, Pangolin install

[githubio] ORB-SLAM 빌드 및 진행(Ubuntu18.04)

[askubuntu] fallocate: fallocate failed: Text file busy in Ubuntu 17.04?


공부한 내용을 기록하는 공간입니다.

잘못된 정보가 있을 경우 댓글로 피드백 주세요.

올바른 지식을 알려주셔서 감사합니다:)

'Image Processing' 카테고리의 다른 글

[VSLAM] SLAM이란?  (0) 2023.07.20
[OpenCV] keypoint detector  (0) 2023.07.13
[OpenCV] Camera Calibration - Python, ROS  (0) 2023.06.20