ubuntu rosdep报错

一、原因

因为最近github网站不太好进,导致rosdep update很容易出错,所以选择下载rosdistro到本地。

二、下载

链接:https://pan.baidu.com/s/1hEwepV_1rPjDMFvxFUcVpQ
提取码:edpk

三、配置

将rosdistro.zip压缩包解压到home下,并且文件夹名字改为rosdistro
1.修改 20-default.list

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

改为以下:

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

# generic
yaml file:///home/xx/rosdistro/rosdep/base.yaml
yaml file:///home/xx/rosdistro/rosdep/python.yaml
yaml file:///home/xx/rosdistro/rosdep/ruby.yaml
gbpdistro file:///home/xx/rosdistro/releases/fuerte.yaml fuerte

# newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead

上面的xx为自己电脑的名字,注意检查路径是否正确
2.修改 sourceslist.py

sudo gedit /usr/lib/python2.7/dist-packages/rosdep2/sources_list.py

注释掉DEFAULT_SOURCES_LIST_URL一行(前面加#)添加以下:

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

2.修改 rep3.py

sudo gedit /usr/lib/python2.7/dist-packages/rosdep2/rep3.py

注释REP3_TARGETS_URL 一行,添加以下:

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

3.修改 __init.py

sudo gedit /usr/lib/python2.7/dist-packages/rosdistro/__init__.py

注释 DEFAULT_INDEX_URL 一行,添加以下:

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

四、测试

rosdep update

出现以下:

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

成功

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值