tuw-robotics / tuw_marker_filter

Marker base slam
BSD 3-Clause "New" or "Revised" License
10 stars 9 forks source link

couldn't compile tuew_marker_filter #7

Closed jadhm closed 5 years ago

jadhm commented 5 years ago

Hi, I am trying to Catkin_make the package but I am getting this error. Can anyone help ? Thanks in advance.

In file included from /opt/ros/kinetic/include/opencv-3.3.1-dev/opencv2/core.hpp:59:0, from /opt/ros/kinetic/include/opencv-3.3.1-dev/opencv2/core/core.hpp:48, from /home/jad/catkin_ws/src/tuw_marker_filter/tuw_marker_slam/./include/tuw_marker_slam/munkre.h:4, from /home/jad/catkin_ws/src/tuw_marker_filter/tuw_marker_slam/src/tuw_markerslam/munkre.cpp:1: /opt/ros/kinetic/include/opencv-3.3.1-dev/opencv2/core/mat.hpp: In instantiation of ‘class cv::Mat’: /home/jad/catkin_ws/src/tuw_marker_filter/tuw_marker_slam/src/tuw_marker_slam/munkre.cpp:7:20: required from here /opt/ros/kinetic/include/opencv-3.3.1-dev/opencv2/core/mat.hpp:2153:50: error: no type named ‘channel_type’ in ‘class cv::DataType’ typedef typename DataType<_Tp>::channel_type channel_type; ^ In file included from /opt/ros/kinetic/include/opencv-3.3.1-dev/opencv2/core/mat.hpp:3642:0, from /opt/ros/kinetic/include/opencv-3.3.1-dev/opencv2/core.hpp:59, from /opt/ros/kinetic/include/opencv-3.3.1-dev/opencv2/core/core.hpp:48, from /home/jad/catkin_ws/src/tuw_marker_filter/tuw_marker_slam/./include/tuw_marker_slam/munkre.h:4, from /home/jad/catkin_ws/src/tuw_marker_filter/tuw_marker_slam/src/tuw_marker_slam/munkre.cpp:1: /opt/ros/kinetic/include/opencv-3.3.1-dev/opencv2/core/mat.inl.hpp:1582:1: error: no type named ‘channeltype’ in ‘class cv::DataType’ Mat<_Tp>::Mat_(const Vec<typename DataType<_Tp>::channel_type, n>& vec, bool copyData) ^ /opt/ros/kinetic/include/opencv-3.3.1-dev/opencv2/core/mat.inl.hpp:1591:1: error: no type named ‘channeltype’ in ‘class cv::DataType’ Mat<_Tp>::Mat_(const Matx<typename DataType<_Tp>::channel_type, m, n>& M, bool copyData) ^ /opt/ros/kinetic/include/opencv-3.3.1-dev/opencv2/core/mat.inl.hpp:1600:1: error: no type named ‘channeltype’ in ‘class cv::DataType’ Mat<_Tp>::Mat(const Point<typename DataType<_Tp>::channel_type>& pt, bool copyData) ^ /opt/ros/kinetic/include/opencv-3.3.1-dev/opencv2/core/mat.inl.hpp:1609:1: error: no type named ‘channeltype’ in ‘class cv::DataType’ Mat<_Tp>::Mat(const Point3<typename DataType<_Tp>::channel_type>& pt, bool copyData) ^ /opt/ros/kinetic/include/opencv-3.3.1-dev/opencv2/core/mat.inl.hpp:1938:1: error: no type named ‘channeltype’ in ‘class cv::DataType’ Mat<_Tp>::operator Vec<typename DataType<_Tp>::channel_type, n>() const ^ /opt/ros/kinetic/include/opencv-3.3.1-dev/opencv2/core/mat.inl.hpp:1951:1: error: no type named ‘channeltype’ in ‘class cv::DataType’ Mat<_Tp>::operator Matx<typename DataType<_Tp>::channel_type, m, n>() const ^ In file included from /opt/ros/kinetic/include/opencv-3.3.1-dev/opencv2/core.hpp:56:0, from /opt/ros/kinetic/include/opencv-3.3.1-dev/opencv2/core/core.hpp:48, from /home/jad/catkin_ws/src/tuw_marker_filter/tuw_marker_slam/./include/tuw_marker_slam/munkre.h:4, from /home/jad/catkin_ws/src/tuw_marker_filter/tuw_marker_slam/src/tuw_markerslam/munkre.cpp:1: /opt/ros/kinetic/include/opencv-3.3.1-dev/opencv2/core/traits.hpp: In instantiation of ‘struct cv::traits::Type’: /opt/ros/kinetic/include/opencv-3.3.1-dev/opencv2/core/mat.inl.hpp:1500:41: required from ‘cv::Mat<_Tp>::Mat_() [with _Tp = tuw::Munkre::Zero]’ /home/jad/catkin_ws/src/tuw_marker_filter/tuw_marker_slam/src/tuw_marker_slam/munkre.cpp:7:20: required from here /opt/ros/kinetic/include/opencv-3.3.1-dev/opencv2/core/traits.hpp:366:8: error: ‘type’ is not a member of ‘cv::DataType’ { enum { value = DataType::type }; }; ^ In file included from /opt/ros/kinetic/include/opencv-3.3.1-dev/opencv2/core/mat.hpp:3642:0, from /opt/ros/kinetic/include/opencv-3.3.1-dev/opencv2/core.hpp:59, from /opt/ros/kinetic/include/opencv-3.3.1-dev/opencv2/core/core.hpp:48, from /home/jad/catkin_ws/src/tuw_marker_filter/tuw_marker_slam/./include/tuw_marker_slam/munkre.h:4, from /home/jad/catkin_ws/src/tuw_marker_filter/tuw_marker_slam/src/tuw_markerslam/munkre.cpp:1: /opt/ros/kinetic/include/opencv-3.3.1-dev/opencv2/core/mat.inl.hpp: In instantiation of ‘cv::Mat<_Tp>& cv::Mat_<_Tp>::operator=(const _Tp&) [with Tp = tuw::Munkre::Zero]’: /opt/ros/kinetic/include/opencv-3.3.1-dev/opencv2/core/mat.inl.hpp:1513:11: required from ‘cv::Mat<_Tp>::Mat_(int, int, const _Tp&) [with _Tp = tuw::Munkre::Zero]’ /home/jad/catkin_ws/src/tuw_marker_filter/tuw_marker_slam/src/tuw_marker_slam/munkre.cpp:107:48: required from here /opt/ros/kinetic/include/opencv-3.3.1-dev/opencv2/core/mat.inl.hpp:1668:46: error: no type named ‘vec_type’ in ‘class cv::DataType’ typedef typename DataType<_Tp>::vec_type VT; ^ tuw_marker_filter/tuw_marker_slam/CMakeFiles/tuw_marker_slam.dir/build.make:158: recipe for target 'tuw_marker_filter/tuw_marker_slam/CMakeFiles/tuw_marker_slam.dir/src/tuw_marker_slam/munkre.cpp.o' failed make[2]: [tuw_marker_filter/tuw_marker_slam/CMakeFiles/tuw_marker_slam.dir/src/tuw_marker_slam/munkre.cpp.o] Error 1 CMakeFiles/Makefile2:11894: recipe for target 'tuw_marker_filter/tuw_marker_slam/CMakeFiles/tuw_marker_slam.dir/all' failed make[1]: [tuw_marker_filter/tuw_marker_slam/CMakeFiles/tuw_marker_slam.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: *** [all] Error 2 Invoking "make -j8 -l8" failed

Thanks, Jad

Asif6511 commented 5 years ago

Hi @jadhm , same problem here. Did you manage to solve the issue?

Asif6511 commented 5 years ago

define OPENCV_TRAITS_ENABLE_DEPRECATED

to munkre.h and munkr.cpp at the top about 5 lines in after other # define and # import lines/ will solve this issue!

johnbryant1 commented 5 years ago

Hi @Asif6511. Can you elaborate a bit more on where you actually copied the command

define OPENCV_TRAITS_ENABLE_DEPRECATED. I don´t see any #import command on munkr.cpp .Thanks in advance.

Asif6511 commented 5 years ago

Hi @johnbryant1. This is already a closed issue #3 . Paste the command on top of the munkre.cpp and munkre.h

jadhm commented 5 years ago

Hi @Asif6511 , Thank you for mentioning the solution. I tried to build it today and it worked. Thanks again. I will close the issue.