vision_opencv
vision_opencv copied to clipboard
Project 'cv_bridge' can not find opencv
Hi, I am compiling https://github.com/thien94/vision_to_mavros. I have installed mavros and vision_opencv from apt command. However, Project 'cv_bridge' can not find opencv.
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)
vision_to_mavros/CMakeLists.txt:10 (find_package)
Do you know which environment variable should I set to let Project 'cv_bridge' find opencv? Thanks, Bo
I am getting this same error when compiling https://github.com/IntelRealSense/realsense-ros
i had the same problem (jetson xavier + ubuntu 18.04 + ros melodic)
we fixed it like this:
change the file:
/opt/ros/melodic/share/cv_bridge/cmake/cv_bridgeConfig.cmake
change this line:
set(_include_dirs "include;/usr/include;/usr/include/opencv")
to
set(_include_dirs "include;/usr/include;/usr/include/opencv4")
i had the same problem (jetson xavier + ubuntu 18.04 + ros melodic)
we fixed it like this:
change the file:
/opt/ros/melodic/share/cv_bridge/cmake/cv_bridgeConfig.cmake
change this line:
set(_include_dirs "include;/usr/include;/usr/include/opencv")
to
set(_include_dirs "include;/usr/include;/usr/include/opencv4")
Thank you.
It seems this error is related to OpenCV on Jetson.
i had the same problem,but I don‘t solve it. so can you tell me how to resolve ir.
@yyyll I didn't solve this. I commented the cv_bridge related stuff from https://github.com/thien94/vision_to_mavros since I don't need that.
ok,I understand
@sh0w
i had the same problem (jetson xavier + ubuntu 18.04 + ros melodic)
we fixed it like this:
change the file:
/opt/ros/melodic/share/cv_bridge/cmake/cv_bridgeConfig.cmake change this line:
set(_include_dirs "include;/usr/include;/usr/include/opencv") to
set(_include_dirs "include;/usr/include;/usr/include/opencv4")
This fix worked for me as well on: Nvidia Jetson TX2 with Jetpack 4.4.1 (Ubuntu 18.04) and ROS Melodic.
Thanks :)!
Opencv4 is installed by Nvidia's jetson repo, which replaced the original opencv3. The most simple way to solve this is to comment out all the repo inside /etc/apt/sources.list.d/nvidia-l4t-apt-source.list , then apt update and reinstall libopencv-dev. Check this link for help.
i had the same problem (jetson xavier + ubuntu 18.04 + ros melodic)
we fixed it like this:
change the file:
/opt/ros/melodic/share/cv_bridge/cmake/cv_bridgeConfig.cmake
change this line:
set(_include_dirs "include;/usr/include;/usr/include/opencv")
to
set(_include_dirs "include;/usr/include;/usr/include/opencv4")
This works! Thanks a lot
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.
so , how do i solve this problem
i had the same problem (jetson xavier + ubuntu 18.04 + ros melodic)
we fixed it like this:
change the file:
/opt/ros/melodic/share/cv_bridge/cmake/cv_bridgeConfig.cmake
change this line:
set(_include_dirs "include;/usr/include;/usr/include/opencv")
to
set(_include_dirs "include;/usr/include;/usr/include/opencv4")
Worked :)
Thanks :)
i had the same problem (jetson xavier + ubuntu 18.04 + ros melodic) we fixed it like this: change the file:
/opt/ros/melodic/share/cv_bridge/cmake/cv_bridgeConfig.cmake
change this line:set(_include_dirs "include;/usr/include;/usr/include/opencv")
toset(_include_dirs "include;/usr/include;/usr/include/opencv4")
Thank you.
But this file not allowing to edit, can you tell us how did you change ?
you can change the file permissions to make the file editable using "chmod". you can find lots of resources for this online, just google something like "change file permissions linux chmod"
On Mon, Nov 7, 2022 at 6:54 PM Dhruti1994 @.***> wrote:
i had the same problem (jetson xavier + ubuntu 18.04 + ros melodic) we fixed it like this: change the file: /opt/ros/melodic/share/cv_bridge/cmake/cv_bridgeConfig.cmake change this line: set(_include_dirs "include;/usr/include;/usr/include/opencv") to set(_include_dirs "include;/usr/include;/usr/include/opencv4")
Thank you.
But this file not allowing to edit, can you tell us how did you change ?
— Reply to this email directly, view it on GitHub https://github.com/ros-perception/vision_opencv/issues/345#issuecomment-1305978269, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIVQXSELSQXHNEV2F6WTJLWHE64XANCNFSM4OSAONJQ . You are receiving this because you were mentioned.Message ID: @.***>
I faced the same issue on Jetson Xavier AGX. Thanks to @sh0w the problem is now solved. If you want to quickly fix it in a dockerfile, add the following command before building the workspace:
sed -i 's/set(_include_dirs "include;\/usr\/include;\/usr\/include\/opencv")/set(_include_dirs "include;\/usr\/include;\/usr\/include\/opencv4")/g' /opt/ros/melodic/share/cv_bridge/cmake/cv_bridgeConfig.cmake
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.
so , how do i solve this problem
i had same problem, how to fix it ? any help will be appreciate
THX.
i had the same problem (jetson xavier + ubuntu 18.04 + ros melodic)
we fixed it like this:
change the file:
/opt/ros/melodic/share/cv_bridge/cmake/cv_bridgeConfig.cmake
change this line:
set(_include_dirs "include;/usr/include;/usr/include/opencv")
to
set(_include_dirs "include;/usr/include;/usr/include/opencv4")
I changed it but still now working, this error shows
Maintainer here. Could we leave a thumbs up on this comment if this issue still persists for active distros on ubuntu 20.04 and ubuntu22.04?