지금까지...
필요한 패키지들을 깔고 모두 잘 되는지 테스트도 마쳤고, ORB-SLAM3 빌드를 진행했다. 몇몇 오류들이 떴지만, 소스코드도 조금씩 바꾸고 하면서 잘 실행되는 상태로 만들었다.
앞선 포스트에서의 필수 구성 패키지들을 설치했다면...
다음의 명령어를 입력하게 된다.
cd ORB_SLAM3 # 각자의 orb_slam3 소스코드 폴더 위치
chmod +x build.sh
./build.sh
그러면 엄청난 양의 deprecated warning이 보라색으로 뜨고(bash shell), 가끔 error가 빨간 색으로 뜬다. 눈 크게 뜨고 에러 문구를 잘 찾아가보자.
무엇보다 깔게 다 안깔렸을 수도 있다(나는 거의 해당하지 않았다).
https://stackoverflow.com/questions/33450401/building-gcc-make-all-error-2
Building GCC make: *** [all] Error 2
I am trying to set up a cross-compiler for i686-elf on Ubuntu following the OSDev GCC Cross-Compiler Tutuorial. However, the code to set up GCC fails to build every time. I know my sources are not ...
stackoverflow.com
https://stackoverflow.com/questions/4596492/usr-bin-ld-cannot-find-lboost-system-mt
아래와 같은 에러가 떴다면, 답변에 써진 것처럼 명령하여 해결할 수 있다. c++에서 쓰는 boost 라이브러리가 설치되지 않은 이유로 보인다.
/usr/bin/ld: cannot find -lboost_system-mt
/usr/bin/ld: cannot find -lboost_system-mt
I recently upgraded from boost 1.40 to 1.45 by removing the previous boost directory completely, downloading the 1.45 sources and rebuilding the libraries I wanted. I then installed the libs using ...
stackoverflow.com
https://github.com/UZ-SLAMLab/ORB_SLAM3/issues/387
상당히 중요한 해결 문구이다. 다수의 error 들을 해결했다.
sed -i 's/++11/++14/g' CMakeLists.txt
error: ‘slots_reference’ was not declared in this scope · Issue #387 · UZ-SLAMLab/ORB_SLAM3
/home/rohan/Pangolin/components/pango_core/include/sigslot/signal.hpp:1180:65: error: ‘slots_reference’ was not declared in this scope 1180 | cow_copy_type<list_type, Lockable> ref = slots_re...
github.com
현재는 카메라 캘리브레이션을 진행중이다.
ORB-SLAM3에서 공식적으로 제시하는 방법.
cameracalibrationtutorial.pdf에 나온 intel d435i 카메라를 이용한다. 튜토리얼은 해당 카메라를 위한 컴퓨터 작동 라이브러리와 캘리브레이션 실행 파일 사용법을 자세히 설명해준다. 다른 카메라에 대해선... 해당 튜토리얼을 참고하거나 해당 튜토리얼에서 사용했던 캘리브레이션 라이브러리 튜토리얼을 자세히 참고하라고 한다.
우리가 원하는 카메라를 사용하기 위해선 나는 kalibr(ORB-SLAM3에서 사용했던 캘리브레이션 라이브러리)의 튜토리얼을 참고했다. 따라서 다음의 과정을 내 방법으로 설정했다.
참고: kalibr github > wiki > pages > multiple camera calibration
https://github.com/ethz-asl/kalibr/wiki/multiple-camera-calibration
GitHub - ethz-asl/kalibr: The Kalibr visual-inertial calibration toolbox
The Kalibr visual-inertial calibration toolbox. Contribute to ethz-asl/kalibr development by creating an account on GitHub.
github.com
이 설명과 bagcreator 또는 ros bag를 활용하는 경우 등, 여러 경우를 따졌을때,
Input > Output
1. images(사진) > bag file
2. bag file, arguments >>(Running calibration)>> Results in YAML format
1. 카메라 테스트
유투브에서 Apriltag를 사용해서 적절한 사진들을 찍는다.
https://www.youtube.com/watch?v=3SWX1iQRbsg&ab_channel=BoofCV
이미지들을 아래 사이트의 설명에 따라 한 폴더 안에 모아놓는다. 그리고,
kalibr_bagcreater --folder dataset-dir/. --output-bag awsome.bag kalibr_bagcreater
가 실행될 수 있는 위치(현재 명령어로는 같은 폴더내)에서 명령어를 실행한다. 그러면 bag file이 나온다.
]https://github.com/ethz-asl/kalibr/wiki/bag-format
GitHub - ethz-asl/kalibr: The Kalibr visual-inertial calibration toolbox
The Kalibr visual-inertial calibration toolbox. Contribute to ethz-asl/kalibr development by creating an account on GitHub.
github.com
2. Running calibration
kalibr_calibrate_cameras --bag [filename.bag] --topics [TOPIC_0 ... TOPIC_N] --models [MODEL_0 ... MODEL_N] --target [target.yaml]
참고: kalibr github > wiki > pages > multiple camera calibration 에서 인용된 사이트를 참고해서 명령어를 실행한다.
결과물로는 txt, yaml 이 나올 것이다.
또다른 참고
https://jdselectron.tistory.com/145
[ROS] Visual-Inertial Calibration Using Kalibr
Kalibr Kalibr is a toolbox that solves the following calibration problems: Multiple camera calibration: intrinsic and extrinsic calibration of a camera-systems with non-globally shared overlapping f..
jdselectron.tistory.com
3. Run ORB-SLAM3
./Monocular/mono_euroc ../Vocabulary/ORBvoc.txt ./Monocular/EuRoC.yaml ../DataSets/EuRoC/MH01/ ./Monocular/EuRoC_TimeStamps/MH01.txt
이런 식으로 명령어를 사용한다. 가장 왼쪽의 실행할 명령어에 해당하는 지시어는 .cc로 끝나는 cpp 소스코드를 말한다.
cpp소스코드에 대한 설명은 여기를 참고하면 좋다.
이 때에 Monocular 를 실행하면 아무런 지도도 뜨지 않는 현상이 있다.
https://github.com/UZ-SLAMLab/ORB_SLAM3/issues/464
running EuRoC Examples but nothing shows up · Issue #464 · UZ-SLAMLab/ORB_SLAM3
The output in terminal is as follows. Initialization of Atlas from scratch Creation of new map with id: 0 Creation of new map with last KF id: 0 Seq. Name: There are 1 cameras in the atlas Camera 0...
github.com
위 질문과 똑같은 상황임을 확인했다.
소스코드를 수정하는데, 특정 함수를 불러올때, 인수를 false 에서 true로 바꾸면 되는 문제였다.
https://robot-vision-develop-story.tistory.com/10
ORB SLAM 웹캠 코드
오랜만에 글을 써볼 차례이다. 맨날 한다한다 하고 안하는거같아서 마음잡고 후딱 웹캠코드를 짜보려한다. 일단 코드는 저의 깃허브에 올려놓았으니 사용하시면 될거 같습니다. https://github.com/J
robot-vision-develop-story.tistory.com
마지막 출처로는 명령어를 참고하고, multi map을 만드는 것에 대해 설명해주는 블로그이다.
https://taeyoung96.github.io/slamtip/ORBSLAM3_build/
ORB-SLAM3 빌드 및 실행 (Ubuntu 18.04)
Ubuntu 18.04에서 ORB-SLAM3를 빌드 및 실행해보자!
taeyoung96.github.io
'건축 컴퓨터 비전 > ORB-SLAM3' 카테고리의 다른 글
slam 실행 전 libpango_display.so: cannot open shared object file: No such file or directory (0) | 2022.08.05 |
---|---|
c++ gdb 디버깅중 vector size가 음수인 문제(c++ gdb vector size minus) (0) | 2022.07.17 |
ORB SLAM Custom data, debugging (0) | 2022.07.15 |
ORB-SLAM3 카메라 캘리브레이션2 (0) | 2022.07.08 |
ORB-SLAM3 설치(20.04) (0) | 2022.06.16 |