关于ROS安装sudo rosdep init这一步的根源解决
作者:互联网
1、去码云官网(github上下载太慢了)Gitee - 基于 Git 的代码托管和研发协作平台下载x下载相关包
2、下载到根目录,之后去到这个包里面rosdistro/rosdep/source.list.d/下找到20-default.list这个文件,将这个文件中指向raw.githubusercontent.com
的url地址全部修改为指向本地文件的地址。如下:
# os-specific listings first
yaml file:///home/mxy(换成你的用户名)/rosdistro/rosdep/osx-homebrew.yaml osx
# generic
yaml file:///home/mxy(换成你的用户名)/rosdistro/rosdep/base.yaml
yaml file:///home/mxy(换成你的用户名)/rosdistro/rosdep/python.yaml
yaml file:///home/mxy(换成你的用户名)/rosdistro/rosdep/ruby.yaml
gbpdistro file:///home/mxy(换成你的用户名)/rosdistro/releases/fuerte.yaml fuerte
# newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead
3、找到/usr/lib/python2.7/dist-packages/rosdep2
该文件夹下面sources_list.py
文件。依然是修改URL地址为本地。
........
# default file to download with 'init' command in order to bootstrap
# rosdep
DEFAULT_SOURCES_LIST_URL = 'file:///home/mxy(换成你的用户名)/rosdistro/rosdep/sources.list.d/20-default.list'
......
4、找到/usr/lib/python2.7/dist-packages/rosdep2/rep3.py文件,做如下修改:
......
# location of targets file for processing gbpdistro files
REP3_TARGETS_URL = 'file:///home/mxy(修改为你的用户名)/rosdistro/releases/targets.yaml'
# seconds to wait before aborting download of gbpdistro data
......
5、找到/usr/lib/python2.7/dist-packages/rosdistro/__init__.py文件,作如下修改:
......
# index information
DEFAULT_INDEX_URL = 'file:///home/mxy(修改为你的用户名)/rosdistro/index-v4.yaml'
def get_index_url():
......
之后则可以进行sudo rosdep init这一步的安装以及下一步的安装。
如果还是不行,我是把/etc/ros/rosdep/下的sources.list.d文件也按照第一步修改了。
标签:mxy,sudo,yaml,init,rosdep,file,rosdistro,home,ROS 来源: https://blog.csdn.net/MCotoneaster/article/details/120225271