mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-03 01:50:24 +08:00
gtsam: Fixed metis linker errors on windows. Ceres: updated default solver options (working for BA and pose-graph optimizations, fixed #966)
This commit is contained in:
@@ -715,6 +715,13 @@ IF(GTSAM_FOUND)
|
|||||||
${LIBRARIES}
|
${LIBRARIES}
|
||||||
gtsam # Windows: Place static libs at the end
|
gtsam # Windows: Place static libs at the end
|
||||||
)
|
)
|
||||||
|
IF(WIN32)
|
||||||
|
#explicitly add metis target on windows (after gtsam target)
|
||||||
|
SET(LIBRARIES
|
||||||
|
${LIBRARIES}
|
||||||
|
metis
|
||||||
|
)
|
||||||
|
ENDIF(WIN32)
|
||||||
ENDIF(GTSAM_FOUND)
|
ENDIF(GTSAM_FOUND)
|
||||||
|
|
||||||
IF(WITH_MADGWICK)
|
IF(WITH_MADGWICK)
|
||||||
|
|||||||
@@ -238,8 +238,9 @@ std::map<int, Transform> OptimizerCeres::optimize(
|
|||||||
UINFO("Ceres optimizing begin (iterations=%d)", iterations());
|
UINFO("Ceres optimizing begin (iterations=%d)", iterations());
|
||||||
|
|
||||||
ceres::Solver::Options options;
|
ceres::Solver::Options options;
|
||||||
|
options.linear_solver_type = ceres::ITERATIVE_SCHUR;
|
||||||
|
options.sparse_linear_algebra_library_type = ceres::SUITE_SPARSE;
|
||||||
options.max_num_iterations = iterations();
|
options.max_num_iterations = iterations();
|
||||||
options.linear_solver_type = ceres::SPARSE_NORMAL_CHOLESKY;
|
|
||||||
options.function_tolerance = this->epsilon();
|
options.function_tolerance = this->epsilon();
|
||||||
ceres::Solver::Summary summary;
|
ceres::Solver::Summary summary;
|
||||||
UTimer timer;
|
UTimer timer;
|
||||||
@@ -457,7 +458,8 @@ std::map<int, Transform> OptimizerCeres::optimizeBA(
|
|||||||
// standard solver, SPARSE_NORMAL_CHOLESKY, also works fine but it is slower
|
// standard solver, SPARSE_NORMAL_CHOLESKY, also works fine but it is slower
|
||||||
// for standard bundle adjustment problems.
|
// for standard bundle adjustment problems.
|
||||||
ceres::Solver::Options options;
|
ceres::Solver::Options options;
|
||||||
options.linear_solver_type = ceres::DENSE_SCHUR;
|
options.linear_solver_type = ceres::ITERATIVE_SCHUR;
|
||||||
|
options.sparse_linear_algebra_library_type = ceres::SUITE_SPARSE;
|
||||||
options.max_num_iterations = iterations();
|
options.max_num_iterations = iterations();
|
||||||
//options.linear_solver_type = ceres::SPARSE_NORMAL_CHOLESKY;
|
//options.linear_solver_type = ceres::SPARSE_NORMAL_CHOLESKY;
|
||||||
options.function_tolerance = this->epsilon();
|
options.function_tolerance = this->epsilon();
|
||||||
|
|||||||
Reference in New Issue
Block a user