SD-DefSLAM icon indicating copy to clipboard operation
SD-DefSLAM copied to clipboard

g2o

Open lrl-hub opened this issue 8 months ago • 7 comments

I would like to ask if you have encountered the following issues(I could not find the file /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp):

[ 87%] Building CXX object CMakeFiles/DeformableSLAM.dir/Modules/Tracking/DefTracking.cc.o In file included from /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_multi_edge.h:30, from /home/lrl/SD-DefSLAM/Thirdparty/g2o/g2o/types/sft_types.h:35, from /home/lrl/SD-DefSLAM/Modules/Tracking/DefOptimizer.cc:51: /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.h:56:23: error: type/value mismatch at argument 1 in template parameter list for ‘template<class MatrixType, int MapOptions, class StrideType> class Eigen::Map’ 56 | Eigen::Map<MatrixX> matrix; ///< the mapped memory | ^ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.h:56:23: note: expected a type, got ‘MatrixX’ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.h:64:11: error: typedef declared ‘auto’ 64 | typedef MatrixX::MapType JacobianType; | ^~~~~~~ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.h:64:18: error: typedef name may not be a nested-name-specifier 64 | typedef MatrixX::MapType JacobianType; | ^~ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.h:64:20: error: expected ‘;’ at end of member declaration 64 | typedef MatrixX::MapType JacobianType; | ^~~~~~~ | ; /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.h:64:28: error: ‘JacobianType’ does not name a type 64 | typedef MatrixX::MapType JacobianType; | ^~~~~~~~~~~~ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.h:69:53: error: type/value mismatch at argument 1 in template parameter list for ‘template<class MatrixType, int MapOptions, class StrideType> class Eigen::Map’ 69 | : Eigen::Unaligned> | ^ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.h:69:53: note: expected a type, got ‘MatrixX’ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.h:69:53: error: template argument 2 is invalid /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.h:100:15: error: ‘JacobianType’ was not declared in this scope 100 | std::vector<JacobianType> | ^~~~~~~~~~~~ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.h:100:27: error: template argument 1 is invalid 100 | std::vector<JacobianType> | ^ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.h:100:27: error: template argument 2 is invalid In file included from /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.h:110, from /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_multi_edge.h:30, from /home/lrl/SD-DefSLAM/Thirdparty/g2o/g2o/types/sft_types.h:35, from /home/lrl/SD-DefSLAM/Modules/Tracking/DefOptimizer.cc:51: /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp: In member function ‘virtual void g2o::BaseVariableSizedEdge<D, E>::constructQuadraticForm()’: /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:40:13: error: alias template deduction only available with ‘-std=c++20’ or ‘-std=gnu++20’ 40 | Vector3 rho; | ^~~ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp: In member function ‘virtual void g2o::BaseVariableSizedEdge<D, E>::linearizeOplus(g2o::JacobianWorkspace&)’: /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:58:25: error: invalid types ‘int[size_t {aka long unsigned int}]’ for array subscript 58 | new (&_jacobianOplus[i]) | ^ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:59:9: error: expected type-specifier before ‘JacobianType’ 59 | JacobianType(jacobianWorkspace.workspaceForVertex(i), | ^~~~~~~~~~~~ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp: In member function ‘virtual void g2o::BaseVariableSizedEdge<D, E>::linearizeOplus()’: /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:67:24: error: there are no arguments to ‘cst’ that depend on a template parameter, so a declaration of ‘cst’ must be available [-fpermissive] 67 | const double delta = cst(1e-9); | ^~~ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:67:24: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated) /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:81:15: error: ‘QuadraticFormLock’ is not a member of ‘g2o::internal’ 81 | internal::QuadraticFormLock lck(vi); | ^~~~~~~~~~~~~~~~~ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:89:19: error: invalid types ‘int[size_t {aka long unsigned int}]’ for array subscript 89 | _jacobianOplus[i].resize(_dimension, vi_dim); | ^ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:108:21: error: invalid types ‘int[size_t {aka long unsigned int}]’ for array subscript 108 | _jacobianOplus[i].col(d) = scalar * errorBak; | ^ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp: In member function ‘virtual void g2o::BaseVariableSizedEdge<D, E>::resize(size_t)’: /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:143:18: error: request for member ‘resize’ in ‘((g2o::BaseVariableSizedEdge<D, E>)this)->g2o::BaseVariableSizedEdge<D, E>::_jacobianOplus’, which is of non-class type ‘int’ 143 | _jacobianOplus.resize(size, JacobianType(0, 0, 0)); | ^~~~~~ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:143:31: error: there are no arguments to ‘JacobianType’ that depend on a template parameter, so a declaration of ‘JacobianType’ must be available [-fpermissive] 143 | _jacobianOplus.resize(size, JacobianType(0, 0, 0)); | ^~~~~~~~~~~~ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp: In member function ‘void g2o::BaseVariableSizedEdge<D, E>::computeQuadraticForm(const InformationType&, const ErrorVector&)’: /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:165:13: error: ‘JacobianType’ does not name a type 165 | const JacobianType& A = _jacobianOplus[i]; | ^~~~~~~~~~~~ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:167:21: error: ‘A’ was not declared in this scope 167 | MatrixX AtO = A.transpose() * omega; | ^ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:170:25: error: type/value mismatch at argument 1 in template parameter list for ‘template<class MatrixType, int MapOptions, class StrideType> class Eigen::Map’ 170 | Eigen::Map<MatrixX> fromMap(from->hessianData(), fromDim, fromDim); | ^ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:170:25: note: expected a type, got ‘MatrixX’ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:170:72: error: expression list treated as compound expression in initializer [-fpermissive] 170 | Eigen::Map<MatrixX> fromMap(from->hessianData(), fromDim, fromDim); | ^

/home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:171:25: error: type/value mismatch at argument 1 in template parameter list for ‘template<class MatrixType, int MapOptions, class StrideType> class Eigen::Map’ 171 | Eigen::Map<VectorX> fromB(from->bData(), fromDim); | ^ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:171:25: note: expected a type, got ‘VectorX’ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:171:55: error: expression list treated as compound expression in initializer [-fpermissive] 171 | Eigen::Map<VectorX> fromB(from->bData(), fromDim); | ^ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:175:19: error: ‘QuadraticFormLock’ is not a member of ‘g2o::internal’ 175 | internal::QuadraticFormLock lck(from); | ^~~~~~~~~~~~~~~~~ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:176:17: error: request for member ‘noalias’ in ‘fromMap’, which is of non-class type ‘int’ 176 | fromMap.noalias() += AtO * A; | ^~~~~~~ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:177:15: error: request for member ‘noalias’ in ‘fromB’, which is of non-class type ‘int’ 177 | fromB.noalias() += A.transpose() * weightedError; | ^~~~~~~ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:187:21: error: ‘QuadraticFormLock’ is not a member of ‘g2o::internal’ 187 | internal::QuadraticFormLock lck(to); | ^~~~~~~~~~~~~~~~~ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:188:17: error: ‘JacobianType’ does not name a type 188 | const JacobianType& B = _jacobianOplus[j]; | ^~~~~~~~~~~~ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:194:41: error: ‘B’ was not declared in this scope 194 | hhelper.matrix.noalias() += B.transpose() * AtO.transpose(); | ^ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:196:47: error: ‘B’ was not declared in this scope 196 | hhelper.matrix.noalias() += AtO * B; | ^ In file included from /home/lrl/SD-DefSLAM/Modules/Tracking/DefOptimizer.cc:51: /home/lrl/SD-DefSLAM/Thirdparty/g2o/g2o/types/sft_types.h: In member function ‘virtual void g2o::EdgeNodesCamera::linearizeOplus()’: /home/lrl/SD-DefSLAM/Thirdparty/g2o/g2o/types/sft_types.h:162:21: error: invalid types ‘int[int]’ for array subscript 162 | _jacobianOplus[0](0, 0) = x * y / z_2 * fx; | ^ /home/lrl/SD-DefSLAM/Thirdparty/g2o/g2o/types/sft_types.h:163:21: error: invalid types ‘int[int]’ for array subscript 163 | _jacobianOplus[0](0, 1) = -(1 + (x * x / z_2)) * fx; | ^ /home/lrl/SD-DefSLAM/Thirdparty/g2o/g2o/types/sft_types.h:164:21: error: invalid types ‘int[int]’ for array subscript 164 | _jacobianOplus[0](0, 2) = y / z * fx; | ^ /home/lrl/SD-DefSLAM/Thirdparty/g2o/g2o/types/sft_types.h:165:21: error: invalid types ‘int[int]’ for array subscript 165 | _jacobianOplus[0](0, 3) = -1. / z * fx; | ^ /home/lrl/SD-DefSLAM/Thirdparty/g2o/g2o/types/sft_types.h:166:21: error: invalid types ‘int[int]’ for array subscript 166 | _jacobianOplus[0](0, 4) = 0; | ^ /home/lrl/SD-DefSLAM/Thirdparty/g2o/g2o/types/sft_types.h:167:21: error: invalid types ‘int[int]’ for array subscript 167 | _jacobianOplus[0](0, 5) = x / z_2 * fx; | ^ /home/lrl/SD-DefSLAM/Thirdparty/g2o/g2o/types/sft_types.h:169:21: error: invalid types ‘int[int]’ for array subscript 169 | _jacobianOplus[0](1, 0) = (1 + y * y / z_2) * fy; | ^ /home/lrl/SD-DefSLAM/Thirdparty/g2o/g2o/types/sft_types.h:170:21: error: invalid types ‘int[int]’ for array subscript 170 | _jacobianOplus[0](1, 1) = -x * y / z_2 * fy; | ^ /home/lrl/SD-DefSLAM/Thirdparty/g2o/g2o/types/sft_types.h:171:21: error: invalid types ‘int[int]’ for array subscript 171 | _jacobianOplus[0](1, 2) = -x / z * fy; | ^ /home/lrl/SD-DefSLAM/Thirdparty/g2o/g2o/types/sft_types.h:172:21: error: invalid types ‘int[int]’ for array subscript 172 | _jacobianOplus[0](1, 3) = 0; | ^ /home/lrl/SD-DefSLAM/Thirdparty/g2o/g2o/types/sft_types.h:173:21: error: invalid types ‘int[int]’ for array subscript 173 | _jacobianOplus[0](1, 4) = -1. / z * fy; | ^ /home/lrl/SD-DefSLAM/Thirdparty/g2o/g2o/types/sft_types.h:174:21: error: invalid types ‘int[int]’ for array subscript 174 | _jacobianOplus[0](1, 5) = y / z_2 * fy; | ^ /home/lrl/SD-DefSLAM/Thirdparty/g2o/g2o/types/sft_types.h:189:21: error: invalid types ‘int[int]’ for array subscript 189 | _jacobianOplus[1] = -1. / z * tmp * Trot * Barycentric(0); | ^ /home/lrl/SD-DefSLAM/Thirdparty/g2o/g2o/types/sft_types.h:198:21: error: invalid types ‘int[int]’ for array subscript 198 | _jacobianOplus[2] = -1. / z * tmp * Trot * Barycentric(1); | ^ /home/lrl/SD-DefSLAM/Thirdparty/g2o/g2o/types/sft_types.h:205:21: error: invalid types ‘int[int]’ for array subscript 205 | _jacobianOplus[3] = -1. / z * tmp * Trot * Barycentric(2); | ^ /home/lrl/SD-DefSLAM/Thirdparty/g2o/g2o/types/sft_types.h: At global scope: /home/lrl/SD-DefSLAM/Thirdparty/g2o/g2o/types/sft_types.h:313:17: error: ‘JacobianType’ was not declared in this scope 313 | std::vector<JacobianType, Eigen::aligned_allocator<JacobianType>> | ^~~~~~~~~~~~ /home/lrl/SD-DefSLAM/Thirdparty/g2o/g2o/types/sft_types.h:313:56: error: ‘JacobianType’ was not declared in this scope 313 | std::vector<JacobianType, Eigen::aligned_allocator<JacobianType>> | ^~~~~~~~~~~~ /home/lrl/SD-DefSLAM/Thirdparty/g2o/g2o/types/sft_types.h:313:56: error: template argument 1 is invalid /home/lrl/SD-DefSLAM/Thirdparty/g2o/g2o/types/sft_types.h:313:68: error: template argument 1 is invalid 313 | std::vector<JacobianType, Eigen::aligned_allocator<JacobianType>> | ^~ /home/lrl/SD-DefSLAM/Thirdparty/g2o/g2o/types/sft_types.h:313:68: error: template argument 2 is invalid /home/lrl/SD-DefSLAM/Thirdparty/g2o/g2o/types/sft_types.h: In member function ‘virtual void g2o::EdgeMeanCurvature::linearizeOplus()’: /home/lrl/SD-DefSLAM/Thirdparty/g2o/g2o/types/sft_types.h:295:21: error: invalid types ‘int[int]’ for array subscript 295 | jacobianOplus[0] = meanCurvature.transpose(); | ^ /home/lrl/SD-DefSLAM/Thirdparty/g2o/g2o/types/sft_types.h:297:42: error: request for member ‘size’ in ‘((g2o::EdgeMeanCurvature)this)->g2o::EdgeMeanCurvature::.g2o::BaseVariableSizedEdge<1, Eigen::Matrix<double, 1, 1, 0, 1, 1> >::_jacobianOplus’, which is of non-class type ‘int’ 297 | for (uint i(0); i < _jacobianOplus.size(); i++) | ^~~~ /home/lrl/SD-DefSLAM/Thirdparty/g2o/g2o/types/sft_types.h:301:25: error: invalid types ‘int[uint {aka unsigned int}]’ for array subscript 301 | _jacobianOplus[i] << 0.0, 0.0, 0.0; | ^ /home/lrl/SD-DefSLAM/Thirdparty/g2o/g2o/types/sft_types.h:307:25: error: invalid types ‘int[uint {aka unsigned int}]’ for array subscript 307 | jacobianOplus[i] = weight_aux * meanCurvature.transpose(); | ^ /home/lrl/SD-DefSLAM/Thirdparty/g2o/g2o/types/sft_types.h:309:23: error: invalid types ‘int[uint {aka unsigned int}]’ for array subscript 309 | jacobianOplus[i] = jacobianOplus[i] / (meanCurvatureNorm * lenghtEdge); | ^ /home/lrl/SD-DefSLAM/Thirdparty/g2o/g2o/types/sft_types.h:309:43: error: invalid types ‘int[uint {aka unsigned int}]’ for array subscript 309 | jacobianOplus[i] = jacobianOplus[i] / (meanCurvatureNorm * lenghtEdge); | ^ /home/lrl/SD-DefSLAM/Modules/Tracking/DefOptimizer.cc: In function ‘int defSLAM::Optimizer::poseOptimization(ORB_SLAM2::Frame)’: /home/lrl/SD-DefSLAM/Modules/Tracking/DefOptimizer.cc:173:19: warning: unused variable ‘chi2Mono’ [-Wunused-variable] 173 | const float chi2Mono[5] = {5.991, 5.991, 5.991, 5.991, 5.991}; | ^~~~~~~~ /home/lrl/SD-DefSLAM/Modules/Tracking/DefOptimizer.cc:174:17: warning: unused variable ‘its’ [-Wunused-variable] 174 | const int its[4] = {10, 10, 10, 10}; | ^~~ In file included from /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_multi_edge.h:30, from /home/lrl/SD-DefSLAM/Thirdparty/g2o/g2o/types/sft_types.h:35, from /home/lrl/SD-DefSLAM/Modules/Tracking/DefOptimizer.cc:51: /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.h: In instantiation of ‘g2o::BaseVariableSizedEdge<D, E>::HessianHelper::HessianHelper() [with int D = 2; E = Eigen::Matrix<double, 2, 1>]’: /usr/include/c++/11/bits/stl_construct.h:119:7: required from ‘void std::_Construct(_Tp*, _Args&& ...) [with _Tp = g2o::BaseVariableSizedEdge<2, Eigen::Matrix<double, 2, 1> >::HessianHelper; _Args = {}]’ /usr/include/c++/11/bits/stl_uninitialized.h:579:18: required from ‘static _ForwardIterator std::__uninitialized_default_n_1<_TrivialValueType>::__uninit_default_n(_ForwardIterator, _Size) [with _ForwardIterator = g2o::BaseVariableSizedEdge<2, Eigen::Matrix<double, 2, 1> >::HessianHelper*; _Size = long unsigned int; bool _TrivialValueType = false]’ /usr/include/c++/11/bits/stl_uninitialized.h:640:20: required from ‘_ForwardIterator std::__uninitialized_default_n(_ForwardIterator, _Size) [with _ForwardIterator = g2o::BaseVariableSizedEdge<2, Eigen::Matrix<double, 2, 1> >::HessianHelper*; _Size = long unsigned int]’ /usr/include/c++/11/bits/stl_uninitialized.h:704:44: required from ‘_ForwardIterator std::__uninitialized_default_n_a(_ForwardIterator, _Size, std::allocator<_Tp>&) [with _ForwardIterator = g2o::BaseVariableSizedEdge<2, Eigen::Matrix<double, 2, 1> >::HessianHelper*; _Size = long unsigned int; _Tp = g2o::BaseVariableSizedEdge<2, Eigen::Matrix<double, 2, 1> >::HessianHelper]’ /usr/include/c++/11/bits/vector.tcc:627:35: required from ‘void std::vector<_Tp, _Alloc>::_M_default_append(std::vector<_Tp, _Alloc>::size_type) [with _Tp = g2o::BaseVariableSizedEdge<2, Eigen::Matrix<double, 2, 1> >::HessianHelper; _Alloc = std::allocator<g2o::BaseVariableSizedEdge<2, Eigen::Matrix<double, 2, 1> >::HessianHelper>; std::vector<_Tp, _Alloc>::size_type = long unsigned int]’ /usr/include/c++/11/bits/stl_vector.h:940:4: required from ‘void std::vector<_Tp, _Alloc>::resize(std::vector<_Tp, _Alloc>::size_type) [with _Tp = g2o::BaseVariableSizedEdge<2, Eigen::Matrix<double, 2, 1> >::HessianHelper; _Alloc = std::allocator<g2o::BaseVariableSizedEdge<2, Eigen::Matrix<double, 2, 1> >::HessianHelper>; std::vector<_Tp, _Alloc>::size_type = long unsigned int]’ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:142:18: required from ‘void g2o::BaseVariableSizedEdge<D, E>::resize(size_t) [with int D = 2; E = Eigen::Matrix<double, 2, 1>; size_t = long unsigned int]’ /home/lrl/SD-DefSLAM/Modules/Tracking/DefOptimizer.cc:299:24: required from here /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.h:58:23: error: expression list treated as compound expression in mem-initializer [-fpermissive] 58 | HessianHelper() : matrix(0, 0, 0), transposed(false) {} | ^~~~~~~~~~~~~~~ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.h:58:30: warning: left operand of comma operator has no effect [-Wunused-value] 58 | HessianHelper() : matrix(0, 0, 0), transposed(false) {} | ^ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.h:58:23: warning: right operand of comma operator has no effect [-Wunused-value] 58 | HessianHelper() : matrix(0, 0, 0), transposed(false) {} | ^~~~~~~~~~~~~~~ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.h: In instantiation of ‘g2o::BaseVariableSizedEdge<D, E>::HessianHelper::HessianHelper() [with int D = 1; E = Eigen::Matrix<double, 1, 1, 0, 1, 1>]’: /usr/include/c++/11/bits/stl_construct.h:119:7: required from ‘void std::_Construct(_Tp*, _Args&& ...) [with _Tp = g2o::BaseVariableSizedEdge<1, Eigen::Matrix<double, 1, 1, 0, 1, 1> >::HessianHelper; _Args = {}]’ /usr/include/c++/11/bits/stl_uninitialized.h:579:18: required from ‘static _ForwardIterator std::__uninitialized_default_n_1<_TrivialValueType>::__uninit_default_n(_ForwardIterator, _Size) [with _ForwardIterator = g2o::BaseVariableSizedEdge<1, Eigen::Matrix<double, 1, 1, 0, 1, 1> >::HessianHelper*; _Size = long unsigned int; bool _TrivialValueType = false]’ /usr/include/c++/11/bits/stl_uninitialized.h:640:20: required from ‘_ForwardIterator std::__uninitialized_default_n(_ForwardIterator, _Size) [with _ForwardIterator = g2o::BaseVariableSizedEdge<1, Eigen::Matrix<double, 1, 1, 0, 1, 1> >::HessianHelper*; _Size = long unsigned int]’ /usr/include/c++/11/bits/stl_uninitialized.h:704:44: required from ‘_ForwardIterator std::__uninitialized_default_n_a(_ForwardIterator, _Size, std::allocator<_Tp>&) [with _ForwardIterator = g2o::BaseVariableSizedEdge<1, Eigen::Matrix<double, 1, 1, 0, 1, 1> >::HessianHelper*; _Size = long unsigned int; _Tp = g2o::BaseVariableSizedEdge<1, Eigen::Matrix<double, 1, 1, 0, 1, 1> >::HessianHelper]’ /usr/include/c++/11/bits/vector.tcc:627:35: required from ‘void std::vector<_Tp, _Alloc>::_M_default_append(std::vector<_Tp, _Alloc>::size_type) [with _Tp = g2o::BaseVariableSizedEdge<1, Eigen::Matrix<double, 1, 1, 0, 1, 1> >::HessianHelper; _Alloc = std::allocator<g2o::BaseVariableSizedEdge<1, Eigen::Matrix<double, 1, 1, 0, 1, 1> >::HessianHelper>; std::vector<_Tp, _Alloc>::size_type = long unsigned int]’ /usr/include/c++/11/bits/stl_vector.h:940:4: required from ‘void std::vector<_Tp, _Alloc>::resize(std::vector<_Tp, _Alloc>::size_type) [with _Tp = g2o::BaseVariableSizedEdge<1, Eigen::Matrix<double, 1, 1, 0, 1, 1> >::HessianHelper; _Alloc = std::allocator<g2o::BaseVariableSizedEdge<1, Eigen::Matrix<double, 1, 1, 0, 1, 1> >::HessianHelper>; std::vector<_Tp, _Alloc>::size_type = long unsigned int]’ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:142:18: required from ‘void g2o::BaseVariableSizedEdge<D, E>::resize(size_t) [with int D = 1; E = Eigen::Matrix<double, 1, 1, 0, 1, 1>; size_t = long unsigned int]’ /home/lrl/SD-DefSLAM/Modules/Tracking/DefOptimizer.cc:434:22: required from here /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.h:58:23: error: expression list treated as compound expression in mem-initializer [-fpermissive] /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.h:58:30: warning: left operand of comma operator has no effect [-Wunused-value] 58 | HessianHelper() : matrix(0, 0, 0), transposed(false) {} | ^ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.h:58:23: warning: right operand of comma operator has no effect [-Wunused-value] 58 | HessianHelper() : matrix(0, 0, 0), transposed(false) {} | ^~~~~~~~~~~~~~~ In file included from /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.h:110, from /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_multi_edge.h:30, from /home/lrl/SD-DefSLAM/Thirdparty/g2o/g2o/types/sft_types.h:35, from /home/lrl/SD-DefSLAM/Modules/Tracking/DefOptimizer.cc:51: /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp: In instantiation of ‘void g2o::BaseVariableSizedEdge<D, E>::mapHessianMemory(double*, int, int, bool) [with int D = 1; E = Eigen::Matrix<double, 1, 1, 0, 1, 1>]’: /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:115:6: required from here /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:127:18: error: request for member ‘data’ in ‘h.g2o::BaseVariableSizedEdge<1, Eigen::Matrix<double, 1, 1, 0, 1, 1> >::HessianHelper::matrix’, which is of non-class type ‘int’ 127 | if (h.matrix.data() != d || h.transposed != rowMajor) | ~~~~~~~~~^~~~ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:128:7: error: new initializer expression list treated as compound expression [-fpermissive] 128 | new (&h.matrix) HessianBlockType(d, vj->dimension(), vi->dimension()); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:128:40: warning: left operand of comma operator has no effect [-Wunused-value] 128 | new (&h.matrix) HessianBlockType(d, vj->dimension(), vi->dimension()); | ^ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:130:18: error: request for member ‘data’ in ‘h.g2o::BaseVariableSizedEdge<1, Eigen::Matrix<double, 1, 1, 0, 1, 1> >::HessianHelper::matrix’, which is of non-class type ‘int’ 130 | if (h.matrix.data() != d || h.transposed != rowMajor) | ~~~~~~~~~^~~~ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:131:7: error: new initializer expression list treated as compound expression [-fpermissive] 131 | new (&h.matrix) HessianBlockType(d, vi->dimension(), vj->dimension()); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:131:40: warning: left operand of comma operator has no effect [-Wunused-value] 131 | new (&h.matrix) HessianBlockType(d, vi->dimension(), vj->dimension()); | ^ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp: In instantiation of ‘void g2o::BaseVariableSizedEdge<D, E>::linearizeOplus(g2o::JacobianWorkspace&) [with int D = 1; E = Eigen::Matrix<double, 1, 1, 0, 1, 1>]’: /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:52:6: required from here /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:55:31: warning: unused variable ‘v’ [-Wunused-variable] 55 | OptimizableGraph::Vertex* v = | ^ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp: In instantiation of ‘void g2o::BaseVariableSizedEdge<D, E>::linearizeOplus() [with int D = 1; E = Eigen::Matrix<double, 1, 1, 0, 1, 1>]’: /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:66:6: required from here /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:67:27: error: ‘cst’ was not declared in this scope 67 | const double delta = cst(1e-9); | ~~~^~~~~~ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp: In instantiation of ‘void g2o::BaseVariableSizedEdge<D, E>::mapHessianMemory(double*, int, int, bool) [with int D = 2; E = Eigen::Matrix<double, 2, 1>]’: /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:115:6: required from here /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:127:18: error: request for member ‘data’ in ‘h.g2o::BaseVariableSizedEdge<2, Eigen::Matrix<double, 2, 1> >::HessianHelper::matrix’, which is of non-class type ‘int’ 127 | if (h.matrix.data() != d || h.transposed != rowMajor) | ~~~~~~~~~^~~~ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:128:7: error: new initializer expression list treated as compound expression [-fpermissive] 128 | new (&h.matrix) HessianBlockType(d, vj->dimension(), vi->dimension()); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:128:40: warning: left operand of comma operator has no effect [-Wunused-value] 128 | new (&h.matrix) HessianBlockType(d, vj->dimension(), vi->dimension()); | ^ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:130:18: error: request for member ‘data’ in ‘h.g2o::BaseVariableSizedEdge<2, Eigen::Matrix<double, 2, 1> >::HessianHelper::matrix’, which is of non-class type ‘int’ 130 | if (h.matrix.data() != d || h.transposed != rowMajor) | ~~~~~~~~~^~~~ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:131:7: error: new initializer expression list treated as compound expression [-fpermissive] 131 | new (&h.matrix) HessianBlockType(d, vi->dimension(), vj->dimension()); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:131:40: warning: left operand of comma operator has no effect [-Wunused-value] 131 | new (&h.matrix) HessianBlockType(d, vi->dimension(), vj->dimension()); | ^ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp: In instantiation of ‘void g2o::BaseVariableSizedEdge<D, E>::linearizeOplus(g2o::JacobianWorkspace&) [with int D = 2; E = Eigen::Matrix<double, 2, 1>]’: /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:52:6: required from here /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:55:31: warning: unused variable ‘v’ [-Wunused-variable] 55 | OptimizableGraph::Vertex* v = | ^ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp: In instantiation of ‘void g2o::BaseVariableSizedEdge<D, E>::linearizeOplus() [with int D = 2; E = Eigen::Matrix<double, 2, 1>]’: /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:66:6: required from here /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:67:27: error: ‘cst’ was not declared in this scope 67 | const double delta = cst(1e-9); | ~~~^~~~~~ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp: In instantiation of ‘void g2o::BaseVariableSizedEdge<D, E>::computeQuadraticForm(const InformationType&, const ErrorVector&) [with int D = 1; E = Eigen::Matrix<double, 1, 1, 0, 1, 1>; g2o::BaseVariableSizedEdge<D, E>::InformationType = Eigen::Matrix<double, 1, 1, 0, 1, 1>; g2o::BaseVariableSizedEdge<D, E>::ErrorVector = Eigen::Matrix<double, 1, 1, 0, 1, 1>]’: /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:45:5: required from ‘void g2o::BaseVariableSizedEdge<D, E>::constructQuadraticForm() [with int D = 1; E = Eigen::Matrix<double, 1, 1, 0, 1, 1>]’ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:37:6: required from here /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:170:72: warning: right operand of comma operator has no effect [-Wunused-value] 170 | Eigen::Map<MatrixX> fromMap(from->hessianData(), fromDim, fromDim); | ^

/home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:194:28: error: request for member ‘noalias’ in ‘hhelper.g2o::BaseVariableSizedEdge<1, Eigen::Matrix<double, 1, 1, 0, 1, 1> >::HessianHelper::matrix’, which is of non-class type ‘int’ 194 | hhelper.matrix.noalias() += B.transpose() * AtO.transpose(); | ~~~~~~~~~~~~~~~^~~~~~~ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:196:28: error: request for member ‘noalias’ in ‘hhelper.g2o::BaseVariableSizedEdge<1, Eigen::Matrix<double, 1, 1, 0, 1, 1> >::HessianHelper::matrix’, which is of non-class type ‘int’ 196 | hhelper.matrix.noalias() += AtO * B; | ~~~~~~~~~~~~~~~^~~~~~~ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp: In instantiation of ‘void g2o::BaseVariableSizedEdge<D, E>::computeQuadraticForm(const InformationType&, const ErrorVector&) [with int D = 2; E = Eigen::Matrix<double, 2, 1>; g2o::BaseVariableSizedEdge<D, E>::InformationType = Eigen::Matrix<double, 2, 2>; g2o::BaseVariableSizedEdge<D, E>::ErrorVector = Eigen::Matrix<double, 2, 1>]’: /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:45:5: required from ‘void g2o::BaseVariableSizedEdge<D, E>::constructQuadraticForm() [with int D = 2; E = Eigen::Matrix<double, 2, 1>]’ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:37:6: required from here /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:170:72: warning: right operand of comma operator has no effect [-Wunused-value] 170 | Eigen::Map<MatrixX> fromMap(from->hessianData(), fromDim, fromDim); | ^

/home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:194:28: error: request for member ‘noalias’ in ‘hhelper.g2o::BaseVariableSizedEdge<2, Eigen::Matrix<double, 2, 1> >::HessianHelper::matrix’, which is of non-class type ‘int’ 194 | hhelper.matrix.noalias() += B.transpose() * AtO.transpose(); | ~~~~~~~~~~~~~~~^~~~~~~ /home/lrl/SD-DefSLAM/../g2o/g2o/core/base_variable_sized_edge.hpp:196:28: error: request for member ‘noalias’ in ‘hhelper.g2o::BaseVariableSizedEdge<2, Eigen::Matrix<double, 2, 1> >::HessianHelper::matrix’, which is of non-class type ‘int’ 196 | hhelper.matrix.noalias() += AtO * B; | ~~~~~~~~~~~~~~~^~~~~~~ [ 87%] Building CXX object CMakeFiles/DeformableSLAM.dir/Modules/Viewer/DefFrameDrawer.cc.o make[2]: *** [CMakeFiles/DeformableSLAM.dir/build.make:552:CMakeFiles/DeformableSLAM.dir/Modules/Tracking/DefOptimizer.cc.o] 错误 1 make[2]: *** 正在等待未完成的任务.... make[1]: *** [CMakeFiles/Makefile2:231:CMakeFiles/DeformableSLAM.dir/all] 错误 2 make: *** [Makefile:91:all] 错误 2

lrl-hub avatar Mar 20 '25 09:03 lrl-hub