大部分人在安装ROS系统后使用rosdep update都会报错,原因是该网站的代理在国外,国内没法访问
不出意外我也遇到了
使用的是ubuntu 16.04,ROS kinetic,按理来说其他版本也可以解决
ERROR: cannot download default sources list from:
https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list
Website may be down
方法一:
修改hosts文件
参考1.2.6 资料:其他ROS版本安装 · Autolabor-ROS机器人入门课程《ROS理论与实践》零基础教程
方法二:
使用代理网站,需要修改源代码
参考
解决ROS系统 rosdep update超时问题的新方法_leida_wt的博客-优快云博客
方法三:
修改20_default.list
参考
关于ROS安装中出现cannot download default sources list from的一个解决办法_羽逸非凡的博客-优快云博客
方法四:
改用rosdepc,rosdepc
是替换rosdep
的一款软件,其功能是一模一样的,只不过是为了解决墙的问题,把软件里的地址换成了gitee
的国内地址,用法和安装方法和rosdep
都是一样的,可以参考古月居的这篇博客
在尝试完这些方法之后,理论上应该能解决问题,但是我出现了一个新的问题
reading in sources list data from /etc/ros/rosdep/sources.list.d
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml
Query rosdistro index https://mirrors.tuna.tsinghua.edu.cn/rosdistro/index-v4.yaml
ERROR: error loading sources list:
<urlopen error <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)> (https://mirrors.tuna.tsinghua.edu.cn/rosdistro/index-v4.yaml)>
解决方法:
在/usr/lib/python2.7/dist-packages/rosdep2/sources_list.py中顶部直接插入两行代码取消SSL验证
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
成功解决后接下来的步骤参考: