반응형
Env.
Nvidia Jetson Xavier NX (Jetpack 4.5.1, Ubuntu 18.04)
ROS Melodic
에러 현상
CMake Error at /opt/ros/melodic/share/image_geometry/cmake/image_geometryConfig.cmake:113 (message):
Project 'image_geometry' specifies '/usr/include/opencv' as an include dir,
which is not found. It does neither exist as an absolute directory nor in
'${{prefix}}//usr/include/opencv'. Check the website
'http://www.ros.org/wiki/image_geometry' for information and consider
reporting the problem.
Call Stack (most recent call first):
/opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:76 (find_package)
arena_camera/CMakeLists.txt:63 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/rdv/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/rdv/catkin_ws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed
cv_bridge가 어디있는지 모르겠다는 에러이며,
opencv의 위치를 찾는다.
OpenCV 위치 찾기
$ pkg-config --cflags opencv
Package opencv was not found in the pkg-config search path.
Perhaps you should add the directory containing `opencv.pc'
to the PKG_CONFIG_PATH environment variable
No package 'opencv' found
$ pkg-config --cflags opencv3
Package opencv3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `opencv3.pc'
to the PKG_CONFIG_PATH environment variable
No package 'opencv3' found
$ pkg-config --cflags opencv4
-I/usr/include/opencv4/opencv -I/usr/include/opencv4
설치된 버전은 opencv4이며, /usr/include 디렉토리에 있음을 알 수 있다.
image_geometryConfig.cmake 파일 수정
$ sudo gedit /opt/ros/melodic/share/image_geometry/cmake/image_geometryConfig.cmake
===============================origin=============================
if(NOT "include;/usr/include;/usr/include/opencv " STREQUAL " ")
set(image_geometry_INCLUDE_DIRS "")
set(_include_dirs "include;/usr/include;/usr/include/opencv")
===============================revise=============================
if(NOT "include;/usr/include;/usr/include/opencv " STREQUAL " ")
set(image_geometry_INCLUDE_DIRS "")
set(_include_dirs "include;/usr/include;/usr/include/opencv4")
96번째 줄의 /usr/include/opencv를 /usr/include/opencv4로 변경
ref.
https://jstar0525.tistory.com/118
반응형