The solutions of rosdep init and rosdep update are effective for personal testing

Problem Description

When installing ros, an exception will most likely be thrown when rosdep is initialized at the last step. This is because overseas resources are blocked.
insert image description here

Baidu or google search, there are many solutions, but unfortunately the wall has been raised, and now it is collectively invalid. So I specially summarize the method recommended by the great god ros. The idea is to link the resources to be downloaded to gitee, so as not to be afraid of connection timeout.

Solution

1. Enter /usr/lib/python3/dist-packages/ to find the relevant content in rosdep and raw.githubusercontent.comcall the command:

find . -type f | xargs grep "raw.githubusercontent"

insert image description here
2. The sudo gedit command modifies the following four files respectively:

  • ./rosdistro/_ _ init _ _.py
  • ./rosdep2/gbpdistro_support.py
  • ./rosdep2/sources_list.py
  • ./rosdep2/rep3.py。

3. If the URL content involved in the file is raw.githubusercontent.com/ros/rosdistro/master, replace it with gitee.com/zhao-xuzuo/rosdistro/raw/master.

4. Then execute the command again:

sudo rosdep init
rosdep update

The initialization and update of rosdep can be implemented normally!

insert image description here

Guess you like

Origin blog.csdn.net/qq_42257666/article/details/123251266