CMake Error at /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83 (find_package): Could not find a package configuration file provided by "ndwa_local_planner" with any of the following names: ndwa_local_plannerConfig.cmake ndwa_local_planner-config.cmake Add the installation prefix of "ndwa_local_planner" to CMAKE_PREFIX_PATH or set "ndwa_local_planner_DIR" to a directory containing one of the above files. If "ndwa_local_planner" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): dbrobot_misson_motion/task_planning/delivery_base/CMakeLists.txt:15 (find_package)
时间: 2024-04-10 19:34:31 浏览: 213
这个错误是由于找不到名为 "ndwa_local_planner" 的软件包配置文件引起的。要解决这个问题,你可以尝试以下几个方法:
1. 确保你已经安装了正确版本的 "ndwa_local_planner" 软件包。你可以通过命令 `sudo apt-get install ros-melodic-ndwa-local-planner` 来安装该软件包的最新版本。
2. 确保你的 `CMAKE_PREFIX_PATH` 变量包含了 "ndwa_local_planner" 的安装路径。你可以在 `CMakeLists.txt` 文件中添加以下代码来设置该变量:
```cmake
set(CMAKE_PREFIX_PATH /path/to/ndwa_local_planner ${CMAKE_PREFIX_PATH})
```
注意将 `/path/to/ndwa_local_planner` 替换为 "ndwa_local_planner" 软件包的实际安装路径。
3. 如果你已经安装了 "ndwa_local_planner" 的开发包或 SDK,请确保设置了正确的 `ndwa_local_planner_DIR` 变量。你可以在 `CMakeLists.txt` 文件中添加以下代码来设置该变量:
```cmake
set(ndwa_local_planner_DIR /path/to/ndwa_local_planner ${ndwa_local_planner_DIR})
```
注意将 `/path/to/ndwa_local_planner` 替换为 "ndwa_local_planner" 软件包的实际安装路径。
尝试上述方法后,重新运行 CMake 构建命令,应该能够解决这个错误。如果问题仍然存在,请确保你已经正确安装了 "ndwa_local_planner" 软件包,并且该软件包的配置文件存在于正确的位置。
阅读全文