eigen 3.3.7
cmake -dcmake_install_prefix=/usr ..
sudo make install
ceres 1.14.0
編譯ceres時
could not find a configuration file for package "eigen3" that is compatible with requested version "3.3".
解決:把ceres版本調整到1.14.x
/usr/include/eigen3/eigen/src/core/mathfunctions.h: in instantiation of 『static newtype eigen::internal::cast_impl::run(const oldtype&) [with oldtype = ceres::jet; newtype = int]』:
/usr/include/eigen3/eigen/src/core/mathfunctions.h:375:42: required from 『newtype eigen::internal::cast(const oldtype&) [with oldtype = ceres::jet; newtype = int]』
/usr/include/eigen3/eigen/src/core/io.h:136:32: required from 『static int eigen::internal::significant_decimals_default_impl::run() [with scalar = ceres::jet; bool isinteger = false]』
/usr/include/eigen3/eigen/src/core/io.h:183:66: required from 『std::ostream& eigen::internal::print_matrix(std::ostream&, const derived&, const eigen::ioformat&) [with derived = eigen::matrix, 6, 1, 0, 6, 1>; std::ostream = std::basic_ostream]』
/usr/include/eigen3/eigen/src/core/io.h:248:32: required from 『std::ostream& eigen::operator >; std::ostream = std::basic_ostream]』
/home/cjn/1ros_workspace/vins_fusion_odom/src/vins-fusion/vins_estimator/src/estimator/../initial/../factor/odom_factor.h:30:19: required from 『bool odomfactor::operator()(const t*, const t*, t*) const [with t = ceres::jet]』
/usr/local/include/ceres/internal/variadic_evaluate.h:166:19: required from 『static bool ceres::internal::variadicevaluate::call(const functor&, const t* const*, t*) [with functor = odomfactor; t = ceres::jet; int n0 = 7; int n1 = 7]』
/usr/local/include/ceres/internal/autodiff.h:289:72: required from 『static bool ceres::internal::autodiff::differentiate(const functor&, const t* const*, int, t*, t**) [with functor = odomfactor; t = double; int n0 = 7; int n1 = 7; int n2 = 0; int n3 = 0; int n4 = 0; int n5 = 0; int n6 = 0; int n7 = 0; int n8 = 0; int n9 = 0]』
/usr/local/include/ceres/autodiff_cost_function.h:211:66: required from 『bool ceres::autodiffcostfunction::evaluate(const double* const*, double*, double**) const [with costfunctor = odomfactor; int knumresiduals = 6; int n0 = 7; int n1 = 7; int n2 = 0; int n3 = 0; int n4 = 0; int n5 = 0; int n6 = 0; int n7 = 0; int n8 = 0; int n9 = 0]』
/home/cjn/1ros_workspace/vins_fusion_odom/src/vins-fusion/vins_estimator/src/estimator/estimator.cpp:1762:1: required from here
/usr/include/eigen3/eigen/src/core/mathfunctions.h:365:34: error: invalid static_cast from type 『const ceres::jet』 to type 『int』
return static_cast(x);
^in file included from /home/cjn/1ros_workspace/vins_fusion_odom/src/vins-fusion/vins_estimator/src/initial/../factor/odom_factor.h:12:0,
from /home/cjn/1ros_workspace/vins_fusion_odom/src/vins-fusion/vins_estimator/src/initial/initial_alignment.h:20,
from /home/cjn/1ros_workspace/vins_fusion_odom/src/vins-fusion/vins_estimator/src/initial/initial_aligment.cpp:12:
/home/cjn/1ros_workspace/vins_fusion_odom/src/vins-fusion/vins_estimator/src/initial/../factor/integration_odom_base.h: in constructor 『integrationodombase::integrationodombase(const vector3d&, const vector3d&)』:
/home/cjn/1ros_workspace/vins_fusion_odom/src/vins-fusion/vins_estimator/src/initial/../factor/integration_odom_base.h:79:25: warning: variable 『t_ci』 set but not used [-wunused-but-set-variable]
eigen::matrix4d t_ci = t_ic.inverse();
^make[2]: *** [cmakefiles/vins_lib.dir/src/estimator/estimator.cpp.o] error 1
make[2]: *** 正在等待未完成的任務....
make[1]: *** [cmakefiles/vins_lib.dir/all] error 2
make: *** [all] error 2
eigen 版本問題,需要3.3.7
sudo apt-get install libeigen3-dev 路徑 /usr/include/eigen3/ (預設使用路徑)
原始碼編譯路徑 /usr/local/include/eigen3/ (版本是正確的,但是沒起作用)
解決
1、刪掉編譯檔案重新編譯,若不行,嘗試步驟2
2、camera_models包和vins_estimator包,cmakelists檔案加上
find_package(opencv 3.3.1 required)
message(warning "opencv_version: $")
刪掉編譯檔案重新編譯
原因:可能是opencv2.4版本和opencv3.3版本發生了衝突
編譯和執行
對於語句nsstring testobject nsdata alloc init testobject 在編譯時和執行時分別是什麼型別的物件?首先,宣告 nsstring testobject是告訴編譯器,testobject是乙個指向某個objective c物件的指標。因為不管指向的是什麼型別...
NoahMP編譯執行
1 安裝netcdf4 和 mpi 匯出路徑 export netcdf export netcdf inc export netcdf lib export wrfio ncd large file support 1 cd到noahmp master然後執行.configure 不報錯繼續執行m...
osgQt編譯 執行
1 軟體環境 vs2017 qt5.9.2 cmake3.10.0 2 一開始用的是cmake的最新版本3.15,遇到了一堆問題,cmakelist.txt裡面的一些巨集3.15不再支援,折騰了半天,才發現可能是版本的問題,換了幾個版本之後,發現3.10.0可以編譯通過 參考這裡 4 把qt的bin...