完美解决rosdep update 失败的问题

NNU

rosdep update主要下载几个yaml的配置文件,但是老是失败,于是我们来解决这个问题

前提条件! 需要有一台能上github的电脑!

去这里把整个目录下载下来 rosdistro.zip 或者git下来

GitHub - ros/rosdistro: This repo maintains a lists of repositories for each ROS distribution

主要用到以下的几个目录/内容

目录:

ardent、bouncy、crystal、dashing、eloquent、foxy、galactic、groovy、hydro、indigo、jade、kinetic、lunar、melodic、noetic、rolling

内容:

主目录中的

index-v4.yaml

rosdep中的

base.yaml、osx-homebrew.yaml、python.yaml、ruby.yaml

releases中的

fuerte.yaml、targets.yaml

进行本地替换

cd home/用户名

mkdir rosdep //存放之前说的目录和内容

//  确认一下有这个目录存在 /etc/ros/rosdep/

sudo cp -r rosdep /etc/ros/

//然后开始替换

替换完后 /etc/ros/rosdep 的目录结构应该如下:

//在/etc/ros/rosdep/sources.list.d的20-default.list中,把下面的yaml都替换成本地的

# os-specific listings first
#yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx
yaml file:///etc/ros/rosdep/osx-homebrew.yaml osx
# generic
#yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
yaml file:///etc/ros/rosdep/base.yaml

#yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
yaml file:///etc/ros/rosdep/python.yaml

#yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
yaml file:///etc/ros/rosdep/ruby.yaml
#gbpdistro https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml fuerte
gbpdistro file:///etc/ros/rosdep/fuerte.yaml fuerte
# newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead
进入   /usr/lib/python3/dist-packages/rosdep2/目录

修改gbpdistro_support.py文件,把fuerte.yaml改了

///
#FUERTE_GBPDISTRO_URL = 'https://raw.githubusercontent.com/ros/rosdistro/' \
#    'master/releases/fuerte.yaml'

FUERTE_GBPDISTRO_URL = 'file:///etc/ros/rosdep/fuerte.yaml'


///

修改rep3.py文件 把targets.yaml改了

///
#REP3_TARGETS_URL = 'https://raw.githubusercontent.com/ros/rosdistro/master/releases/targets.yaml'

REP3_TARGETS_URL = 'file:///etc/ros/rosdep/targets.yaml'

///

进入  /usr/lib/python3/dist-packages/rosdistro/目录

修改__init__.py文件 把index-v4.yaml改了

///

#DEFAULT_INDEX_URL = 'https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml'

DEFAULT_INDEX_URL = 'file:///etc/ros/rosdep/index-v4.yaml'

///

最后执行rosdep update

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

LZZ and MYY

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值