controller_managerConfig move_baseConfig gmappingConfig hector_mappingConfig ros编译错误汇总 重德智能

中科院软件所ros重德智能软件包ROS-Academy-for-Beginners编译错误汇总

1、controller_managerConfig.cmake 

  ROS-Academy-for-Beginners/navigation_sim_demo/CMakeLists.txt:3 (find_package)


-- Could not find the required component 'controller_manager'. 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
  "controller_manager" with any of the following names:

    controller_managerConfig.cmake
    controller_manager-config.cmake

  Add the installation prefix of "controller_manager" to CMAKE_PREFIX_PATH or
  set "controller_manager_DIR" to a directory containing one of the above
  files.  If "controller_manager" provides a separate development package or
  SDK, be sure it has been installed.
Call Stack (most recent call first):
  ROS-Academy-for-Beginners/navigation_sim_demo/CMakeLists.txt:3 (find_package)

解决方案:

sudo apt-get install ros-kinetic-ros-control ros-kinetic-ros-controllers

注意:安装的时候如果出现

Install these packages without verification? [y/N] y

 要选择y不然安装很难成功,也不知道为什么,可能和网络或者源有关吧,我只是猜测,具体还没有找到原因。下面几个问题也都是一样的。比较奇怪的是我用两台电脑试过,一台有这个提示,另一台没有这个提示,暂时不清楚为什么。同样都是ubuntu16.04.

2、   move_baseConfig.cmake

 ROS-Academy-for-Beginners/navigation_sim_demo/CMakeLists.txt:3 (find_package)


-- Could not find the required component 'move_base'. 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 "move_base" with
  any of the following names:

    move_baseConfig.cmake
    move_base-config.cmake

  Add the installation prefix of "move_base" to CMAKE_PREFIX_PATH or set
  "move_base_DIR" to a directory containing one of the above files.  If
  "move_base" provides a separate development package or SDK, be sure it has
  been installed.
Call Stack (most recent call first):
  ROS-Academy-for-Beginners/navigation_sim_demo/CMakeLists.txt:3 (find_package)
解决方案

//sudo apt-get install ros-kinetic-move-base-msgs
sudo apt-get install ros-kinetic-navigation

3、gmappingConfig.cmake

-- Could not find the required component 'gmapping'. 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 "gmapping" with any
  of the following names:

    gmappingConfig.cmake
    gmapping-config.cmake

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

解决方案:

sudo apt-get install ros-kinetic-gmapping

4、hector_mappingConfig.cmake

Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package):
  Could not find a package configuration file provided by "hector_mapping"
  with any of the following names:

    hector_mappingConfig.cmake
    hector_mapping-config.cmake

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


解决方案:

sudo apt-get install ros-kinetic-hector-slam

 5、slam_kartoConfig.cmake

Could not find the required component 'slam_karto'. 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 "slam_karto" with
  any of the following names:

    slam_kartoConfig.cmake
    slam_karto-config.cmake

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

解决方案:

sudo apt install ros-kinetic-slam-karto

6、:error: ‘condition_variable_monotonic’

/opt/ros/kinetic/include/ros/callback_queue.h:166:18: error: ‘condition_variable_monotonic’ in namespace ‘ros::internal’ does not name a type
   ros::internal::condition_variable_monotonic condition_;
 

比较奇怪的是我用两台电脑测试,有一台有出现这个错误,有一台没有出现这个错误,暂时不清楚原因。解决办法:在终端输入

sudo gedit /opt/ros/kinetic/include/ros/internal/condition_variable.h


将第45行的

using condition_variable_monotonic = boost::condition_variable;


注释掉,并在下面添加一行

typedef boost::condition_variable condition_variable_monotonic;

最后总结需要安装的命令:

sudo apt-get install ros-kinetic-gazebo-ros-control
sudo apt-get install ros-kinetic-ros-control ros-kinetic-ros-controllers
sudo apt-get install ros-kinetic-navigation
sudo apt-get install ros-kinetic-gmapping
sudo apt install ros-kinetic-slam-karto
sudo apt-get install ros-kinetic-hector-slam

编译算是通过了,接下来可入深坑了。

运行Gazebo仿真程序robot_sim_demo前,请将Gazebo升级到7.x版本以上(推荐7.9版本)。

查看Gazebo版本方法

$ gazebo -v   #确认7.0以上,推荐7.9

升级方法

$ sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
$ wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get install gazebo7

虽然是运行起来了,但是这个时候会有红色的报错

[ERROR] [1632062295.893197079]: Failed to load nodelet [/cmd_vel_mux] of type [yocs_cmd_vel_mux/CmdVelMuxNodelet] even after refreshing the cache: According to the loaded plugin descriptions the class yocs_cmd_vel_mux/CmdVelMuxNodelet with base class type nodelet::Nodelet does not exist. Declared types are  SlamGMappingNodelet depth_image_proc/convert_metric depth_image_proc/crop_foremost depth_image_proc/disparity depth_image_proc/point_cloud_xyz depth_image_proc/point_cloud_xyz_radial depth_image_proc/point_cloud_xyzi depth_image_proc/point_cloud_xyzi_radial depth_image_proc/point_cloud_xyzrgb depth_image_proc/register image_proc/crop_decimate image_proc/crop_nonZero image_proc/crop_non_zero image_proc/debayer image_proc/rectify image_proc/resize image_publisher/image_publisher image_rotate/image_rotate image_view/disparity image_view/image nodelet_tutorial_math/Plus pcl/BAGReader pcl/BoundaryEstimation pcl/ConvexHull2D pcl/CropBox pcl/EuclideanClusterExtraction pcl/ExtractIndices pcl/ExtractPolygonalPrismData pcl/FPFHEstimation pcl/FPFHEstimationOMP pcl/MomentInvariantsEstimation pcl/MovingLeastSquares pcl/NodeletDEMUX pcl/NodeletMUX pcl/NormalEstimation pcl/NormalEstimationOMP pcl/NormalEstimationTBB pcl/PCDReader pcl/PCDWriter pcl/PFHEstimation pcl/PassThrough pcl/PointCloudConcatenateDataSynchronizer pcl/PointCloudConcatenateFieldsSynchronizer pcl/PrincipalCurvaturesEstimation pcl/ProjectInliers pcl/RadiusOutlierRemoval pcl/SACSegmentation pcl/SACSegmentationFromNormals pcl/SHOTEstimation pcl/SHOTEstimationOMP pcl/SegmentDifferences pcl/StatisticalOutlierRemoval pcl/VFHEstimation pcl/VoxelGrid stereo_image_proc/disparity stereo_image_proc/point_cloud2
[ERROR] [1632062295.893287483]: The error before refreshing the cache was: According to the loaded plugin descriptions the class yocs_cmd_vel_mux/CmdVelMuxNodelet with base class type nodelet::Nodelet does not exist. Declared types are  SlamGMappingNodelet depth_image_proc/convert_metric depth_image_proc/crop_foremost depth_image_proc/disparity depth_image_proc/point_cloud_xyz depth_image_proc/point_cloud_xyz_radial depth_image_proc/point_cloud_xyzi depth_image_proc/point_cloud_xyzi_radial depth_image_proc/point_cloud_xyzrgb depth_image_proc/register image_proc/crop_decimate image_proc/crop_nonZero image_proc/crop_non_zero image_proc/debayer image_proc/rectify image_proc/resize image_publisher/image_publisher image_rotate/image_rotate image_view/disparity image_view/image nodelet_tutorial_math/Plus pcl/BAGReader pcl/BoundaryEstimation pcl/ConvexHull2D pcl/CropBox pcl/EuclideanClusterExtraction pcl/ExtractIndices pcl/ExtractPolygonalPrismData pcl/FPFHEstimation pcl/FPFHEstimationOMP pcl/MomentInvariantsEstimation pcl/MovingLeastSquares pcl/NodeletDEMUX pcl/NodeletMUX pcl/NormalEstimation pcl/NormalEstimationOMP pcl/NormalEstimationTBB pcl/PCDReader pcl/PCDWriter pcl/PFHEstimation pcl/PassThrough pcl/PointCloudConcatenateDataSynchronizer pcl/PointCloudConcatenateFieldsSynchronizer pcl/PrincipalCurvaturesEstimation pcl/ProjectInliers pcl/RadiusOutlierRemoval pcl/SACSegmentation pcl/SACSegmentationFromNormals pcl/SHOTEstimation pcl/SHOTEstimationOMP pcl/SegmentDifferences pcl/StatisticalOutlierRemoval pcl/VFHEstimation pcl/VoxelGrid stereo_image_proc/disparity stereo_image_proc/point_cloud2
[FATAL] [1632062295.922054614]: Failed to load nodelet '/cmd_vel_mux` of type `yocs_cmd_vel_mux/CmdVelMuxNodelet` to manager `mobile_base_nodelet_manager'
[cmd_vel_mux-8] process has died [pid 19393, exit code 255, cmd /opt/ros/kinetic/lib/nodelet/nodelet load yocs_cmd_vel_mux/CmdVelMuxNodelet mobile_base_nodelet_manager cmd_vel_mux/output/cmd_vel:=cmd_vel __name:=cmd_vel_mux 

 遇到这个 不用慌,安装一些东西,这个要感谢一个博主文章:

https://blog.csdn.net/ldk3679/article/details/105652014/

以下是安装的指令 

sudo apt-get install ros-kinetic-yocs-cmd-vel-mux

感谢其他博客留下的宝贵资料。你感觉不错就点个赞吧,你的支持是博主继续写博客的动力。

参考自:

ubantu18.04+melodic安装gmapping_gp1998528的博客-CSDN博客
https://blog.csdn.net/lovebasamessi/article/details/103216443

Hector SLAM 安装与配置 - 灰信网(软件开发博客聚合)

ros入门--中科院软件所ros学习笔记_lxj362343的博客-CSDN博客

运行Gazebo时 Failed to load nodelet [/cmd_vel_mux] of type [yocs_cmd_vel_mux/CmdVelMuxNodelet]解决办法_ldk3679的博客-CSDN博客

  • 5
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值