解决rosdep update失败

解决rosdep update失败

  • 安装ros
    • 手动下载并更新

安装ros

sudo rosdepc init

手动下载并更新

手动下载所有所需要的文件:gitee rosdistro github rosdistro.
1.修改 /etc/ros/rosdep/sources.list.d/20-default.list 文件,其中ht为用户名

sudo gedit /etc/ros/rosdep/sources.list.d/20-default.list
# os-specific listings first
yaml file:///home/ht/rosdistro/rosdep/osx-homebrew.yaml osx
yaml file:///home/ht/rosdistro/rosdep/base.yaml
yaml file:///home/ht/rosdistro/rosdep/python.yaml
yaml file:///home/ht/rosdistro/rosdep/ruby.yaml
gbpdistro file:///home/ht/rosdistro/releases/fuerte.yaml fuerte

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

2.修改 /usr/lib/python2.7/dist-packages/rosdep2/sources_list.py 文件

 sudo gedit /usr/lib/python2.7/dist-packages/rosdep2/sources_list.py

将72行修改成如下形式:

DEFAULT_SOURCES_LIST_URL = 'file:///home/ht/rosdistro/rosdep/sources.list.d/20-default.list'

3.修改 /usr/lib/python2.7/dist-packages/rosdep2/rep3.py 文件
c++ sudo gedit /usr/lib/python2.7/dist-packages/rosdep2/rep3.py
将39行修改成如下形式:
REP3_TARGETS_URL = 'file:///home/ht/rosdistro/releases/targets.yaml'

4.修改 /usr/lib/python2.7/dist-packages/rosdistro/init.py文件

 sudo gedit /usr/lib/python2.7/dist-packages/rosdistro/_init_.py

将68行修改成如下形式:

DEFAULT_INDEX_URL = 'file:///home/ht/rosdistro/index-v4.yaml'

5.修改完成后:

sudo rosdep init

6.然后:

rosdep update

你可能感兴趣的:(Ubuntu,ros,SLAM,自动驾驶,git,github)