Ros Noetic
Ubuntu 20.04
OpenCV4 with cuda 11.4
Cv_bridge from source built with the above OpenCV
Error with catkin_make :
/home/axel/catkin_ws/src/costmap_converter/src/costmap_to_dynamic_obstacles/blob_detector.cpp: In static member function ‘static cv::Ptr<BlobDetector> BlobDetector::create(const cv::SimpleBlobDetector::Params&)’:
/home/axel/catkin_ws/src/costmap_converter/src/costmap_to_dynamic_obstacles/blob_detector.cpp:9:56: error: invalid new-expression of abstract class type ‘BlobDetector’
9 | return cv::Ptr<BlobDetector> (new BlobDetector(params)); // compatibility with older versions
| ^
In file included from /home/axel/catkin_ws/src/costmap_converter/src/costmap_to_dynamic_obstacles/blob_detector.cpp:1:
/home/axel/catkin_ws/src/costmap_converter/include/costmap_converter/costmap_to_dynamic_obstacles/blob_detector.h:60:7: note: because the following virtual functions are pure within ‘BlobDetector’:
60 | class BlobDetector : public cv::SimpleBlobDetector
| ^~~~~~~~~~~~
In file included from /usr/local/include/opencv4/opencv2/features2d/features2d.hpp:48,
from /home/axel/catkin_ws/src/costmap_converter/include/costmap_converter/costmap_to_dynamic_obstacles/blob_detector.h:48,
from /home/axel/catkin_ws/src/costmap_converter/src/costmap_to_dynamic_obstacles/blob_detector.cpp:1:
/usr/local/include/opencv4/opencv2/features2d.hpp:789:24: note: ‘virtual void cv::SimpleBlobDetector::setParams(const cv::SimpleBlobDetector::Params&)’
789 | CV_WRAP virtual void setParams(const SimpleBlobDetector::Params& params ) = 0;
| ^~~~~~~~~
/usr/local/include/opencv4/opencv2/features2d.hpp:790:46: note: ‘virtual cv::SimpleBlobDetector::Params cv::SimpleBlobDetector::getParams() const’
790 | CV_WRAP virtual SimpleBlobDetector::Params getParams() const = 0;
| ^~~~~~~~~
make[2]: *** [costmap_converter/CMakeFiles/costmap_converter.dir/build.make:141: costmap_converter/CMakeFiles/costmap_converter.dir/src/costmap_to_dynamic_obstacles/blob_detector.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:31884: costmap_converter/CMakeFiles/costmap_converter.dir/all] Error 2
I also added in the CMakelist.txt just to be sure :
Ros Noetic Ubuntu 20.04 OpenCV4 with cuda 11.4 Cv_bridge from source built with the above OpenCV
Error with catkin_make :
I also added in the CMakelist.txt just to be sure :
which confirmed :
Any hints for a fix ? Am I the only one who builds everything from source ?