i2Nav-WHU / IC-GVINS

A Robust, Real-time, INS-Centric GNSS-Visual-Inertial Navigation System
GNU General Public License v3.0
458 stars 109 forks source link

ceres-solver related errors #15

Closed Mahmoudadham4040 closed 1 year ago

Mahmoudadham4040 commented 1 year ago

In file included from /home/adham/catkin_wsicgvins/src/IC-GVINS/ic_gvins/ic_gvins/ic_gvins.cc:23: In file included from /home/adham/catkin_wsicgvins/src/IC-GVINS/ic_gvins/ic_gvins/ic_gvins.h:32: In file included from /home/adham/catkin_wsicgvins/src/IC-GVINS/ic_gvins/ic_gvins/factors/marginalization_info.h:26: In file included from /home/adham/catkin_wsicgvins/src/IC-GVINS/ic_gvins/ic_gvins/factors/residual_block_info.h:29: In file included from /usr/local/include/ceres/ceres.h:37: /usr/local/include/ceres/autodiff_costfunction.h:208:11: error: qualified name refers into a specialization of function template 'internal::VariadicEvaluate' ::Call(*functor, parameters, residuals); ^ /usr/local/include/ceres/internal/variadic_evaluate.h:103:13: note: function template 'VariadicEvaluate' declared here inline bool VariadicEvaluate(const Functor& functor, ^ In file included from /home/adham/catkin_wsicgvins/src/IC-GVINS/ic_gvins/ic_gvins/ic_gvins.cc:23: In file included from /home/adham/catkin_wsicgvins/src/IC-GVINS/ic_gvins/ic_gvins/ic_gvins.h:32: In file included from /home/adham/catkin_wsicgvins/src/IC-GVINS/ic_gvins/ic_gvins/factors/marginalization_info.h:26: In file included from /home/adham/catkin_wsicgvins/src/IC-GVINS/ic_gvins/ic_gvins/factors/residual_block_info.h:29: In file included from /usr/local/include/ceres/ceres.h:37: /usr/local/include/ceres/autodiff_cost_function.h:210:22: error: no member named 'AutoDiff' in namespace 'ceres::internal' return internal::AutoDiff<CostFunctor, double,


/usr/local/include/ceres/autodiff_cost_function.h:210:31: error: 'CostFunctor' does not refer to a value
    return internal::AutoDiff<CostFunctor, double,
                              ^
/usr/local/include/ceres/autodiff_cost_function.h:154:20: note: declared here
template <typename CostFunctor,
                   ^
[ 77%] Linking CXX shared library ../../../../../devel/lib/libabsl_synchronization.so
[ 77%] Building CXX object IC-GVINS/ic_gvins/CMakeFiles/ic_gvins_core.dir/ic_gvins/tracking/camera.cc.o
[ 77%] Built target absl_synchronization
[ 78%] Building CXX object IC-GVINS/ic_gvins/abseil-cpp/absl/container/CMakeFiles/absl_hashtablez_sampler.dir/internal/hashtablez_sampler.cc.o
In file included from /home/adham/catkin_wsicgvins/src/IC-GVINS/ic_gvins/ic_gvins/ic_gvins.cc:34:
/home/adham/catkin_wsicgvins/src/IC-GVINS/ic_gvins/ic_gvins/factors/pose_parameterization.h:30:44: error: expected class name
class PoseParameterization : public ceres::LocalParameterization {
                                           ^
[ 78%] Building CXX object IC-GVINS/ic_gvins/abseil-cpp/absl/container/CMakeFiles/absl_hashtablez_sampler.dir/internal/hashtablez_sampler_force_weak_definition.cc.o
/home/adham/catkin_wsicgvins/src/IC-GVINS/ic_gvins/ic_gvins/ic_gvins.cc:1747:5: error: no type named 'LocalParameterization' in namespace 'ceres'; did you mean 'PoseParameterization'?
    ceres::LocalParameterization *parameterization = new (PoseParameterization);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    PoseParameterization
/home/adham/catkin_wsicgvins/src/IC-GVINS/ic_gvins/ic_gvins/factors/pose_parameterization.h:30:7: note: 'PoseParameterization' declared here
class PoseParameterization : public ceres::LocalParameterization {
      ^
/home/adham/catkin_wsicgvins/src/IC-GVINS/ic_gvins/ic_gvins/ic_gvins.cc:1858:9: error: no type named 'LocalParameterization' in namespace 'ceres'; did you mean 'PoseParameterization'?
        ceres::LocalParameterization *parameterization = new (PoseParameterization);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
        PoseParameterization
/home/adham/catkin_wsicgvins/src/IC-GVINS/ic_gvins/ic_gvins/factors/pose_parameterization.h:30:7: note: 'PoseParameterization' declared here
class PoseParameterization : public ceres::LocalParameterization {

Can you please help me solve this problems?
thlsealight commented 1 year ago

We use Ceres Solver to solve the non-linear least squares problem in IC-GVINS. The supported version is Ceres Solver 2.0.0 or 2.1.0. Please follow Ceres installation instructions.

Mahmoudadham4040 commented 1 year ago

thank you for replying, i used the 2-version of ceres 2.0.0 and 2.1.0 as you stated in the read me file and got the above errors. "ubuntu 20.04, ceres 2.1.0,opencv 4.2" can you help me ?

thlsealight commented 1 year ago

thank you for replying, i used the 2-version of ceres 2.0.0 and 2.1.0 as you stated in the read me file and got the above errors. "ubuntu 20.04, ceres 2.1.0,opencv 4.2" can you help me ?

The PoseParameterization has been removed in the master branch after 2.1.0. Hence, you should download the exact released version, e.g. ceres-solver 2.0.0.

Mahmoudadham4040 commented 1 year ago

thank you for your help @thlsealight, errors came from 2-different version of ceres were installed.

sorry, can you provide me with the extraction code required to download "IC-GVINS Robot Dataset"?

thlsealight commented 1 year ago

The extraction codes are near the dataset links (within the brackets).