解决rosdep的问题

输入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.

下载 git clone https://github.com/ros/rosdistro.git 并将其中涉及到 raw.githubusercontant.com 的路径替换为本地路径:

1.sudo nano rosdistro/rosdep/sources.list.d/20-default.list (原demo)

# os-specific listings first
yaml https://raw.github.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx   
# generic
yaml https://raw.github.com/ros/rosdistro/master/rosdep/base.yaml
yaml https://raw.github.com/ros/rosdistro/master/rosdep/python.yaml
yaml https://raw.github.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

改(XXX为自己的用户名,下面遇到的都这么改)

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

# generic
yaml file:///home/XXX/rosdistro/rosdep/base.yaml
yaml file:///home/XXX/rosdistro/rosdep/python.yaml
yaml file:///home/XXX/rosdistro/rosdep/ruby.yaml
gbpdistro file:///home/XXX/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.修改路径 sudo nano /usr/lib/python2.7/dist-packages/rosdep2/rep3.py

REP3_TARGETS_URL = 'file:///home/XXX/rosdistro/releases/targets.yaml'

3.修改路径 sudo nano /usr/lib/python2.7/dist-packages/rosdep2/sources_list.py

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

4.修改路径 sudo nano /usr/lib/python2.7/dist-packages/rosdistro/__init__.py

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

5.修改路径 sudo nano /usr/lib/python2.7/dist-packages/rosdep2/gbpdistro_support.py

FUERTE_GBPDISTRO_URL = 'file:///home/XXX/rosdistro/releases/fuerte.yaml'

输入sudo rosdep init

如果出现

ERROR: default sources list file already exists:
	/etc/ros/rosdep/sources.list.d/20-default.list
Please delete if you wish to re-initialize

那就输入

sudo rm /etc/ros/rosdep/sources.list.d/20-default.list

如果提示

Wrote /etc/ros/rosdep/sources.list.d/20-default.list
Recommended: please run

	rosdep update

直接输入 rosdep update

仅作为笔记自学!

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值