ignaciotb / bathymetric_slam

BSD 3-Clause "New" or "Revised" License
31 stars 16 forks source link

Compilation Failed #4

Closed HikariS97 closed 3 years ago

HikariS97 commented 3 years ago

Some errors like these. Please help :(

[ 21%] Built target submaps_tools [ 21%] Built target utils_g2o [ 21%] Building CXX object src/graph_optimization/CMakeFiles/graph_construction.dir/src/graph_construction.cpp.o In file included from /usr/local/include/g2o/core/base_binary_edge.h:30:0, from /usr/local/include/g2o/types/slam3d/edge_se3.h:30, from /home/krill/BATHY_SLAM_IGNACIOTB/bathymetric_slam/src/graph_optimization/include/graph_optimization/graph_construction.hpp:16, from /home/krill/BATHY_SLAM_IGNACIOTB/bathymetric_slam/src/graph_optimization/src/graph_construction.cpp:12: /usr/local/include/g2o/core/base_fixed_sized_edge.h:192:32: error: ‘index_sequence’ is not a member of ‘std’ struct HessianTupleType<std::index_sequence> { ^~~~~~ /usr/local/include/g2o/core/base_fixed_sized_edge.h:192:32: error: ‘index_sequence’ is not a member of ‘std’ /usr/local/include/g2o/core/base_fixed_sized_edge.h:192:51: error: expected parameter pack before ‘...’ struct HessianTupleType<std::index_sequence> { ^~~ /usr/local/include/g2o/core/base_fixed_sized_edge.h:192:51: error: template argument 1 is invalid /usr/local/include/g2o/core/base_fixed_sized_edge.h:192:54: error: expected unqualified-id before ‘>’ token struct HessianTupleType<std::index_sequence> { ^~ /usr/local/include/g2o/core/base_fixed_sized_edge.h:199:38: error: ‘make_index_sequence’ is not a member of ‘std’ typename HessianTupleType<std::make_index_sequence<_nr_of_vertex_pairs>>::type; ^~~~~~~ /usr/local/include/g2o/core/base_fixed_sized_edge.h:199:38: error: ‘make_index_sequence’ is not a member of ‘std’ /usr/local/include/g2o/core/base_fixed_sized_edge.h:199:58: error: template argument 1 is invalid typename HessianTupleType<std::make_index_sequence<_nr_of_vertex_pairs>>::type; ^~~~~~~ /usr/local/include/g2o/core/base_fixed_sized_edge.h:199:16: error: expected nested-name-specifier typename HessianTupleType<std::make_index_sequence<_nr_of_vertex_pairs>>::type; ^~~~~~~~~~~~~ /usr/local/include/g2o/core/base_fixed_sized_edge.h:201:38: error: ‘make_index_sequence’ is not a member of ‘std’ typename HessianTupleType<std::make_index_sequence<_nr_of_vertex_pairs>>::typeTransposed; ^~~~~~~ /usr/local/include/g2o/core/base_fixed_sized_edge.h:201:38: error: ‘make_index_sequence’ is not a member of ‘std’ /usr/local/include/g2o/core/base_fixed_sized_edge.h:201:58: error: template argument 1 is invalid typename HessianTupleType<std::make_index_sequence<_nr_of_vertex_pairs>>::typeTransposed; ^~~~~~~ /usr/local/include/g2o/core/base_fixed_sized_edge.h:201:16: error: expected nested-name-specifier typename HessianTupleType<std::make_index_sequence<_nr_of_vertex_pairs>>::typeTransposed; ^~~~~~~~~~~~~ /usr/local/include/g2o/core/base_fixed_sized_edge.h:222:32: error: ‘std::index_sequence’ has not been declared bool allVerticesFixedNs(std::index_sequence) const; ^~~~~~ /usr/local/include/g2o/core/base_fixed_sized_edge.h:222:46: error: expected ‘,’ or ‘...’ before ‘<’ token bool allVerticesFixedNs(std::index_sequence) const; ^ /usr/local/include/g2o/core/base_fixed_sized_edge.h:227:75: error: ‘std::index_sequence’ has not been declared void linearizeOplus_allocate(JacobianWorkspace& jacobianWorkspace, std::index_sequence); ^~~~~~ /usr/local/include/g2o/core/base_fixed_sized_edge.h:227:89: error: expected ‘,’ or ‘...’ before ‘<’ token void linearizeOplus_allocate(JacobianWorkspace& jacobianWorkspace, std::index_sequence); ^ /usr/local/include/g2o/core/base_fixed_sized_edge.h:235:30: error: ‘std::index_sequence’ has not been declared void linearizeOplusNs(std::index_sequence); ^~~~~~ /usr/local/include/g2o/core/base_fixed_sized_edge.h:235:44: error: expected ‘,’ or ‘...’ before ‘<’ token void linearizeOplusNs(std::index_sequence); ^ /usr/local/include/g2o/core/base_fixed_sized_edge.h:259:38: error: ‘std::index_sequence’ has not been declared std::index_sequence); ^~~~~~ /usr/local/include/g2o/core/base_fixed_sized_edge.h:259:52: error: expected ‘,’ or ‘...’ before ‘<’ token std::index_sequence); ^ /usr/local/include/g2o/core/base_fixed_sized_edge.h:264:65: error: ‘std::index_sequence’ has not been declared void constructOffDiagonalQuadraticFormMs(const AtOType&, std::index_sequence<>); ^~~~~~ /usr/local/include/g2o/core/base_fixed_sized_edge.h:264:79: error: expected ‘,’ or ‘...’ before ‘<’ token void constructOffDiagonalQuadraticFormMs(const AtOType&, std::index_sequence<>); ^ /usr/local/include/g2o/core/base_fixed_sized_edge.h:267:69: error: ‘std::index_sequence’ has not been declared void constructOffDiagonalQuadraticFormMs(const AtOType& AtO, std::index_sequence); ^~~~~~ /usr/local/include/g2o/core/base_fixed_sized_edge.h:267:83: error: expected ‘,’ or ‘...’ before ‘<’ token void constructOffDiagonalQuadraticFormMs(const AtOType& AtO, std::index_sequence); ^ /usr/local/include/g2o/core/base_fixed_sized_edge.h:284:3: error: ‘HessianTuple’ does not name a type; did you mean ‘HessianTupleType’? HessianTuple _hessianTuple; ^~~~ HessianTupleType /usr/local/include/g2o/core/base_fixed_sized_edge.h:285:3: error: ‘HessianTupleTransposed’ does not name a type; did you mean ‘HessianTupleType’? HessianTupleTransposed _hessianTupleTransposed; ^~~~~~ HessianTupleType /usr/local/include/g2o/core/base_fixed_sized_edge.h: In constructor ‘g2o::BaseFixedSizedEdge<D, E, VertexTypes>::BaseFixedSizedEdge()’: /usr/local/include/g2o/core/base_fixed_sized_edge.h:207:9: error: class ‘g2o::BaseFixedSizedEdge<D, E, VertexTypes>’ does not have any field named ‘_hessianTuple’ _hessianTuple(internal::createHessianMaps(_hessianTuple)), ^~~~~ /usr/local/include/g2o/core/base_fixed_sized_edge.h:207:51: error: ‘_hessianTuple’ was not declared in this scope _hessianTuple(internal::createHessianMaps(_hessianTuple)), ^~~~~ /usr/local/include/g2o/core/base_fixed_sized_edge.h:207:51: note: suggested alternative: ‘HessianTupleType’ _hessianTuple(internal::createHessianMaps(_hessianTuple)), ^~~~~ HessianTupleType /usr/local/include/g2o/core/base_fixed_sized_edge.h:208:9: error: class ‘g2o::BaseFixedSizedEdge<D, E, VertexTypes>’ does not have any field named ‘_hessianTupleTransposed’ _hessianTupleTransposed(internal::createHessianMaps(_hessianTupleTransposed)), ^~~~~~~ /usr/local/include/g2o/core/base_fixed_sized_edge.h:208:61: error: ‘_hessianTupleTransposed’ was not declared in this scope _hessianTupleTransposed(internal::createHessianMaps(_hessianTupleTransposed)), ^~~~~~~ /usr/local/include/g2o/core/base_fixed_sized_edge.h:208:61: note: suggested alternative: ‘HessianTupleType’ _hessianTupleTransposed(internal::createHessianMaps(_hessianTupleTransposed)), ^~~~~~~ HessianTupleType In file included from /usr/local/include/g2o/core/base_fixed_sized_edge.h:292:0, from /usr/local/include/g2o/core/base_binary_edge.h:30, from /usr/local/include/g2o/types/slam3d/edge_se3.h:30, from /home/krill/BATHY_SLAM_IGNACIOTB/bathymetric_slam/src/graph_optimization/include/graph_optimization/graph_construction.hpp:16, from /home/krill/BATHY_SLAM_IGNACIOTB/bathymetric_slam/src/graph_optimization/src/graph_construction.cpp:12: /usr/local/include/g2o/core/base_fixed_sized_edge.hpp: At global scope: /usr/local/include/g2o/core/base_fixed_sized_edge.hpp:36:10: error: ‘bool g2o::BaseFixedSizedEdge<D, E, VertexTypes>::allVerticesFixedNs’ is not a static data member of ‘class g2o::BaseFixedSizedEdge<D, E, VertexTypes>’ std::index_sequence) const { ^~~~~~ /usr/local/include/g2o/core/base_fixed_sized_edge.hpp:36:10: error: template definition of non-template ‘bool g2o::BaseFixedSizedEdge<D, E, VertexTypes>::allVerticesFixedNs’ /usr/local/include/g2o/core/base_fixed_sized_edge.hpp:36:10: error: ‘index_sequence’ is not a member of ‘std’ /usr/local/include/g2o/core/base_fixed_sized_edge.hpp: In member function ‘virtual bool g2o::BaseFixedSizedEdge<D, E, VertexTypes>::allVerticesFixed() const’: /usr/local/include/g2o/core/base_fixed_sized_edge.hpp:43:34: error: ‘make_index_sequence’ is not a member of ‘std’ return allVerticesFixedNs(std::make_index_sequence<_nr_of_vertices>()); ^~~~~~~ /usr/local/include/g2o/core/base_fixed_sized_edge.hpp:43:71: error: expected primary-expression before ‘)’ token return allVerticesFixedNs(std::make_index_sequence<_nr_of_vertices>()); ^ /usr/local/include/g2o/core/base_fixed_sized_edge.hpp: In member function ‘virtual void g2o::BaseFixedSizedEdge<D, E, VertexTypes>::constructQuadraticForm()’: /usr/local/include/g2o/core/base_fixed_sized_edge.hpp:55:35: error: ‘make_index_sequence’ is not a member of ‘std’ std::make_index_sequence<_nr_of_vertices>()); ^~~~~~~ /usr/local/include/g2o/core/base_fixed_sized_edge.hpp:55:72: error: expected primary-expression before ‘)’ token std::make_index_sequence<_nr_of_vertices>()); ^ /usr/local/include/g2o/core/base_fixed_sized_edge.hpp:58:35: error: ‘make_index_sequence’ is not a member of ‘std’ std::make_index_sequence<_nr_of_vertices>()); ^~~~~~~ /usr/local/include/g2o/core/base_fixed_sized_edge.hpp:58:72: error: expected primary-expression before ‘)’ token std::make_index_sequence<_nr_of_vertices>()); ^ /usr/local/include/g2o/core/base_fixed_sized_edge.hpp: At global scope: /usr/local/include/g2o/core/base_fixed_sized_edge.hpp:65:74: error: ‘std::index_sequence’ has not been declared const InformationType& omega, const ErrorVector& weightedError, std::index_sequence) { ^~~~~~ /usr/local/include/g2o/core/base_fixed_sized_edge.hpp:65:88: error: expected ‘,’ or ‘...’ before ‘<’ token const InformationType& omega, const ErrorVector& weightedError, std::index_sequence) { ^ /usr/local/include/g2o/core/base_fixed_sized_edge.hpp:75:26: error: ‘std::index_sequence’ has not been declared const AtOType&, std::index_sequence<>) {} ^~~~~~ /usr/local/include/g2o/core/base_fixed_sized_edge.hpp:75:40: error: expected ‘,’ or ‘...’ before ‘<’ token const AtOType&, std::index_sequence<>) {} ^ /usr/local/include/g2o/core/base_fixed_sized_edge.hpp:80:30: error: ‘std::index_sequence’ has not been declared const AtOType& AtO, std::index_sequence) { ^~~~~~ /usr/local/include/g2o/core/base_fixed_sized_edge.hpp:80:44: error: expected ‘,’ or ‘...’ before ‘<’ token const AtOType& AtO, std::index_sequence) { ^ /usr/local/include/g2o/core/base_fixed_sized_edge.hpp: In member function ‘void g2o::BaseFixedSizedEdge<D, E, VertexTypes>::constructOffDiagonalQuadraticFormM(const AtOType&)’: /usr/local/include/g2o/core/base_fixed_sized_edge.hpp:99:45: error: ‘_hessianTupleTransposed’ was not declared in this scope auto& hessianTransposed = std::get(_hessianTupleTransposed); ^~~~~~~ /usr/local/include/g2o/core/base_fixed_sized_edge.hpp:99:45: note: suggested alternative: ‘hessianTransposed’ auto& hessianTransposed = std::get(_hessianTupleTransposed); ^~~~~~~ hessianTransposed /usr/local/include/g2o/core/base_fixed_sized_edge.hpp:102:35: error: ‘_hessianTuple’ was not declared in this scope auto& hessian = std::get(_hessianTuple); ^~~~~ /usr/local/include/g2o/core/base_fixed_sized_edge.hpp:102:35: note: suggested alternative: ‘HessianTupleType’ auto& hessian = std::get(_hessianTuple); ^~~~~ HessianTupleType /usr/local/include/g2o/core/base_fixed_sized_edge.hpp: In member function ‘void g2o::BaseFixedSizedEdge<D, E, VertexTypes>::constructQuadraticFormN(const InformationType&, const ErrorVector&)’: /usr/local/include/g2o/core/base_fixed_sized_edge.hpp:123:54: error: ‘make_index_sequence’ is not a member of ‘std’ constructOffDiagonalQuadraticFormMs(AtO, std::make_index_sequence<_nr_of_vertices - N - 1>()); ^~~~~~~ /usr/local/include/g2o/core/base_fixed_sized_edge.hpp:123:99: error: expected primary-expression before ‘)’ token constructOffDiagonalQuadraticFormMs(AtO, std::make_index_sequence<_nr_of_vertices - N - 1>()); ^ /usr/local/include/g2o/core/base_fixed_sized_edge.hpp: In member function ‘virtual void g2o::BaseFixedSizedEdge<D, E, VertexTypes>::linearizeOplus(g2o::JacobianWorkspace&)’: /usr/local/include/g2o/core/base_fixed_sized_edge.hpp:130:51: error: ‘make_index_sequence’ is not a member of ‘std’ linearizeOplus_allocate(jacobianWorkspace, std::make_index_sequence<_nr_of_vertices>()); ^~~~~~~ /usr/local/include/g2o/core/base_fixed_sized_edge.hpp:130:88: error: expected primary-expression before ‘)’ token linearizeOplus_allocate(jacobianWorkspace, std::make_index_sequence<_nr_of_vertices>()); ^ /usr/local/include/g2o/core/base_fixed_sized_edge.hpp: At global scope: /usr/local/include/g2o/core/base_fixed_sized_edge.hpp:137:48: error: ‘std::index_sequence’ has not been declared JacobianWorkspace& jacobianWorkspace, std::index_sequence) { ^~~~~~ /usr/local/include/g2o/core/base_fixed_sized_edge.hpp:137:62: error: expected ‘,’ or ‘...’ before ‘<’ token JacobianWorkspace& jacobianWorkspace, std::index_sequence) { ^ /usr/local/include/g2o/core/base_fixed_sized_edge.hpp:191:70: error: variable or field ‘linearizeOplusNs’ declared void void BaseFixedSizedEdge<D, E, VertexTypes...>::linearizeOplusNs(std::index_sequence) { ^~~~~~ /usr/local/include/g2o/core/base_fixed_sized_edge.hpp:191:70: error: ‘index_sequence’ is not a member of ‘std’ /usr/local/include/g2o/core/base_fixed_sized_edge.hpp: In member function ‘virtual void g2o::BaseFixedSizedEdge<D, E, VertexTypes>::linearizeOplus()’: /usr/local/include/g2o/core/base_fixed_sized_edge.hpp:200:25: error: ‘make_index_sequence’ is not a member of ‘std’ linearizeOplusNs(std::make_index_sequence<_nr_of_vertices>()); ^~~~~~~ /usr/local/include/g2o/core/base_fixed_sized_edge.hpp:200:62: error: expected primary-expression before ‘)’ token linearizeOplusNs(std::make_index_sequence<_nr_of_vertices>()); ^ /usr/local/include/g2o/core/base_fixed_sized_edge.hpp: In member function ‘virtual void g2o::BaseFixedSizedEdge<D, E, VertexTypes>::mapHessianMemory(number_t*, int, int, bool)’: /usr/local/include/g2o/core/base_fixed_sized_edge.hpp:228:57: error: ‘_hessianTupleTransposed’ was not declared in this scope tuple_apply_i(MapHessianMemoryK{d, vj_dim, vi_dim}, _hessianTupleTransposed, k); ^~~~~~~ /usr/local/include/g2o/core/base_fixed_sized_edge.hpp:228:57: note: suggested alternative: ‘HessianTupleType’ tuple_apply_i(MapHessianMemoryK{d, vj_dim, vi_dim}, _hessianTupleTransposed, k); ^~~~~~~ HessianTupleType /usr/local/include/g2o/core/base_fixed_sized_edge.hpp:230:57: error: ‘_hessianTuple’ was not declared in this scope tuple_apply_i(MapHessianMemoryK{d, vi_dim, vj_dim}, _hessianTuple, k); ^~~~~ /usr/local/include/g2o/core/base_fixed_sized_edge.hpp:230:57: note: suggested alternative: ‘HessianTupleType’ tuple_apply_i(MapHessianMemoryK{d, vi_dim, vj_dim}, _hessianTuple, k); ^~~~~ HessianTupleType In file included from /usr/include/pcl-1.8/pcl/io/boost.h:54:0, from /usr/include/pcl-1.8/pcl/io/file_io.h:43, from /usr/include/pcl-1.8/pcl/io/pcd_io.h:44, from /home/krill/BATHY_SLAM_IGNACIOTB/bathymetric_slam/src/submaps_tools/include/submaps_tools/submaps.hpp:21, from /home/krill/BATHY_SLAM_IGNACIOTB/bathymetric_slam/src/graph_optimization/include/graph_optimization/graph_construction.hpp:22, from /home/krill/BATHY_SLAM_IGNACIOTB/bathymetric_slam/src/graph_optimization/src/graph_construction.cpp:12: /usr/local/include/boost/bind.hpp: At global scope: /usr/local/include/boost/bind.hpp:41:1: note: #pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior. ) ^ /home/krill/BATHY_SLAM_IGNACIOTB/bathymetric_slam/src/graph_optimization/src/graph_construction.cpp: In member function ‘void GraphConstructor::findLoopClosures(SubmapObj&, const SubmapsVec&, double)’: /home/krill/BATHY_SLAM_IGNACIOTB/bathymetric_slam/src/graph_optimization/src/graph_construction.cpp:128:48: warning: unused parameter ‘info_thres’ [-Wunused-parameter] double info_thres){ ^~~~~~ /home/krill/BATHY_SLAM_IGNACIOTB/bathymetric_slam/src/graph_optimization/src/graph_construction.cpp: In member function ‘void GraphConstructor::addNoiseToGraph(GaussianGen&, GaussianGen&)’: /home/krill/BATHY_SLAM_IGNACIOTB/bathymetric_slam/src/graph_optimization/src/graph_construction.cpp:162:53: warning: unused parameter ‘transSampler’ [-Wunused-parameter] void GraphConstructor::addNoiseToGraph(GaussianGen& transSampler, GaussianGen& rotSampler){ ^~~~ src/graph_optimization/CMakeFiles/graph_construction.dir/build.make:62: recipe for target 'src/graph_optimization/CMakeFiles/graph_construction.dir/src/graph_construction.cpp.o' failed make[2]: [src/graph_optimization/CMakeFiles/graph_construction.dir/src/graph_construction.cpp.o] Error 1 CMakeFiles/Makefile2:230: recipe for target 'src/graph_optimization/CMakeFiles/graph_construction.dir/all' failed make[1]: [src/graph_optimization/CMakeFiles/graph_construction.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make: *** [all] Error 2

make.log

ignaciotb commented 3 years ago

Have you successfully installed g2o at system level?

HikariS97 commented 3 years ago

Have you successfully installed g2o at system level?

I replace "-std=c++14" with CMAKE_CXX_STANDARD 14, then it works.