栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

解决rosdep的问题

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

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

仅作为笔记自学!

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/689342.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号