RuanJY / SLAMesh

ICRA2023, A real-time LiDAR simultaneous localization and meshing method.
GNU General Public License v3.0
362 stars 47 forks source link

编译报错,为什么? #8

Closed 0ontheroad closed 10 months ago

0ontheroad commented 1 year ago

/opt/ros/melodic/include/lvr2/types/VariantChannel.hpp:108:22: error: ‘std::enable_if_t’ has not been declared std::enable_if_t<std::is_same<U, V>::value, int> = 0> ^~~ /opt/ros/melodic/include/lvr2/types/VariantChannel.hpp:108:33: error: expected ‘>’ before ‘<’ token std::enable_if_t<std::is_same<U, V>::value, int> = 0> ^ /opt/ros/melodic/include/lvr2/types/VariantChannel.hpp:115:22: error: ‘std::enable_if_t’ has not been declared std::enable_if_t<!std::is_same<U, V>::value, int> = 0> ^~~ /opt/ros/melodic/include/lvr2/types/VariantChannel.hpp:115:33: error: expected ‘>’ before ‘<’ token std::enable_if_t<!std::is_same<U, V>::value, int> = 0> ^ /opt/ros/melodic/include/lvr2/types/VariantChannel.hpp:116:32: error: ‘template<class ... T> template template<class V, > boost::shared_array lvr2::VariantChannel::DataPtrVisitor::operator()(const lvr2::Channel&) const’ cannot be overloaded boost::shared_array operator()(const Channel& channel) const ^~~~ /opt/ros/melodic/include/lvr2/types/VariantChannel.hpp:109:32: error: with ‘template<class ... T> template template<class V, > boost::shared_array lvr2::VariantChannel::DataPtrVisitor::operator()(const lvr2::Channel&) const’ boost::shared_array operator()(const Channel& channel) const ^~~~ In file included from /opt/ros/melodic/include/lvr2/types/VariantChannelMap.hpp:38:0, from /opt/ros/melodic/include/lvr2/types/MultiChannelMap.hpp:33, from /opt/ros/melodic/include/lvr2/types/BaseBuffer.hpp:35, from /opt/ros/melodic/include/lvr2/io/PointBuffer.hpp:32, from /home/robot/mesh_ws/src/mesh_tools/mesh_msgs_conversions/include/mesh_msgs_conversions/conversions.h:39, from /home/robot/mesh_ws/src/SLAMesh/src/cell.h:48, from /home/robot/mesh_ws/src/SLAMesh/src/cell.cpp:1: /opt/ros/melodic/include/lvr2/types/VariantChannel.hpp:108:22: error: ‘std::enable_if_t’ has not been declared std::enable_if_t<std::is_same<U, V>::value, int> = 0> ^~~ /opt/ros/melodic/include/lvr2/types/VariantChannel.hpp:108:33: error: expected ‘>’ before ‘<’ token std::enable_if_t<std::is_same<U, V>::value, int> = 0> ^ /opt/ros/melodic/include/lvr2/types/VariantChannel.hpp:115:22: error: ‘std::enable_if_t’ has not been declared std::enable_if_t<!std::is_same<U, V>::value, int> = 0> ^~~ /opt/ros/melodic/include/lvr2/types/VariantChannel.hpp:115:33: error: expected ‘>’ before ‘<’ token std::enable_if_t<!std::is_same<U, V>::value, int> = 0> ^ /opt/ros/melodic/include/lvr2/types/VariantChannel.hpp:116:32: error: ‘template<class ... T> template template<class V, > boost::shared_array lvr2::VariantChannel::DataPtrVisitor::operator()(const lvr2::Channel&) const’ cannot be overloaded boost::shared_array operator()(const Channel& channel) const ^~~~ /opt/ros/melodic/include/lvr2/types/VariantChannel.hpp:109:32: error: with ‘template<class ... T> template template<class V, > boost::shared_array lvr2::VariantChannel::DataPtrVisitor::operator()(const lvr2::Channel&) const’ boost::shared_array operator()(const Channel& channel) const ^~~~ In file included from /opt/ros/melodic/include/lvr2/algorithm/ContourAlgorithms.hpp:157:0, from /opt/ros/melodic/include/lvr2/geometry/BaseMesh.tcc:38, from /opt/ros/melodic/include/lvr2/geometry/BaseMesh.hpp:707, from /opt/ros/melodic/include/lvr2/algorithm/ColorAlgorithms.hpp:47, from /opt/ros/melodic/include/lvr2/texture/Material.hpp:32, from /opt/ros/melodic/include/lvr2/io/MeshBuffer.hpp:31, from /home/robot/mesh_ws/src/mesh_tools/mesh_msgs_conversions/include/mesh_msgs_conversions/conversions.h:40, from /home/robot/mesh_ws/src/SLAMesh/src/cell.h:48, from /home/robot/mesh_ws/src/SLAMesh/src/slamesher_node.h:6, from /home/robot/mesh_ws/src/SLAMesh/src/slamesher_node.cpp:69: /opt/ros/melodic/include/lvr2/algorithm/ContourAlgorithms.tcc: In function ‘void lvr2::walkContour(const lvr2::BaseMesh&, lvr2::EdgeHandle, VisitorF)’: /opt/ros/melodic/include/lvr2/algorithm/ContourAlgorithms.tcc:47:43: error: use of ‘auto’ in lambda parameter declaration only available with -std=c++14 or -std=gnu++14 walkContour(mesh, startH, visitor, [](auto unused) ^~~~ In file included from /opt/ros/melodic/include/lvr2/algorithm/ContourAlgorithms.hpp:157:0, from /opt/ros/melodic/include/lvr2/geometry/BaseMesh.tcc:38, from /opt/ros/melodic/include/lvr2/geometry/BaseMesh.hpp:707, from /opt/ros/melodic/include/lvr2/algorithm/ColorAlgorithms.hpp:47, from /opt/ros/melodic/include/lvr2/texture/Material.hpp:32, from /opt/ros/melodic/include/lvr2/io/MeshBuffer.hpp:31, from /home/robot/mesh_ws/src/mesh_tools/mesh_msgs_conversions/include/mesh_msgs_conversions/conversions.h:40, from /home/robot/mesh_ws/src/SLAMesh/src/cell.h:48, from /home/robot/mesh_ws/src/SLAMesh/src/slamesher_node.h:6, from /home/robot/mesh_ws/src/SLAMesh/src/slamesher_node.cpp:69: /opt/ros/melodic/include/lvr2/algorithm/ContourAlgorithms.tcc: In function ‘void lvr2::calcContourEdges(const lvr2::BaseMesh&, lvr2::EdgeHandle, std::vector&, PredF)’: /opt/ros/melodic/include/lvr2/algorithm/ContourAlgorithms.tcc:183:35: error: use of ‘auto’ in lambda parameter declaration only available with -std=c++14 or -std=gnu++14 walkContour(mesh, startH, [&](auto vertexH, auto edgeH) ^~~~ /opt/ros/melodic/include/lvr2/algorithm/ContourAlgorithms.tcc:183:49: error: use of ‘auto’ in lambda parameter declaration only available with -std=c++14 or -std=gnu++14 walkContour(mesh, startH, [&](auto vertexH, auto edgeH) ^~~~ /opt/ros/melodic/include/lvr2/algorithm/ContourAlgorithms.tcc: In lambda function: /opt/ros/melodic/include/lvr2/algorithm/ContourAlgorithms.tcc:185:35: error: no matching function for call to ‘std::vector::push_back(int&)’ contourOut.push_back(edgeH); 已根据步骤安装了lvr2,可仍然会报lvr2相关的错误,请问这是为什么?我应该如何修复调整?

RuanJY commented 1 year ago

是编译mesh_tools报错吗? lvr2,或许你可以先运行一下他们的测试代码查看是否正确: bin/lvr2_reconstruct ../dat/scan.pts

RuanJY commented 10 months ago

no further response