如何修复 ROS 错误:missing rosunitConfig.cmake
问题
尝试使用 colcon build 构建某些 ROS 包时,你看到如下错误消息
cmake_error_rosunit.txt
CMake Error at /home/uli/dev/Versatile/catkin/install/catkin/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by "rosunit" with any
of the following names:
rosunitConfig.cmake
rosunit-config.cmake
Add the installation prefix of "rosunit" to CMAKE_PREFIX_PATH or set
"rosunit_DIR" to a directory containing one of the above files. If
"rosunit" provides a separate development package or SDK, be sure it has
been installed.
Call Stack (most recent call first):
CMakeLists.txt:8 (find_package)解决方案
rosunit 目前没有作为 ROS jazzy 的 apt 包提供。
因此,克隆仓库,使用 colcon 构建它,然后在构建你的包之前 source install/setup.bash。
install_rosunit.sh
git clone https://github.com/ros/ros.git
cd ros/tools/rosunit
colcon build
source install/setup.bash之后(在同一个 shell 中),再次使用 colcon build 构建你的其他包。
Check out similar posts by category:
ROS
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow