解决rosdep的问题

解决rosdep的问题,第1张

解决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

仅作为笔记自学!

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zaji/5689849.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-17
下一篇 2022-12-17

发表评论

登录后才能评论

评论列表(0条)

保存