ubuntu16.04 install ros kinetic

♀尐吖头ヾ 提交于 2020-08-10 08:16:34

install guide

http://wiki.ros.org/kinetic/Installation/Ubuntu

failed at:

sudo rosdep init
rosdep update

got error:

ERROR: cannot download default sources list from:

https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list

Website may be down.

solution:

git clone https://github.com/ros/rosdistro.git 到 /home/cam/git/

sudo gedit /usr/lib/python2.7/dist-packages/rosdep2/main.py
sudo gedit /usr/lib/python2.7/dist-packages/rosdep2/rep3.py
sudo gedit /usr/lib/python2.7/dist-packages/rosdistro/__init__.py
sudo gedit /usr/lib/python2.7/dist-packages/rosdep2/sources_list.py
将 https://raw.githubusercontent.com/ros/rosdistro/master 全部替换为 file:///home/cam/git/rosdistro



-------------------------rep3.py--------------------------------------------------
# location of targets file for processing gbpdistro files
#REP3_TARGETS_URL = 'https://raw.githubusercontent.com/ros/rosdistro/master/releases/targets.yaml'
REP3_TARGETS_URL = 'file:///home/cam/git/rosdistro/releases/targets.yaml'

-------------------------source_list.py------------------------------------------
#DEFAULT_SOURCES_LIST_URL = 'https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list'
DEFAULT_SOURCES_LIST_URL = 'file:///home/cam/git/rosdistro/rosdep/sources.list.d/20-default.list'
--------------------------rosdistro/__init__.py ---------------------------------
#DEFAULT_INDEX_URL = 'https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml'
DEFAULT_INDEX_URL = 'file:///home/cam/git/rosdistro/index-v4.yaml'

then run cmd: sudo rosdep init

sudo cp /etc/ros/rosdep/sources.list.d/20-default.list /etc/ros/rosdep/sources.list.d/20-default.list.bak
sudo gedit /etc/ros/rosdep/sources.list.d/20-default.list
并全部做替换
将 https://raw.githubusercontent.com/ros/rosdistro/master 全部替换为 file:///home/cam/git/rosdistro


 

# os-specific listings first
#yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx
yaml file:///home/cam/git/rosdistro/rosdep/osx-homebrew.yaml osx



# generic
#yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
yaml file:///home/cam/git/rosdistro/rosdep/base.yaml
#yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
yaml file:///home/cam/git/rosdistro/rosdep/python.yaml
#yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
yaml file:///home/cam/git/rosdistro/rosdep/ruby.yaml
#gbpdistro https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml fuerte
gbpdistro file:///home/cam/git/rosdistro/releases/fuerte.yaml fuerte

# newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead

then run cmd: rosdep update

https://blog.csdn.net/qq_17685565/java/article/details/105741864

https://www.cnblogs.com/gary-guo/p/12650552.html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!