ROS Error

目录

  • ros-kinetic-desktop-full 有未满足的依赖关系
  • `catkin_make`
  • `ERROR:default sources list file already exists`
  • `ERROR:cannot download default sources list`
  • `ERROR:cannot launch node of type,can't locate node in package`
  • `ERROR:cannot launch node of type`
  • `ERROR:PluginlibFactory:The plugin for class ... failed to load.`
  • `ERROR:Action client not connected`
  • Could not find a package configuration file provided by ...
  • is neither a launch file in package

ros-kinetic-desktop-full 有未满足的依赖关系

ROS Error_第1张图片
解决方法:
打开终端,然后输sudo gedit /etc/apt/sources.list回车,打开文件后,修改,保存
deb http://mirrors.ustc.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse

之后输入:

sudo apt-get update

更新源。

注意后面增加的 universe multiverse
main restricted universe multiverse 这是按软件的自由度来区分的

main:完全的自由软件。
restricted:不完全的自由软件。
universe:ubuntu官方不提供支持与补丁,全靠社区支持。
muitiverse:非自由软件,完全不提供支持和补丁。
ROS Error_第2张图片

catkin_make

当输入 catkin_make 时,出现错误信息:
Error:The specified base path “/home/ubuntu/catkin_ws” contains a CMakeLists.txt but “catkin_make” must be invoked in the root of workspace.
出现这种情况的原因是catkin_init_workspacce的时候,出现下面这句:
Creating symlink “/home/ubuntu/catkin_ws/CMakeLists.txt” pointing to “/opt/ros/indigo/share/catkin/cmake/toplevel.cmake”
将当前工作空间下的CMakeLists.txt与/ros/下的cmake做了链接。

解决方法:

unlink /home/ubuntu/catkin_ws/CMakeLists.txt 

或者直接把 ~/catkin_ws/ 下的 CMakeLists.txt 文件删除就好了。

ERROR:default sources list file already exists

当输入 rospack 查询包的依赖时
在这里插入图片描述
然后输入 sudo rosdep init
出现如下错误
在这里插入图片描述
通常这是因为之前曾经安装过ROS系统的某个版本,只需按照提示删除已经存爱的初始化文件即可。

sudo rm /etc/ros/rosdep/source.list.d/20-default.list

然后再重新运行 sudo rosdep init

ERROR:cannot download default sources list

输入 sudo rosdep init 时,出现错误
在这里插入图片描述
有可能是没有安装证书库所致,可以尝试如下命令:

sudo apt-get install ca-certificates

其实这个文件也比较简单,这一行所做的命令只是下载这个文件放到 /etc/ros/rosdep/sources.list.d/20-default.list 下面,因此你也可以自行保存下面的内容:

# os-specific listings first
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx

# generic
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
gbpdistro https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml fuerte

# newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead

然后你可以运行:
rosdep update

ROS Error_第3张图片

ERROR:cannot launch node of type,can't locate node in package

在这里插入图片描述
因为是 python 文件,所以需要把 python 文件设置为可执行文件。
ROS Error_第4张图片
问题解决。

ERROR:cannot launch node of type

在这里插入图片描述
找不到spawner节点类型
sudo apt-get install ros-kinetic-ros-control ros-kinetic-ros-controllers
问题解决

ERROR:PluginlibFactory:The plugin for class ... failed to load.

在这里插入图片描述
安装rviz-visual-tools插件
sudo apt-get install ros-kinetic-rviz-visual-tools
问题解决

ERROR:Action client not connected

在这里插入图片描述
检查一下controller的配置,名称是否匹配


ROS Error_第5张图片
rosrun robot_state_publisher robot_state_publisher

Could not find a package configuration file provided by …

一般是少了某个包,把包安装后重试

sudo apt-get install ros-版本-包名

is neither a launch file in package

source ./devel/setup.bash

你可能感兴趣的:(ROS)