cv_bridge with custom opencv on jetson nano

asked 2020-10-14 14:35:27 -0600

Batstru gravatar image

Dear all.

I'm building the darknet_ros package on my jetson nano, where I have a custom opencv sitting in /opt/opencv/4.1.2.

The catkin_make command I'm executing to build this package is including a property to specify the different path for opencv.

catkin_make -DCMAKE_BUILD_TYPE=Release -DOpenCV_INCLUDE_DIRS=/opt/opencv/4.1.2/include/

Unfortunately it fails with the following error:

CMake Error at /opt/ros/melodic/share/cv_bridge/cmake/cv_bridgeConfig.cmake:113 (message):
  Project 'cv_bridge' 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 issue tracker
  'https://github.com/ros-perception/vision_opencv/issues' and consider
  creating a ticket if the problem has not been reported yet.
Call Stack (most recent call first):
  /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:76 (find_package)
  darknet_ros/darknet_ros/CMakeLists.txt:52 (find_package)

I tried also with this command:

catkin_make -DCMAKE_BUILD_TYPE=Release -DOpenCV_INSTALL_PATH=/opt/opencv/4.1.2/

but it fails in the same way.

Somewhere I read a suggestion to edit the file /usr/lib/aarch64-linux-gnu/cmake/opencv4/OpenCVConfig.cmake but IMO is a nonsense as such file is autogenerated.

Do you have any suggestion?

Thanks

edit retag flag offensive close merge delete