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'
///