sudo rosdep init 出现 ERROR: cannot download default

原因:由于链接地址找不到
首先clone这个工程,放在home目录下
The rosdistro package in gitee: https://gitee.com/kbytes/rosdistro.git

打开sudo gedit /etc/ros/rosdep/sources.list.d
把内容改为:b为变化的

# os-specific listings first
yaml file:///home/b/rosdistro/rosdep/osx-homebrew.yaml osx

# generic
yaml file:///home/b/rosdistro/rosdep/base.yaml
yaml file:///home/b/rosdistro/rosdep/python.yaml
yaml file:///home/b/rosdistro/rosdep/ruby.yaml
gbpdistro file:///home/b/rosdistro/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 可以看到

reading in sources list data from /etc/ros/rosdep/sources.list.d
Hit file:///home/b/rosdistro/rosdep/osx-homebrew.yaml
Hit file:///home/b/rosdistro/rosdep/base.yaml
Hit file:///home/b/rosdistro/rosdep/python.yaml
Hit file:///home/b/rosdistro/rosdep/ruby.yaml
Hit file:///home/b/rosdistro/releases/fuerte.yaml
Query rosdistro index file:///home/b/rosdistro/index-v4.yaml
Skip end-of-life distro "ardent"
Skip end-of-life distro "bouncy"
Skip end-of-life distro "crystal"
Add distro "dashing"
Add distro "eloquent"
Add distro "foxy"
Skip end-of-life distro "groovy"
Skip end-of-life distro "hydro"
Skip end-of-life distro "indigo"
Skip end-of-life distro "jade"
Add distro "kinetic"
Skip end-of-life distro "lunar"
Add distro "melodic"
Add distro "noetic"
updated cache in /home/b/.ros/rosdep/sources.cache

参考

你可能感兴趣的:(ros)