MIT-SPARK / Kimera-Semantics

Real-Time 3D Semantic Reconstruction from 2D data
BSD 2-Clause "Simplified" License
631 stars 134 forks source link

Error while installing Semantics with Ros Noetic #67

Closed DaddyWesker closed 3 years ago

DaddyWesker commented 3 years ago

Hello. I have an Ubuntu 20, so i've installed ros noetic build and replaced melodic to noetic in your FAQ when i was trying to build KieraSemantic. I've met one big problem which i can't understand how to fix.

Firstly, i've met "can't find 'main' module in python/em" issue when launching catkin build kimera_semantics_ros, which, fortunately, i've bypassed using from here https://answers.ros.org/question/100741/catkin-fails-on-osx-109-cant-find-__main__-module-in-empy-31-py27eggempyc/ ( i know this question is about OSx, but it did helped me). So i was able to build 13 out of 15 packages, but now i'm getting kinda big error, it even can't fit inside terminal... I'll paste some of this here. Any suggestions?

/usr/include/pcl-1.10/pcl/point_types.h:588:1: error: ‘type’ is not a member of ‘pcl::traits::datatype<pcl::PPFRGBSignature, pcl::fields::g_ratio>::decomposed’ {aka ‘pcl::traits::decomposeArray<float>’}
/usr/include/pcl-1.10/pcl/point_types.h:588:1: error: template argument 1 is invalid
  588 | POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PPFRGBSignature,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/pcl-1.10/pcl/point_types.h:588:1: error: ‘type’ is not a member of ‘pcl::traits::datatype<pcl::PPFRGBSignature, pcl::fields::b_ratio>::decomposed’ {aka ‘pcl::traits::decomposeArray<float>’}
  588 | POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PPFRGBSignature,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/pcl-1.10/pcl/point_types.h:588:1: error: ‘type’ is not a member of ‘pcl::traits::datatype<pcl::PPFRGBSignature, pcl::fields::b_ratio>::decomposed’ {aka ‘pcl::traits::decomposeArray<float>’}
/usr/include/pcl-1.10/pcl/point_types.h:588:1: error: template argument 1 is invalid
  588 | POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PPFRGBSignature,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/pcl-1.10/pcl/point_types.h:588:1: error: ‘type’ is not a member of ‘pcl::traits::datatype<pcl::PPFRGBSignature, pcl::fields::alpha_m>::decomposed’ {aka ‘pcl::traits::decomposeArray<float>’}
  588 | POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PPFRGBSignature,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/pcl-1.10/pcl/point_types.h:588:1: error: ‘type’ is not a member of ‘pcl::traits::datatype<pcl::PPFRGBSignature, pcl::fields::alpha_m>::decomposed’ {aka ‘pcl::traits::decomposeArray<float>’}
/usr/include/pcl-1.10/pcl/point_types.h:588:1: error: template argument 1 is invalid
  588 | POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::PPFRGBSignature,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/pcl-1.10/pcl/point_types.h:44,
                 from /usr/include/pcl-1.10/pcl/common/impl/copy_point.hpp:41,
                 from /usr/include/pcl-1.10/pcl/common/copy_point.h:58,
                 from /usr/include/pcl-1.10/pcl/common/impl/io.hpp:45,
                 from /usr/include/pcl-1.10/pcl/common/io.h:586,
                 from /usr/include/pcl-1.10/pcl/filters/filter.h:43,
                 from /home/daddywesker/catkin_ws/src/voxblox/voxblox_ros/include/voxblox_ros/tsdf_server.h:9,
                 from /home/daddywesker/catkin_ws/src/voxblox/voxblox_ros/include/voxblox_ros/esdf_server.h:11,
                 from /home/daddywesker/catkin_ws/src/voxblox/voxblox_ros/src/esdf_server.cc:1:
/usr/include/pcl-1.10/pcl/point_types.h:627:1: error: ‘plus’ is not a member of ‘pcl::traits’
  627 | POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::BRISKSignature512,
______
/usr/include/pcl-1.10/pcl/point_types.h:627:1: error: ‘plusscalar’ is not a member of ‘pcl::traits’
  627 | POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::BRISKSignature512,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/pcl-1.10/pcl/point_types.h: In function ‘const pcl::BRISKSignature512& pcl::common::operator-=(pcl::BRISKSignature512&, const pcl::BRISKSignature512&)’:
/usr/include/pcl-1.10/pcl/point_types.h:627:1: error: ‘minus’ is not a member of ‘pcl::traits’
  627 | POINT_CLOUD_REGISTER_POINT_STRUCT (pcl::BRISKSignature512,
__________
/usr/include/c++/9/bits/predefined_ops.h:283:11: error: no match for call to ‘(pcl::toPCLPointCloud2(const pcl::PCLPointCloud2&, pcl::PCLImage&)::<lambda(const int&)>) (const pcl::PCLPointField&)’
  283 |  { return bool(_M_pred(*__it)); }
      |           ^~~~~~~~~~~~~~~~~~~~
/usr/include/c++/9/bits/predefined_ops.h:283:11: note: candidate: ‘void (*)(const int&)’ <conversion>
/usr/include/c++/9/bits/predefined_ops.h:283:11: note:   candidate expects 2 arguments, 2 provided
In file included from /opt/ros/noetic/include/pcl_ros/point_cloud.h:8,
                 from /home/daddywesker/catkin_ws/src/voxblox/voxblox_ros/include/voxblox_ros/conversions.h:9,
                 from /home/daddywesker/catkin_ws/src/voxblox/voxblox_ros/include/voxblox_ros/simulation_server.h:18,
                 from /home/daddywesker/catkin_ws/src/voxblox/voxblox_ros/src/simulation_server.cc:1:
/usr/include/pcl-1.10/pcl/conversions.h:317:28: note: candidate: ‘pcl::toPCLPointCloud2(const pcl::PCLPointCloud2&, pcl::PCLImage&)::<lambda(const int&)>’
  317 |     const auto predicate = [](const auto& field) { return field.name == "rgb"; };
      |                            ^
/usr/include/pcl-1.10/pcl/conversions.h:317:28: note:   no known conversion for argument 1 from ‘const pcl::PCLPointField’ to ‘const int&’
In file included from /usr/include/c++/9/bits/stl_algobase.h:71,
                 from /usr/include/c++/9/memory:62,
                 from /home/daddywesker/catkin_ws/src/voxblox/voxblox_ros/include/voxblox_ros/simulation_server.h:4,
                 from /home/daddywesker/catkin_ws/src/voxblox/voxblox_ros/src/simulation_server.cc:1:
/usr/include/c++/9/bits/predefined_ops.h: In instantiation of ‘bool __gnu_cxx::__ops::_Iter_pred<_Predicate>::operator()(_Iterator) [with _Iterator = __gnu_cxx::__normal_iterator<const pcl::PCLPointField*, std::vector<pcl::PCLPointField> >; _Predicate = pcl::getFieldIndex(const pcl::PCLPointCloud2&, const string&)::<lambda(int)>]’:
/usr/include/c++/9/bits/stl_algo.h:120:14:   required from ‘_RandomAccessIterator std::__find_if(_RandomAccessIterator, _RandomAccessIterator, _Predicate, std::random_access_iterator_tag) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<const pcl::PCLPointField*, std::vector<pcl::PCLPointField> >; _Predicate = __gnu_cxx::__ops::_Iter_pred<pcl::getFieldIndex(const pcl::PCLPointCloud2&, const string&)::<lambda(int)> >]’
/usr/include/c++/9/bits/stl_algo.h:161:23:   required from ‘_Iterator std::__find_if(_Iterator, _Iterator, _Predicate) [with _Iterator = __gnu_cxx::__normal_iterator<const pcl::PCLPointField*, std::vector<pcl::PCLPointField> >; _Predicate = __gnu_cxx::__ops::_Iter_pred<pcl::getFieldIndex(const pcl::PCLPointCloud2&, const string&)::<lambda(int)> >]’
/usr/include/c++/9/bits/stl_algo.h:3963:28:   required from ‘_IIter std::find_if(_IIter, _IIter, _Predicate) [with _IIter = __gnu_cxx::__normal_iterator<const pcl::PCLPointField*, std::vector<pcl::PCLPointField> >; _Predicate = pcl::getFieldIndex(const pcl::PCLPointCloud2&, const string&)::<lambda(int)>]’
/usr/include/pcl-1.10/pcl/common/io.h:65:77:   required from here
/usr/include/c++/9/bits/predefined_ops.h:283:11: error: no match for call to ‘(pcl::getFieldIndex(const pcl::PCLPointCloud2&, const string&)::<lambda(int)>) (const pcl::PCLPointField&)’
  283 |  { return bool(_M_pred(*__it)); }
      |           ^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/pcl-1.10/pcl/io/file_io.h:41,
                 from /usr/include/pcl-1.10/pcl/io/pcd_io.h:44,
                 from /opt/ros/noetic/include/pcl_conversions/pcl_conversions.h:70,
                 from /opt/ros/noetic/include/pcl_ros/point_cloud.h:9,
                 from /home/daddywesker/catkin_ws/src/voxblox/voxblox_ros/include/voxblox_ros/conversions.h:9,
                 from /home/daddywesker/catkin_ws/src/voxblox/voxblox_ros/include/voxblox_ros/simulation_server.h:18,
                 from /home/daddywesker/catkin_ws/src/voxblox/voxblox_ros/src/simulation_server.cc:1:
/usr/include/pcl-1.10/pcl/common/io.h:65:9: note: candidate: ‘pcl::getFieldIndex(const pcl::PCLPointCloud2&, const string&)::<lambda(int)>’
   65 |         [&field_name](const auto field) { return field.name == field_name; });
      |         ^
/usr/include/pcl-1.10/pcl/common/io.h:65:9: note:   no known conversion for argument 1 from ‘const pcl::PCLPointField’ to ‘int’
In file included from /usr/include/c++/9/bits/stl_algobase.h:71,
                 from /usr/include/c++/9/memory:62,
                 from /home/daddywesker/catkin_ws/src/voxblox/voxblox_ros/include/voxblox_ros/esdf_server.h:4,
                 from /home/daddywesker/catkin_ws/src/voxblox/voxblox_ros/src/esdf_server.cc:1:
/usr/include/c++/9/bits/predefined_ops.h: In instantiation of ‘bool __gnu_cxx::__ops::_Iter_pred<_Predicate>::operator()(_Iterator) [with _Iterator = __gnu_cxx::__normal_iterator<const pcl::PCLPointField*, std::vector<pcl::PCLPointField> >; _Predicate = pcl::toPCLPointCloud2(const pcl::PCLPointCloud2&, pcl::PCLImage&)::<lambda(const int&)>]’:
/usr/include/c++/9/bits/stl_algo.h:120:14:   required from ‘_RandomAccessIterator std::__find_if(_RandomAccessIterator, _RandomAccessIterator, _Predicate, std::random_access_iterator_tag) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<const pcl::PCLPointField*, std::vector<pcl::PCLPointField> >; _Predicate = __gnu_cxx::__ops::_Iter_pred<pcl::toPCLPointCloud2(const pcl::PCLPointCloud2&, pcl::PCLImage&)::<lambda(const int&)> >]’
/usr/include/c++/9/bits/stl_algo.h:161:23:   required from ‘_Iterator std::__find_if(_Iterator, _Iterator, _Predicate) [with _Iterator = __gnu_cxx::__normal_iterator<const pcl::PCLPointField*, std::vector<pcl::PCLPointField> >; _Predicate = __gnu_cxx::__ops::_Iter_pred<pcl::toPCLPointCloud2(const pcl::PCLPointCloud2&, pcl::PCLImage&)::<lambda(const int&)> >]’
/usr/include/c++/9/bits/stl_algo.h:3963:28:   required from ‘_IIter std::find_if(_IIter, _IIter, _Predicate) [with _IIter = __gnu_cxx::__normal_iterator<const pcl::PCLPointField*, std::vector<pcl::PCLPointField> >; _Predicate = pcl::toPCLPointCloud2(const pcl::PCLPointCloud2&, pcl::PCLImage&)::<lambda(const int&)>]’
/usr/include/pcl-1.10/pcl/conversions.h:318:93:   required from here
/usr/include/c++/9/bits/predefined_ops.h:283:11: error: no match for call to ‘(pcl::toPCLPointCloud2(const pcl::PCLPointCloud2&, pcl::PCLImage&)::<lambda(const int&)>) (const pcl::PCLPointField&)’
  283 |  { return bool(_M_pred(*__it)); }
      |           ^~~~~~~~~~~~~~~~~~~~

and so on and so of... Probably something with pcl...?

DaddyWesker commented 3 years ago

Also, does it necessary to pre install Kimera-Vio-Ros? I've also tried to install it, but getting

Errors << image_undistort:make /home/daddywesker/catkin_ws/logs/image_undistort/build.make.000.log In file included from /home/daddywesker/catkin_ws/src/image_undistort/include/image_undistort/image_undistort.h:18, from /home/daddywesker/catkin_ws/src/image_undistort/src/nodelets/image_undistort_nodelet.cpp:4: /home/daddywesker/catkin_ws/src/image_undistort/include/image_undistort/undistorter.h:6:10: fatal error: cv.h: No such file 6 | #include <cv.h> | ^~~~~~ compilation terminated. make[2]: *** [CMakeFiles/image_undistort_nodelet.dir/build.make:63: CMakeFiles/image_undistort_nodelet.dir/src/nodelets/image_undistort_nodelet.cpp.o] Ошибка 1 make[2]: *** Ожидание завершения заданий… In file included from /home/daddywesker/catkin_ws/src/image_undistort/include/image_undistort/stereo_undistort.h:20, from /home/daddywesker/catkin_ws/src/image_undistort/src/nodelets/stereo_undistort_nodelet.cpp:4: /home/daddywesker/catkin_ws/src/image_undistort/include/image_undistort/undistorter.h:6:10: fatal error: cv.h: No such file 6 | #include <cv.h> | ^~~~~~ compilation terminated. make[2]: *** [CMakeFiles/image_undistort_nodelet.dir/build.make:89: CMakeFiles/image_undistort_nodelet.dir/src/nodelets/stereo_undistort_nodelet.cpp.o] Ошибка 1 make[1]: *** [CMakeFiles/Makefile2:2654: CMakeFiles/image_undistort_nodelet.dir/all] Ошибка 2 make: *** [Makefile:141: all] Error 2

DaddyWesker commented 3 years ago

I was able to build Semantic Kimera with following change into catkin config process catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=14

Though i haven't tried to apply this to the Vio Ros building process.

Update. Adding c+14 to catkin config doesn't saved me from errors building VIO-ROS, unfortunately.

Update 2. Closing the issue, since i've built semantic and opening issue in VIO-ROS.