g2o
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::
/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