ROS依赖包安装相关

原文:《ROS依赖包安装问题》


文章目录

  • 问题描述
  • 解决方案


问题描述

在ROS编译过程中经常会遇到找不到ROS包的情况,如下所示

CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by
“gazebo_ros_control” with any of the following names:

gazebo_ros_controlConfig.cmake
gazebo_ros_control-config.cmake

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

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

    gazebo_ros_controlConfig.cmake
    gazebo_ros_control-config.cmake

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

解决方案

在ROS wiki上有这么一段话,可能很多人都将他忽略了
单个软件包安装: 你也可以安装某个指定的ROS软件包(使用软件包名称替换掉下面的PACKAGE):

sudo apt-get install ros-kinetic-PACKAGE

例如:

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

这段话的意思就是:
  当你需要安装ROS的依赖包时,可以使用sudo apt-get install ros-kinetic-PACKAGE命令,其中
  sudo是root用户的意思,
  apt-get install是代表要安装软件
  ros-kinetic-PACKAGE是依赖包的名字(其中ros-kinetic-代表是ROS的依赖包,kinetic是你所使用ROS版本名字,PACKAGE是需要替换的地方,指的是依赖包的名字)
  例如,针对问题中的依赖包,使用如下命令
  sudo apt-get install ros-kinetic-gazebo-ros-control
————————————————
版权声明:本文为CSDN博主「Eleven-boy」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_38422317/article/details/94628479

你可能感兴趣的:(智驾域控,ROS,环境问题)