ROS安装rosdep失败的解决办法
作者:互联网
rosdep init 失败的解决办法
在/etc/ros/rosdep/sources.list.d/这个目录下创建20-default.list文件
sudo gedit /etc/ros/rosdep/sources.list.d/20-default.list
20-default.list 文件的內容是:
# os-specific listings first
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx
# generic
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
yaml https://raw.githubusercontent.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
保存后退出,执行rosdep update
rosdep update失败的解决办法
1、在https://github.com/ros/rosdistro 网址中下载源码,把里面的文件解压在 /etc/ros 中,
或者
cd /etc/ros
sudo git clone https://github.com/ros/rosdistro.git
2、修改/etc/ros/rosdep/sources.list.d/20-default.list文件
sudo gedit /etc/ros/rosdep/sources.list.d/20-default.list
修改内容如下:
# os-specific listings first
#yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx
yaml file:///etc/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx
# generic
#yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
#yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
#yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
#gbpdistro https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml fuerte
yaml file:///etc/ros/rosdistro/rosdep/base.yaml
yaml file:///etc/ros/rosdistro/rosdep/python.yaml
yaml file:///etc/ros/rosdistro/rosdep/ruby.yaml
gbpdistro file:///etc/ros/rosdistro/releases/fuerte.yaml fuerte
# newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead
3 打开/usr/lib/python2.7/dist-packages/rosdistro/init.py这个文件,按照下面的代码进行修改。
# index information
#DEFAULT_INDEX_URL = 'https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml'
DEFAULT_INDEX_URL = 'file:///etc/ros/rosdistro/index-v4.yaml'
保存后执行rosdep update,如果不成功多执行几次,成功后出现下面打印
reading in sources list data from /etc/ros/rosdep/sources.list.d
Hit file:///etc/ros/rosdistro/rosdep/osx-homebrew.yaml
Hit file:///etc/ros/rosdistro/rosdep/base.yaml
Hit file:///etc/ros/rosdistro/rosdep/python.yaml
Hit file:///etc/ros/rosdistro/rosdep/ruby.yaml
Hit file:///etc/ros/rosdistro/releases/fuerte.yaml
Query rosdistro index file:///etc/ros/rosdistro/index-v4.yaml
Skip end-of-life distro "ardent"
Skip end-of-life distro "bouncy"
Skip end-of-life distro "crystal"
Add distro "dashing"
Add distro "eloquent"
Add distro "foxy"
Skip end-of-life distro "groovy"
Skip end-of-life distro "hydro"
Skip end-of-life distro "indigo"
Skip end-of-life distro "jade"
Add distro "kinetic"
Skip end-of-life distro "lunar"
Add distro "melodic"
Add distro "noetic"
updated cache in /home/xxxx/.ros/rosdep/sources.cache
标签:解决办法,ROS,etc,yaml,rosdep,rosdistro,ros,distro 来源: https://www.cnblogs.com/OPBrother/p/15080785.html