我是靠谱客的博主 傻傻花瓣,这篇文章主要介绍ROS rosdep update 出错方法 不需要翻墙切换之类的解决方法 ‘https://raw.githubusercontent.com/ros/rosdistro/master/inde,现在分享给大家,希望可以做个参考。

系统 ubuntu18
rosdep update参考的这篇文章:

https://blog.csdn.net/weixin_43311920/article/details/114796748?utm_source=app&app_version=4.5.4
前几步都对
但是按照这位博主的方法做到第二步修改第四个文件时

复制代码
1
2
3
4
5
6
7
原博主文章: cd /usr/lib/python2.7/dist-packages/rosdistro/ sudo gedit __init__.py (我的电脑里是 __init__.py,但是原作者的是init.py,大家可以自己查看) 同样的替换,如下 DEFAULT_INDEX_URL = 'file:///home/yourname/rosdistro/index-v4.yaml'

出现问题 不管怎么修改 都会同样去访问

复制代码
1
2
Query rosdistro index 'https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml'

而不是修改后的

复制代码
1
2
'file:///home/yourname/rosdistro/index-v4.yaml'

这里的原因是修改的文件不对,博主修改的文件路径是

复制代码
1
2
/usr/lib/python2.7/dist-packages/rosdistro/__init__.py

但是即使修改了这个文件,并且强制删除了同名的pyc文件,依旧修改无效
因此判断 rosdep update并没有访问这里的脚本文件
输入命令

复制代码
1
2
sudo grep -R index-v4.yaml /usr/* | more

得到

复制代码
1
2
3
usr/lib/python2.7/dist-packages/rosdistro/__init__.py:DEFAULT_INDEX_URL = 'https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml' usr/local/python2.7/dist-packages/rosdistro/__init__.py:DEFAULT_INDEX_URL = 'https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml'

第一个文件路径是原博主修改的文件,但是我的系统中使用的是第二个路径的文件
将两个文件的DEFAULT_INDEX_URL 都修改为DEFAULT_INDEX_URL = 'file:///home/dingzilin/rosdistro/index-v4.yaml'
顺利通过

复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
reading in sources list data from /etc/ros/rosdep/sources.list.d Warning: running 'rosdep update' as root is not recommended. You should run 'sudo rosdep fix-permissions' and invoke 'rosdep update' again without sudo. Hit file:///home/dingzilin/rosdistro/rosdep/osx-homebrew.yaml Hit file:///home/dingzilin/rosdistro/rosdep/base.yaml Hit file:///home/dingzilin/rosdistro/rosdep/python.yaml Hit file:///home/dingzilin/rosdistro/rosdep/ruby.yaml Hit file:///home/dingzilin/rosdistro/releases/fuerte.yaml Query rosdistro index file:///home/dingzilin/rosdistro/index-v4.yaml Skip end-of-life distro "ardent" Skip end-of-life distro "bouncy" Skip end-of-life distro "crystal" Skip end-of-life distro "dashing" Skip end-of-life distro "eloquent" Add distro "foxy" Add distro "galactic" Skip end-of-life distro "groovy" Skip end-of-life distro "hydro" Skip end-of-life distro "indigo" Skip end-of-life distro "jade" Skip end-of-life distro "kinetic" Skip end-of-life distro "lunar" Add distro "melodic" Add distro "noetic" Add distro "rolling" updated cache in /home/dingzilin/.ros/rosdep/sources.cache

最后

以上就是傻傻花瓣最近收集整理的关于ROS rosdep update 出错方法 不需要翻墙切换之类的解决方法 ‘https://raw.githubusercontent.com/ros/rosdistro/master/inde的全部内容,更多相关ROS内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(60)

评论列表共有 0 条评论

立即
投稿
返回
顶部