Skip to content
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

Compilation issues with Ubuntu 20.04 and ROS Noetic #7

Closed
taihup opened this issue Jul 14, 2021 · 1 comment
Closed

Compilation issues with Ubuntu 20.04 and ROS Noetic #7

taihup opened this issue Jul 14, 2021 · 1 comment

Comments

@taihup
Copy link

taihup commented Jul 14, 2021

Hi!
There are some compilations issues related with OpenCV 4.2 (delivered with Ubuntu 20.04)
Some headers are deprecated as cv.h

file_player/src/ROSThread.h:20:10: fatal error: opencv/cv.h: No such file or directory
   20 | #include <opencv/cv.h>

The same happen with #include <opencv/highgui.h>, it does not exist anymore in OpenCV 4.2

This is easy to fix just replacing the lines with:

#include <opencv2/opencv.hpp>
#include <opencv2/highgui.hpp>

Then I have to rename some OpenCV constant occurrences:
CV_LOAD_IMAGE_COLOR -> cv::IMREAD_COLOR
CV_LOAD_IMAGE_ANYDEPTH -> cv::IMREAD_ANYDEPTH

Furthermore, there are issues related with PCL too:

pcl_config.h:7:4: error: #error PCL requires C++14 or above

To fix this, I just add the following lines to the CMakeLists.txt file:

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON) 
@taihup
Copy link
Author

taihup commented Jul 14, 2021

I just see the PR proposed here: #6

@taihup taihup closed this as completed Jul 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant