1、换热点,换wifi,多试试
2、sudo rosdep init失败
手动:在/etc/ros/rosdep/sources.list.d目录下新建一个文件,名20-defau.list,然后将https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list中的内容复制进去。
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
3、执行rosdep update失败
从下面github中直接下载,放到到/etc/ros/rosdistro目录下,rosdistro需要新建
git clone https://github.com/Jiangjianyu/ros-use.git
修改20-default.list脚本
# os-specific listings first
#yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx
yaml file:///etc/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
yaml file:///etc/ros/rosdistro/master/rosdep/base.yaml
yaml file:///etc/ros/rosdistro/master/rosdep/python.yaml
yaml file:///etc/ros/rosdistro/master/rosdep/ruby.yaml
gbpdistro file:///etc/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。在更新过程中,还有部分配置信息会从raw.githubusercontent.com上下载,但是反复几次,基本上就可以成功了。
经过上面两步,还是失败,请继续往下看。
sudo 打开/usr/lib/python2.7/dist-packages/rosdistro/下的__init__.py这个文件,按照下面的代码进行修改。
sudo gedit /usr/lib/python2.7/dist-packages/rosdistro/__init__.py
# 修改下边行
# index information
# DEFAULT_INDEX_URL = 'https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml'
DEFAULT_INDEX_URL = 'file:///etc/ros/rosdistro/master/index-v4.yaml'
保存后,执行
sudo apt-get update
rosdep update。
祝你成功!!!

本文档详细介绍了如何解决ROS的rosdep初始化和更新失败的问题,包括修改源列表、替换为本地文件、编辑rosdistro的__init__.py文件等步骤,旨在帮助用户成功执行rosdepupdate。
2万+

被折叠的 条评论
为什么被折叠?



