树莓派上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就好了

posted @ 2022-06-10 10:59  水水滴答  阅读(113)  评论(0编辑  收藏  举报