说明:在安装ROS-kinetic时遇到如下问题:
用梯子登录上述网之后网页显示如下信息:
# 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
base.yaml即 sudo rosdep init 这一步操作完成的是在所示路径创建并生成osx-homebrew.yaml、python.yaml、ruby.yaml、fuerte.yaml、index.yaml这些文件
问题是挂了梯子这些网址在Ubuntu系统中打不开,解决办法是将上述所有文件都手动创建,并将网址修改为本地地址。
首先手动创建20-default.list文件
sudo chmod 777 /etc
在etc目录下依次创建ros/rosdistro/master/rosdep/sources.list.d各个文件夹
在sources.list.d目录下右键在终端中打开
sudo gedit 20-default.list
复制修改好的路径信息
# os-specific listings first
yaml file:///etc/ros/rosdistro-master/rosdep/osx-homebrew.yaml osx
# generic
yaml file:///etc/ros/rosdistro/master/rosdep/base.yaml
yaml file:///etc/ros/rosdistro/master/rosdep/python.yaml
yaml file:///etc/ros/rosdistro/master/rosdep/ruby.yaml
gbpdistro file:///etc/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
以第一个文件osx-homebrew.yaml为例:
在etc/ros/rosdistro-master/rosdep/路径下右键在终端打开输入:
sudo gedit osx-homebrew.yaml
打开https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml网址将其信息复制在osx-homebrew.yaml文件中并保存,其他文件操作是一样的思路:在目标路径中创建好所需文件,打开网址复制其信息到所创文件。
注意:前四个文件的所在目录是一致的,都在etc/ros/rosdistro/master/rosdep/文件夹下,而第五个是在etc/ros/rosdistro/master/releases文件夹下的
所有操作完成后,其实就已经完成了sudo rosdep init 的操作,无需再sudo rosdep init
下一步需要进行rosdep update来验证,推荐按下面的做法再改一下代理地址
转载:ROS安装过程中如何解决 rosdep update 命令出现错误_WANGBAISHI11的博客-CSDN博客
完成后运行rosdep update,若出现超时的错误,建议把网络改为手机热点