【机器人研习社-ROS专辑】ROSDEP UPDATE&ROSDEP INIT 问题的各种解决方法
最近新安装ROS,卡在rosdep update和rosdep init 上很久,以前的方法各种失效,各种尝试后终于解决了,在这里分享给大家。
操作系统:Ubuntu16.04/Ubuntu18.04/Ubuntu20.04
ROS版本:kinetic/melodic/noetic
- rosdep init问题
首先打开一个终端
sudo mkdir -p /etc/ros/rosdep/sources.list.d
cd /etc/ros/rosdep/sources.list.d
sudo gedit 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
# 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://ghproxy.com /代理模式
方案2:本地模式-将rosdistro clone到本地
最近在国内上github越来越难,国内https://raw.githubusercontent.com的可用IP越来越少,通过修改hosts文件解决rosdep update超时问题的方法已经没法再用。
操作系统:
->Ubuntu16.04/Ubuntu18.04/Ubuntu20.04
-> ROS版本:kinetic/melodic/noetic
Error
ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml]:
Failed to download target platform data for gbpdistro:
The read operation timed out
Query rosdistro index https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml
updated cache in /home/ricky/.ros/rosdep/sources.cache
ERROR: Not all sources were able to be updated.
方案1&#