1.下载编译octomap、octomap_msgs、octomap_ros。
cmake、make步骤按照流程走。
2.octomap能编译成功,octomap_msgs的cmake成功,make成功。octomap_ros的cmake报错:
CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package):
Could not find a package configuration file provided by "octomap_msgs" with
any of the following names:octomap_msgsConfig.cmake
octomap_msgs-config.cmakeAdd the installation prefix of "octomap_msgs" to CMAKE_PREFIX_PATH or set
"octomap_msgs_DIR" to a directory containing one of the above files. If
"octomap_msgs" provides a separate development package or SDK, be sure it
has been installed.
Call Stack (most recent call first):
CMakeLists.txt:4 (find_package)
-- Could not find the required component 'octomap_msgs'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found.
CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by "octomap_msgs" with
any of the following names:octomap_msgsConfig.cmake
octomap_msgs-config.cmakeAdd the installation prefix of "octomap_msgs" to CMAKE_PREFIX_PATH or set
"octomap_msgs_DIR" to a directory containing one of the above files. If
"octomap_msgs" provides a separate development package or SDK, be sure it
has been installed.
Call Stack (most recent call first):
CMakeLists.txt:4 (find_package)
-- Configuring incomplete, errors occurred!
解决方法:
将octomap_msgs/build/devel/share/octomap_msgs复制到/opt/ros/kinetic/share/中。即可成功
3.其他问题
CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by "octomap" with any
of the following names:octomapConfig.cmake
octomap-config.cmakeAdd the installation prefix of "octomap" to CMAKE_PREFIX_PATH or set
"octomap_DIR" to a directory containing one of the above files. If
"octomap" provides a separate development package or SDK, be sure it has
been installed.
Call Stack (most recent call first):
CMakeLists.txt:28 (find_package)
-- Configuring incomplete, errors occurred!
解决方法:
cmake -Doctomap_DIR=/usr/local/share/octomap ..