-
Notifications
You must be signed in to change notification settings - Fork 606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add opencv4 into the dependency list for ROS2 #324
Conversation
Signed-off-by: Lewis Liu <[email protected]>
cv_bridge/CMakeLists.txt
Outdated
@@ -37,7 +37,7 @@ else() | |||
endif() | |||
|
|||
find_package(sensor_msgs REQUIRED) | |||
find_package(OpenCV 3 REQUIRED | |||
find_package(OpenCV 4 REQUIRED |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line force to OpenCV4 , there is no option for version 3.
You should do something like:
find_package(OpenCV 4 QUIET opencv_core opencv_core)
if(NOT OpenCV_FOUND)
find_package(OpenCV 3 REQUIRED opencv_core opencv_core)
endif()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It really works, I checked it and uploaded one new patch.
@ahcorde
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please review the comment regarding OpenCV
…ng from openCV installation situation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW this works for me with OpenCV 4 on Focal.
@mjcarroll @ahcorde did you get a chance to look at this? |
@gaoethan @ahcorde
I updated code to support OpenCV4 for branch ros2, please have a review.
Signed-off-by: Lewis Liu [email protected]