ROS工作空间编译的时候出现类似于Could_not_find_a_package_configuration_file _provided _by该如何解决

一、前言

最近电脑又出现了类似于Could not find a package configuration file provided by之类的问题,以往都是直接百度,然后根据别人给的答案直接复制粘贴,但是有时候不一定完全有效,别人给你的是鱼,但是你得学会捕鱼的技术才行,所以俗话说的好,授之以鱼不如授之以渔,不仅要知其然还得知其所以然。

二、“鱼”的方法

也就是我最开始的方法,我最近刚刚把ROS装好,然后在网上找了一个moveit和gazebo联合实现机械臂运动规划的几个功能包,我就随手往自己建立的工作空间下一丢,然后catkin_make,然而,一上来就出现了编译错误,如下:

CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package):
  Could not find a package configuration file provided by "manipulation_msgs"
  with any of the following names:

    manipulation_msgsConfig.cmake
    manipulation_msgs-config.cmake

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

看到上面这一团黑乎乎的东西,就看见了一句话, Could not find a package configuration file provided by “manipulation_msgs”,别的我就没兴趣看了,直接复制粘贴往百度上一搜,别人说我缺少"manipulation_msgs"这个功能包,然后我就按照别人的办法输入命令安装这个功能包, sudo apt-get install ros-kinetic-manipulation-msgs ,然后重新编译这个功能包,结果出现了下面的:

CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package):
  Could not find a package configuration file provided by "moveit_msgs" with
  any of the following names:

    moveit_msgsConfig.cmake
    moveit_msgs-config.cmake

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

大家可以看到,又出现了同样的问题, Could not find a package configuration file provided by “moveit_msgs”,又让我装一个叫做"moveit_msgs"的功能包。

可能问题并不在此
在这里插入图片描述

二、“渔”的方法

也就是我最终解决的方法,方法很简单,出现这些错误肯定是缺少了功能包,但是我装好了一个又来一个新的,可能我缺的是一个大的包??

真的是如此,原来我装好了ROS,但是是moveit包没装。我执行了以下命令,分别安装了moveit包、gazebo控制器包,然后就好了。

sudo apt-get install ros-kinetic-moveit
sudo apt-get install ros-kinetic-gazebo-ros-pkgs ros-kinetic-gazebo-ros-control

如果大家不是kinetic版本,请将kinetic换成别的版本名称

然后就编译成功了,所以遇到事情能够找到具体原因最好。

  • 14
    点赞
  • 43
    收藏
    觉得还不错? 一键收藏
  • 5
    评论
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值