ROS安装问题:初始化问题

    技术2023-12-19  130

    安装ROS时sudo rosdep init指令报错

    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.

    这种问题一般是应该下载的文件下载不下来,所以就查看文件内容,自己创建一个。 新建文件:

    sudo gedit /etc/ros/rosdep/sources.list.d/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

    然后直接

    rosdep update

    如果还是有问题,在浏览器访问网址 https://site.ip138.com/raw.Githubusercontent.com/

    输入raw.githubusercontent.com 会出现几个网址,选择一个,我选择151.101.76.133 修改hosts

    sudo gedit /etc/hosts

    增加 151.101.76.133 raw.githubusercontent.com 然后再

    rosdep update

    如果再出现问题,那都是网络问题,多试几次,有线网,手机热点。 参考:https://www.cnblogs.com/polipolu/p/12836331.html

    Processed: 0.014, SQL: 9