Ultimate solution to error reporting of sudo rosdep init of ROS

sudo rosdep init error reporting solution of ROS

In the process of installing ROS, I encountered the problem of sudo rosdep init reporting an error. I searched many tutorials and couldn't solve it. Later, I referred to the tutorial at the end of the article and couldn't deal with it. Later, I realized that the installation failed because the installation source corresponding to rosdep couldn't be opened directly in China. Based on the principle that others will encounter their own problems, Persist in the search and finally find the corresponding source file in chinacode. Therefore, refer to the tutorial at the end of the article. Only when the final file of the tutorial is modified, the original source file will be added to the link( https://raw.github.com/ros/rosdistro )Replace with the link in chinacode:( https://codechina.csdn.net/mirrors/ros/rosdistro)
When you try to follow the tutorial again, the problem can be solved and posted as a souvenir.

Amend the content as follows:

# os-specific listings first
yaml https://codechina.csdn.net/mirrors/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx   
# generic
yaml https://codechina.csdn.net/mirrors/ros/rosdistro/master/rosdep/base.yaml
yaml https://codechina.csdn.net/mirrors/ros/rosdistro/master/rosdep/python.yaml
yaml https://codechina.csdn.net/mirrors/ros/rosdistro/master/rosdep/ruby.yaml
gbpdistro https://codechina.csdn.net/mirrors/ros/rosdistro/master/releases/fuerte.yaml fuerte   
# newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro
index.yaml instead

Please refer to the original tutorial for the specific process.

-----The following is the original tutorial move------
Because, a few days ago, I showed my roommate how to install Ubuntu dual system. Then, I accidentally deleted my system disk, so that I had to reinstall the system and install ROS... Shit! Later, I encountered this problem during the installation process... emmm... This bug stalled my own project for three days. Shit, I just found a solution at noon today... Now I post it here... In case my friend who just installed ROS falls into the pit

Here I add to you: after reading my article, you don't have to look at other solutions(Most of these articles can't solve it!!!)

That's why I've solved it in many articles sudo rosdep init Comment on my article in the comment area of the article on error reporting solutions to avoid detours!

It is hereby declared that:

If there is still a problem with my method, there will only be one problem:

    There is something wrong with your network. Be sure to execute the command continuously first sudo rosdep init Until the terminal prompts: rosdep update
    You can trust me! Help you solve it.

Solution:

1. Write a command in the terminal of the desktop: (please ignore this step created with the command line and try not to use it!!!)

sudo mkidr -p /etc/ros/rosdep/sources.list.d

On some computers here, there may be an error that mkdir cannot create the package... Don't be afraid to input directly on the current terminal

(I strongly recommend that you directly run sudo chmod 777 /etc in the following steps, regardless of whether there is an error that mkdir cannot create the package. Be diligent and create the directory yourself.)

sudo chmod 777 /etc

After entering, you will find that each file package in your / etc / directory will have a lock icon (some computers may not), which means that you can create a new folder in this directory at this moment!

What we need to do at this time is to manually create the above Directory: / ros/rosdep/sources.list.d (of course, in the etc Directory...)

2. After creation

We enter this command (the terminal must be opened in the directory of etc/ros/rosdep/sources.list.d!)

sudo gedit  20-default.list

At this point, the editing interface of gedit will appear. The name of the document is 20-default.list

Copy the following:

# os-specific listings first
yaml https://raw.github.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx   
# generic
yaml https://raw.github.com/ros/rosdistro/master/rosdep/base.yaml
yaml https://raw.github.com/ros/rosdistro/master/rosdep/python.yaml
yaml https://raw.github.com/ros/rosdistro/master/rosdep/ruby.yaml
gbpdistro https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml fuerte   
# newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro
index.yaml instead

3. Open the terminal on the desktop and execute the command:

sudo rosdep init

Then you'll find success..

Last input:

rosdep update

Reference link

Original link: https://blog.csdn.net/qq_41058594/article/details/102970901.

Tags: Autonomous vehicles

Posted on Sat, 02 Oct 2021 13:04:48 -0400 by Fingers68