From f047ad35c148da4a6a0241c60e8f6c357ca50af4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraj=20Or=C5=A1uli=C4=87?= Date: Thu, 26 Jan 2017 11:14:58 +0100 Subject: [PATCH] Add Ceres sparse linear algebra library dependency (#189) Ceres can be built without linking against a sparse linear algebra library such as SuiteSparse or Eigen-sparse. This can happen if the user does not have all the dependencies, which normally get installed when following the Cartographer installation guide. In this case, Cartographer will work, but without loop closures, because Ceres is not working fast enough (the loop closure optimization without a sparse linear algebra library is a few orders of magnitude slower). Another bad side effect of this is that Cartographer will hang when finalizing the trajectory or on exit, because all loop closing optimizations will be waiting in a queue which can take hours to process. When Ceres is regularly built against a sparse linear algebra library, as it is supposed to be, it declares a component named SparseLinearAlgebraLibrary. Because normal functioning of Cartographer seemingly depends on this being present, it is introduced here in Cartographer as a required Ceres component dependency. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7e10854..d28a1ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,7 +27,7 @@ google_initialize_cartographer_project() google_enable_testing() find_package(Boost REQUIRED COMPONENTS iostreams) -find_package(Ceres REQUIRED) +find_package(Ceres REQUIRED COMPONENTS SparseLinearAlgebraLibrary) find_package(Eigen3 REQUIRED) find_package(LuaGoogle REQUIRED) find_package(Protobuf REQUIRED)