ROS报错:缺少 manipulation-msgs与household msgs

古月marm_planning是根据kinetic版本编写,移植到melodic会报错,按照顺序如下两种。

-- ==> add_subdirectory(marm_planning)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- Could NOT find manipulation_msgs (missing: manipulation_msgs_DIR)
-- Could not find the required component 'manipulation_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/melodic/share/catkin/cmake/catkinConfig.cmake:83 (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.
Call Stack (most recent call first):
  marm_planning/CMakeLists.txt:10 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/ghh/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/ghh/catkin_ws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed

缺少包,名字已经在报错中。

    manipulation_msgsConfig.cmake
    manipulation_msgs-config.cmake

解决方案:注意是melodic版本的解决方案!!!

方法一:

进入src文件夹把所需工具包克隆进去,不推荐因为常常因为网络以及其他原因报错,

git clone https://github.com/ros-interactive-manipulation/manipulation_msgs.git
正克隆到 'manipulation_msgs'...
fatal: unable to access 'https://github.com/ros-interactive-manipulation/manipulation_msgs.git/': Failed to connect to github.com port 443: 拒绝连接

方法二:

手动克隆,这种方法可控性强,效率高。

https://github.com/ros-interactive-manipulation/manipulation_msgs/

进入网站下载

ROS报错:缺少 manipulation-msgs与household msgs_第1张图片下载后去掉后缀!复制到src中,并解压。结果与之前的命令行克隆效果一样,但是网站等不等上去,能不能下载,都是可控的。

ROS报错:缺少 manipulation-msgs与household msgs_第2张图片

 好不容易下载好,编译后,有报错了!!!这次是编译刚才下载好的包,发现又缺别的包。

-- ==> add_subdirectory(manipulation_msgs)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- Could NOT find household_objects_database_msgs (missing: household_objects_database_msgs_DIR)
-- Could not find the required component 'household_objects_database_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/melodic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by
  "household_objects_database_msgs" with any of the following names:

    household_objects_database_msgsConfig.cmake
    household_objects_database_msgs-config.cmake

  Add the installation prefix of "household_objects_database_msgs" to
  CMAKE_PREFIX_PATH or set "household_objects_database_msgs_DIR" to a
  directory containing one of the above files.  If
  "household_objects_database_msgs" provides a separate development package
  or SDK, be sure it has been installed.
Call Stack (most recent call first):
  manipulation_msgs/CMakeLists.txt:13 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/ghh/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/ghh/catkin_ws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed

缺少的包名字在报错中已有提示

    household_objects_database_msgsConfig.cmake
    household_objects_database_msgs-config.cmake

如法炮制,方法一:

git clone https://github.com/ros-interactive-manipulation/household_objects_database

失败!

fatal: unable to access 'https://github.com/ros-interactive-manipulation/household_objects_database/': Failed to connect to github.com port 443: 拒绝连接

方法二:手动克隆

进入网址

https://github.com/ros-interactive-manipulation/household_objects_database_msgs

注意网址不要进错,包不要下载错。

ROS报错:缺少 manipulation-msgs与household msgs_第3张图片

下载,改名,到src,解压,编译。同样的步骤不在赘述。

问题解决。

未知问题是编译后把下载的包安装文件删除会不会导致报错。由于已经编译好了,删除工具包,虽然没有报错,但是与之前没有编译好的情况不同,故这次没报错没有参考价值。 

你可能感兴趣的:(ROS报错,c++)