教程一:暴力法
    本教程需要vpn,ubuntu进外网的教程,步骤3要用到

    1、前面的步骤不写了,参考官方安装步骤或者网友博客教程
    注意,只需要执行到 sudo rosdep init 的上一步就行了
    2、手动完成 sudo rosdep init 的步骤(因为这一步也会报website maybe down之类的错误),打开终端执行

    1. sudo passwd //接着提示输入ubuntu密码,输入你的用户密码即可
    2. sudo su //或者su root 然后输入密码切换至root用户
    3. sudo mkdir -p /etc/ros/rosdep/sources.list.d
    4. cd /etc/ros/rosdep/sources.list.d
    5. touch 20-default.list
    6. sudo gedit 20-default.list
    1. 在打开的窗口中添加以下内容,并保存退出
    1. # os-specific listings first
    2. yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx
    3. # generic
    4. yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
    5. yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
    6. yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
    7. gbpdistro https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml fuerte
    8. # newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead

    修改sources_list.py文件,打开终端执行

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

    在新打开的窗口最下面添加以下内容,并保存退出

    1. import ssl
    2. ssl._create_default_https_context = ssl._create_unverified_context

    至此已经手动完成 sudo rosdep init 的工作了
    3、rosdep update的准备工作
    (1)、创建自动化脚本(无限循环rosdep update命令)
    桌面上新建一个auto.py的文件,添加以下内容

    1. import os
    2. a = True
    3. i = 0
    4. while a:
    5. b = os.system("rosdep update")
    6. if b == 0:
    7. a = False
    8. else:
    9. a = True
    10. print('times:',i)
    11. i += 1
    1. (2)、打开v*p*n<br /> (3)、cdauto.py文件所在文件夹,打开终端执行
    1. python auto.py
    1. 然后等就行了,一定要开v*p*n,网速不用太快,在网上找找免费的节点,我用的延迟是3000ms,一样可以成功安装。

    教程二:
    别人写的,可以尝试下:链接

    参考一
    参考二