asked CMake to find a package configuration file provided by "MRPT", but CMake did not find one.

1.在ROS节点重组移植过程中遇到编译错误的问题如下:

CMake Error at rf2o_laser_odometry/CMakeLists.txt:21 (find_package):
  By not providing "FindMRPT.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "MRPT", but
  CMake did not find one.

  Could not find a package configuration file provided by "MRPT" with any of
  the following names:

    MRPTConfig.cmake
    mrpt-config.cmake

  Add the installation prefix of "MRPT" to CMAKE_PREFIX_PATH or set
  "MRPT_DIR" to a directory containing one of the above files.  If "MRPT"
  provides a separate development package or SDK, be sure it has been
  installed.

在这里插入图片描述
通过报错内容来看,缺少"MRPT"

$ sudo apt-get install ros-kinetic-mrpt*
$ sudo apt-get install mrpt-*
$ sudo apt-get install libmrpt-dev

再重新编译。

2.在ROS节点重组移植过程中遇到编译错误的问题如下:

CMake Error at libuvc_ros/libuvc_camera/CMakeLists.txt:9 (find_package):
  By not providing "Findlibuvc.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "libuvc", but
  CMake did not find one.

  Could not find a package configuration file provided by "libuvc" with any
  of the following names:

    libuvcConfig.cmake
    libuvc-config.cmake

  Add the installation prefix of "libuvc" to CMAKE_PREFIX_PATH or set
  "libuvc_DIR" to a directory containing one of the above files.  If "libuvc"
  provides a separate development package or SDK, be sure it has been
  installed.

解决方法
1.进入你的工作空间
2.检查并安装功能包下的依赖包

rosdep install --from-paths src --ignore-src -r -y

再编译
此方法在解决此类问题有较好效果,上面的问题1也可尝试解决。
rosdep的安装与使用:
https://blog.csdn.net/weixin_45378779/article/details/103617471

你可能感兴趣的:(ROS中出现问题及解决)