ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Can't init rosdep

asked 2022-05-23 08:57:10 -0500

AibohphobiA gravatar image

updated 2022-05-24 00:39:03 -0500

Hi there, I'm trying to install ROS melodic and following: http://wiki.ros.org/melodic/Installat...

after calling:

sudo apt install python-rosdep

I follow up with:

sudo rosdep init

and getting:

ERROR: default sources list file already exists:
/etc/ros/rosdep/sources.list.d/20-default.list
Please delete if you wish to re-initialize

I tried deleting and running init - which then asks me to update and goes back to the error above.

Any help would be great!

Thanks.

Full console log:

user@sharon-VirtualBox:~$ sudo rosdep init
ERROR: default sources list file already exists:
    /etc/ros/rosdep/sources.list.d/20-default.list
Please delete if you wish to re-initialize
user@sharon-VirtualBox:~$ sudo rm /etc/ros/rosdep/sources.list.d/20-default.list 
user@sharon-VirtualBox:~$ sudo rosdep init
Wrote /etc/ros/rosdep/sources.list.d/20-default.list
Recommended: please run
    rosdep update
user@sharon-VirtualBox:~$ rosdep update
reading in sources list data from /etc/ros/rosdep/sources.list.d
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml
Query rosdistro index https://raw.githubusercontent.com/ros/rosdistro/master/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"
Add distro "humble"
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/user/.ros/rosdep/sources.cache
user@sharon-VirtualBox:~$ sudo rosdep init
ERROR: default sources list file already exists:
    /etc/ros/rosdep/sources.list.d/20-default.list
Please delete if you wish to re-initialize
user@sharon-VirtualBox:~$
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2022-05-23 12:11:40 -0500

tfoote gravatar image

rosdep update is a different sub command and is not saying that you should rerun the init,rosdep init. If that's not clear to you. Please include the full console outputs of your commands that you're running including the commands your running and the full outputs of those commands so that we can reproduce the issue.

edit flag offensive delete link more

Comments

Hi & thanks for the quick reply! I added the full console log to my original post. Maybe I didn't describe the problem properly, but you can see from the log that I just can't call rosdep init. Dun't know why :(

AibohphobiA gravatar image AibohphobiA  ( 2022-05-24 00:40:40 -0500 )edit

That's because you need to call rosdep init once. And I mean once per installation. After you've run rosdep init you never have to run it again. You do have to run rosdep update from time to time, but you never have to initialize it again.

Which is what the error means:

ERROR: default sources list file already exists:
    /etc/ros/rosdep/sources.list.d/20-default.list
Please delete if you wish to re-initialize

default sources list file already exists means that it already has created the sources list. Then when you run rosdep init after removing the file, it gives you the following result:

Wrote /etc/ros/rosdep/sources.list.d/20-default.list
Recommended: please run
    rosdep update

In other words, it has created the sources list and recommends you to update it. After that you never have to run rosdep init again.

Joe28965 gravatar image Joe28965  ( 2022-05-24 01:48:47 -0500 )edit

Oh wow, silly me. just waster a lot of time on nothing. Thanks for your help! btw, is there any was of testing that it's initialized and working properly?

AibohphobiA gravatar image AibohphobiA  ( 2022-05-24 03:06:39 -0500 )edit

If rosdep update works as it does in your case (going through the distro's and ending with updated cache in...) you know it is working properly.

Also, please accept tfoote's answer to move this question to indicate that this question is answered.

Joe28965 gravatar image Joe28965  ( 2022-05-24 03:10:43 -0500 )edit

Thanks for your help!

AibohphobiA gravatar image AibohphobiA  ( 2022-05-24 04:47:26 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2022-05-23 08:57:10 -0500

Seen: 1,488 times

Last updated: May 24 '22