树莓派上rosdep update的问题解决
ROS安装过程中,常常会出现rosdep update出错的问题。ROS安装过程中,常常会出现rosdep update出错的问题。参照大神博客完成。
我的系统是ubuntu20.04 mate,python3,按照上面大佬的安装,整理下自己的修改过程,方便后面用到。
1、下载rosdistro到本地
git clone https://github.com/ros/rosdistro.git
记录下此时文件的路径:
pwd

/home/pacecat/rosdistro
, 后面要用到的路径名称
2、修改文件
- rep3.py文件修改
cd /usr/lib/python3/dist-packages/rosdep2/
sudo vim rep3.py
找到关键字:REP3_TARGETS_URL,替换修改如下:
#REP3_TARGETS_URL = ‘https://raw.githubusercontent.com/ros/rosdistro/master/releases/targets.yaml’
REP3_TARGETS_URL = 'file:///home/pacecat/rosdistro/releases/targets.yaml'
- init.py文件修改
cd /usr/lib/python3/dist-packages/rosdistro
sudo vim __init__.py
找到关键字:DEFAULT_INDEX_URL,替换修改如下:
#DEFAULT_INDEX_URL = 'https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml'
DEFAULT_INDEX_URL = 'file:///home/pacecat/rosdistro/index-v4.yaml'
- 20-default.list文件修改
cd /etc/ros/rosdep/sources.list.d/
sudo vim 20-default.list
修改如下:
# os-specific listings first
#yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx
yaml file:///home/pacecat/rosdistro/rosdep/osx-homebrew.yaml osx
# generic
#yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
yaml file:///home/pacecat/rosdistro/rosdep/base.yaml
#yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
yaml file:///home/pacecat/rosdistro/rosdep/python.yaml
#yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
yaml file:///home/pacecat/rosdistro/rosdep/ruby.yaml
#gbpdistro https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml fuerte
gbpdistro file:///home/pacecat/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、更新
rosdep update
2022-06-28更新
有网友在网上自制了一个插件,是6-rosdep,运行sudo pip3 install 6-rosdep之后(前提是有python3的这个pip,没有的话,可以sudo apt-get install python3-pip)
运行sudo 6-rosdep
再进行sudo rosdep init
rosdep update就好了
作者:水水滴答
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构