为什么 CartographerROS 安装会因“无法找到 Ceres”错误而停止?

问题描述

我正在尝试在 Ubuntu 20.04 上安装 CartographerROS。我已经安装了 ROS Noetic,并按照此处安装 CartographerROS 的说明进行了操作:https://google-cartographer-ros.readthedocs.io/en/latest/compilation.html#building-installation

一切正常,直到运行 catkin_make_isolated --install --use-ninja,导致以下错误

CMake Error at /lib/cmake/Ceres/CeresConfig.cmake:88 (message): Failed to find Ceres - Ceres install root: /,从 CeresConfig.cmake 安装位置的相对路径确定:/lib/cmake/Ceres,不包含 Ceres 标头。安装目录被删除,或者安装树在构建 Ceres 后仅部分迁移到 CMake 之外。调用堆栈(最近调用):/lib/cmake/Ceres/CeresConfig.cmake:149 (ceres_report_not_found) CMakeLists.txt:39 (find_package) CMakeLists.txt:39 (find_package) 中的 CMake 错误:找到包配置文件: /rib/cmake/Ceres/CeresConfig.cmake 但它将 Ceres_FOUND 设置为 FALSE,因此包“Ceres”被视为未找到。

这是在新安装的 Ubuntu 上完成的,我所做的只是安装 ROS,然后尝试安装 CartographerROS。奇怪的是,当我大约一个月前安装 CartographerROS 时,这一切都奏效了——从那时起,Ceres 构建有什么变化吗?

解决方法

出于某种原因,安装程序在错误的位置寻找包含文件。它正在 /include 中查找实际位于 /usr/include 中的文件夹,因此我只是在安装程序搜索的位置创建了指向该文件夹的链接。