Problem
在工控机上重新配导航环境时,遇到这个报错,同样是ROS Melodic系统
报错如下:
CMake Warning at rtabmap_ros/CMakeLists.txt:16 (find_package):
By not providing "Findoctomap_ros.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"octomap_ros", but CMake did not find one.
Could not find a package configuration file provided by "octomap_ros" with
any of the following names:
octomap_rosConfig.cmake
octomap_ros-config.cmake
Add the installation prefix of "octomap_ros" to CMAKE_PREFIX_PATH or set
"octomap_ros_DIR" to a directory containing one of the above files. If
"octomap_ros" provides a separate development package or SDK, be sure it
has been installed.
Solution
解决方法也很简单,补齐缺的包即可
sudo apt-get install ros-melodic-octomap ros-melodic-octomap-mapping ros-melodic-octomap-msgs ros-melodic-octomap-ros ros-melodic-octomap-rviz-plugins ros-melodic-octomap-server
有些博客只写其中一个package,但是很多时候还有相关的package也没装,一次性弄齐全肯定没问题。
Reference
- cmake could not find octomap_ros when run catkin_make:
https://answers.ros.org/question/248242/cmake-could-not-find-octomap_ros-when-run-catkin_make/ - ROS——工程编译出错:Could not find a package configuration file provided by:
https://blog.csdn.net/qq_16775293/article/details/109330494?utm_medium=distribute.pc_aggpage_search_result.none-task-blog-2aggregatepagefirst_rank_v2~rank_aggregation-12-109330494.pc_agg_rank_aggregation&utm_term=ros%E7%BC%96%E8%AF%91%E5%87%BA%E9%94%99&spm=1000.2123.3001.4430