ethz-asl / voxblox

A library for flexible voxel-based mapping, mainly focusing on truncated and Euclidean signed distance fields.
BSD 3-Clause "New" or "Revised" License
1.34k stars 358 forks source link

Catkin build error #397

Open s3219521aa opened 2 years ago

s3219521aa commented 2 years ago

I followed the tutorial and everything war normal but error happened when using catkin build voxblox_ros. The following is the detail. Is there anyone who can help me? Thank you so much!

Errors     << voxblox_ros:make /home/lhr/voxblox_ws/logs/voxblox_ros/build.make.002.log                                                                                                                    
In file included from /usr/include/eigen3/Eigen/Core:22:0,
                 from /usr/include/eigen3/Eigen/Dense:1,
                 from /home/lhr/voxblox_ws/src/minkindr/minkindr/include/kindr/minimal/rotation-quaternion.h:30,
                 from /home/lhr/voxblox_ws/src/minkindr/minkindr/include/kindr/minimal/quat-transformation.h:30,
                 from /home/lhr/voxblox_ws/src/voxblox/voxblox/include/voxblox/core/common.h:16,
                 from /home/lhr/voxblox_ws/src/voxblox/voxblox/include/voxblox/core/color.h:4,
                 from /home/lhr/voxblox_ws/src/voxblox/voxblox/include/voxblox/core/voxel.h:7,
                 from /home/lhr/voxblox_ws/src/voxblox/voxblox_ros/include/voxblox_ros/intensity_server.h:9,
                 from /home/lhr/voxblox_ws/src/voxblox/voxblox_ros/src/intensity_server.cc:1:
/usr/include/eigen3/Eigen/src/Core/util/ConfigureVectorization.h:40:38: warning: attribute ignored in declaration of ‘struct pcl::_PointXYZHSV’ [-Wattributes]
   #define EIGEN_ALIGN_TO_BOUNDARY(n) alignas(n)
                                      ^
/usr/include/eigen3/Eigen/src/Core/util/ConfigureVectorization.h:40:38: note: attribute for ‘struct pcl::_PointXYZHSV’ must follow the ‘struct’ keyword
In file included from /usr/include/eigen3/Eigen/Core:22:0,
                 from /usr/include/eigen3/Eigen/Dense:1,
                 from /home/lhr/voxblox_ws/src/minkindr/minkindr/include/kindr/minimal/rotation-quaternion.h:30,
                 from /home/lhr/voxblox_ws/src/minkindr/minkindr/include/kindr/minimal/quat-transformation.h:30,
                 from /home/lhr/voxblox_ws/src/voxblox/voxblox/include/voxblox/core/common.h:16,
                 from /home/lhr/voxblox_ws/src/voxblox/voxblox/include/voxblox/core/esdf_map.h:10,
                 from /home/lhr/voxblox_ws/src/voxblox/voxblox_ros/include/voxblox_ros/esdf_server.h:7,
                 from /home/lhr/voxblox_ws/src/voxblox/voxblox_ros/src/esdf_server.cc:1:
/usr/include/eigen3/Eigen/src/Core/util/ConfigureVectorization.h:40:38: warning: attribute ignored in declaration of ‘struct pcl::_PointXYZHSV’ [-Wattributes]
   #define EIGEN_ALIGN_TO_BOUNDARY(n) alignas(n)
                                      ^
/usr/include/eigen3/Eigen/src/Core/util/ConfigureVectorization.h:40:38: note: attribute for ‘struct pcl::_PointXYZHSV’ must follow the ‘struct’ keyword
In file included from /usr/include/eigen3/Eigen/Core:22:0,
                 from /usr/include/eigen3/Eigen/Dense:1,
                 from /home/lhr/voxblox_ws/src/minkindr/minkindr/include/kindr/minimal/rotation-quaternion.h:30,
                 from /home/lhr/voxblox_ws/src/minkindr/minkindr/include/kindr/minimal/quat-transformation.h:30,
                 from /home/lhr/voxblox_ws/src/voxblox/voxblox/include/voxblox/core/common.h:16,
                 from /home/lhr/voxblox_ws/src/voxblox/voxblox/include/voxblox/core/esdf_map.h:10,
                 from /home/lhr/voxblox_ws/src/voxblox/voxblox_ros/include/voxblox_ros/simulation_server.h:9,
                 from /home/lhr/voxblox_ws/src/voxblox/voxblox_ros/src/simulation_server.cc:1:
/usr/include/eigen3/Eigen/src/Core/util/ConfigureVectorization.h:40:38: warning: attribute ignored in declaration of ‘struct pcl::_PointXYZHSV’ [-Wattributes]
   #define EIGEN_ALIGN_TO_BOUNDARY(n) alignas(n)
                                      ^
/usr/include/eigen3/Eigen/src/Core/util/ConfigureVectorization.h:40:38: note: attribute for ‘struct pcl::_PointXYZHSV’ must follow the ‘struct’ keyword
In file included from /home/lhr/voxblox_ws/src/voxblox/voxblox/include/voxblox/core/esdf_map.h:8:0,
                 from /home/lhr/voxblox_ws/src/voxblox/voxblox_ros/include/voxblox_ros/simulation_server.h:9,
                 from /home/lhr/voxblox_ws/src/voxblox/voxblox_ros/src/simulation_server.cc:1:
/home/lhr/voxblox_ws/src/voxblox/voxblox_ros/src/simulation_server.cc: In member function ‘bool voxblox::SimulationServer::generatePlausibleViewpoint(voxblox::FloatingPoint, voxblox::Point*, voxblox::Point*) const’:
/home/lhr/voxblox_ws/src/voxblox/voxblox_ros/src/simulation_server.cc:165:3: error: no matching function for call to ‘CheckNotNull(const char [70], int, const char [26], const std::unique_ptr<voxblox::SimulationWorld>&)’
   CHECK_NOTNULL(world_);
   ^
In file included from /home/lhr/voxblox_ws/src/voxblox/voxblox/include/voxblox/core/esdf_map.h:8:0,
                 from /home/lhr/voxblox_ws/src/voxblox/voxblox_ros/include/voxblox_ros/simulation_server.h:9,
                 from /home/lhr/voxblox_ws/src/voxblox/voxblox_ros/src/simulation_server.cc:1:
/usr/include/glog/logging.h:1286:4: note: candidate: template<class T> T* google::CheckNotNull(const char*, int, const char*, T*)
 T* CheckNotNull(const char *file, int line, const char *names, T* t) {
    ^
/usr/include/glog/logging.h:1286:4: note:   template argument deduction/substitution failed:
In file included from /home/lhr/voxblox_ws/src/voxblox/voxblox/include/voxblox/core/esdf_map.h:8:0,
                 from /home/lhr/voxblox_ws/src/voxblox/voxblox_ros/include/voxblox_ros/simulation_server.h:9,
                 from /home/lhr/voxblox_ws/src/voxblox/voxblox_ros/src/simulation_server.cc:1:
/home/lhr/voxblox_ws/src/voxblox/voxblox_ros/src/simulation_server.cc:165:3: note:   mismatched types ‘T*’ and ‘std::unique_ptr<voxblox::SimulationWorld>’
   CHECK_NOTNULL(world_);
   ^
/home/lhr/voxblox_ws/src/voxblox/voxblox_ros/src/simulation_server.cc: In member function ‘void voxblox::SimulationServer::generateSDF()’:
/home/lhr/voxblox_ws/src/voxblox/voxblox_ros/src/simulation_server.cc:221:5: error: no matching function for call to ‘CheckNotNull(const char [70], int, const char [26], std::unique_ptr<voxblox::SimulationWorld>&)’
     CHECK_NOTNULL(world_);
     ^
In file included from /home/lhr/voxblox_ws/src/voxblox/voxblox/include/voxblox/core/esdf_map.h:8:0,
                 from /home/lhr/voxblox_ws/src/voxblox/voxblox_ros/include/voxblox_ros/simulation_server.h:9,
                 from /home/lhr/voxblox_ws/src/voxblox/voxblox_ros/src/simulation_server.cc:1:
/usr/include/glog/logging.h:1286:4: note: candidate: template<class T> T* google::CheckNotNull(const char*, int, const char*, T*)
 T* CheckNotNull(const char *file, int line, const char *names, T* t) {
    ^
/usr/include/glog/logging.h:1286:4: note:   template argument deduction/substitution failed:
In file included from /home/lhr/voxblox_ws/src/voxblox/voxblox/include/voxblox/core/esdf_map.h:8:0,
                 from /home/lhr/voxblox_ws/src/voxblox/voxblox_ros/include/voxblox_ros/simulation_server.h:9,
                 from /home/lhr/voxblox_ws/src/voxblox/voxblox_ros/src/simulation_server.cc:1:
/home/lhr/voxblox_ws/src/voxblox/voxblox_ros/src/simulation_server.cc:221:5: note:   mismatched types ‘T*’ and ‘std::unique_ptr<voxblox::SimulationWorld>’
     CHECK_NOTNULL(world_);
     ^
make[2]: *** [CMakeFiles/voxblox_ros.dir/src/simulation_server.cc.o] Error 1
make[2]: *** 正在等待未完成的任务....
make[1]: *** [CMakeFiles/voxblox_ros.dir/all] Error 2
make: *** [all] Error 2
cd /home/lhr/voxblox_ws/build/voxblox_ros; catkin build --get-env voxblox_ros | catkin env -si  /usr/bin/make --jobserver-fds=6,7 -j; cd -
...........................................................................................................................................................................................................
Failed     << voxblox_ros:make                    [ Exited with code 2 ]                                                                                                                                   
Failed    <<< voxblox_ros                         [ 18.3 seconds ]                                                                                                                                         
[build] Summary: 12 of 13 packages succeeded.                                                                                                                                                              
[build]   Ignored:   4 packages were skipped or are blacklisted.                                                                                                                                           
[build]   Warnings:  None.                                                                                                                                                                                 
[build]   Abandoned: None.                                                                                                                                                                                 
[build]   Failed:    1 packages failed.                                                                                                                                                                    
[build] Runtime: 47.5 seconds total.
yinloonga commented 2 years ago

老兄,看样子好像是Eigen版不兼容的问题,我的是3.3.7,你可以试下。