# Cannot locate rosdep definition

Hello all ! Recently I downloaded a package and compiled it. But when I ran rosdep command like:

rosdep install --from-paths . --ignore-src --rosdistro kinetic -y


It gave the following error.

ERROR: the following packages/stacks could not have their rosdep keys resolved to system dependencies: cvg_sim_gazebo_plugins: Cannot locate rosdep definition for [gazebo_plugin]


I searched for the solution, many other people have also faced this issue but with different packages. I tried their suggestion but still the same problem. So my question is that what actually this line Cannot locate rosdep definition for [some package name] of error means. And how I can solve this particular issue. Because I typed the same command in another workspace and I got the same error but for different package.

bebop_teleop: Cannot locate rosdep definition for [libsdl2-ttf-dev]


Your help will be highly appreciated. Thanks

edit retag close merge delete

Sort by » oldest newest most voted

It gave the following error.

ERROR: the following packages/stacks could not have their rosdep keys resolved to system dependencies: cvg_sim_gazebo_plugins: Cannot locate rosdep definition for [gazebo_plugin]


There is no ROS package called gazebo_plugin, nor is there an Ubuntu package (in your case) that is called gazebo_plugin, so rosdep cannot determine which package should be installed to fulfil the dependency.

It's likely that this is a typo: there is a ROS package called gazebo_plugins (note the s at the end there).

So my question is that what actually this line Cannot locate rosdep definition for [some package name] of error means.

That should now hopefully be clear: this is rosdep telling you that it looked for a ROS package by that name, didn't find anything, then tried to see whether there is a package in Debian/Ubuntu/Whatever-OS-you-are-on by that name, and couldn't find that either.

So having exhausted all its options, rosdep tells you that it doesn't know what some package name should map to, and gives up.

Edit:

Because I typed the same command in another workspace and I got the same error but for different package.

bebop_teleop: Cannot locate rosdep definition for [libsdl2-ttf-dev]


That is essentially the same error, with a similar cause: there is no rosdep key called libsdl2-ttf-dev, so rosdep cannot find it.

The correct key would be sdl2-ttf (from here):

sdl2-ttf:
debian: [libsdl2-ttf-dev]
fedora: [SDL2_ttf-devel]
gentoo: [media-libs/sdl2-ttf]
ubuntu: [libsdl2-ttf-dev]


Note: rosdep keys do not have to be identical to the Debian/Ubuntu package name. In fact, most keys follow a more generic naming convention.

The author of bebop_teleop would probably appreciate a pull request fixing the manifest of bebop_teleop to have the correct dependency declaration.

Edit 2:

Sorry, but do I need to install libsdl2-ttf-dev ?

No, you should not (I would almost write "never") install dependencies for ROS packages yourself using apt. If the author of the package has done his work correctly (so: he has used the correct rosdep keys in his package manifest), rosdep should be able to install all dependencies for you automatically.

The problem is that there are quite a few packages that don't have the correct dependencies listed in their package.xml (and bebop_teleop would seem to be one such example).

Having to run sudo apt install ros-some-pkg-required-by-some-other-pkg yourself basically means that some-other-pkg has not been setup correctly, and you should only do that if/when necessary.

you said that rosdep keys do not have to be identical to the Debian/Ubuntu package name. can you please explain this a little?

Please read #q215059 (and perhaps even #q217475) first.

It should be clear that rosdep maps keys to actual package names (Debian/Ubuntu packages, or ebuilds on Gentoo, etc). As the keys are just names made up by humans, you could just as well use john to map to libboost-dev-all or jane to map to libsdl2-ttf-dev.

That would not be very intuitive though, so typically keys are given names that are close to ...

more

@gvdhoorn thanks for your reply, I found that typo because first i searched gazebo_plugin without s, but i found gazebo_plugins with 's' and this one I already installed. problem solved.

( 2019-04-10 05:07:46 -0600 )edit

but about second one I am still not clear. Sorry, but do I need to install libsdl2-ttf-dev ? and you said that rosdep keys do not have to be identical to the Debian/Ubuntu package name. can you please explain this a little? thanks

( 2019-04-10 05:09:56 -0600 )edit

@gvdhoorn thank you very much for such a comprehensive reply. I also tried sudo apt install libsdl2-ttf-dev it's already installed, but rosdep can't locate it.

( 2019-04-10 08:06:20 -0600 )edit

I also tried sudo apt install libsdl2-ttf-dev it's already installed, but rosdep can't locate it.

the problem is not with rosdep, it's with bebop_teleop using an incorrect key.

rosdep gets asked to make sure the package that maps to libsdl2-ttf-dev is present. It then tries to lookup the keylibsdl2-ttf-dev. But that key doesn't exist, so it fails. rosdep isn't trying to locate anything. It cannot even determine which Debian/Ubuntu package it should be looking for (as the key doesn't exist), so it prints the error you get.

You need to fix the package.xml of bebop_teleop to not use libsdl2-ttf-dev as a key, but libsdl2-ttf.

( 2019-04-10 08:10:01 -0600 )edit

really great. Now I got the point. Problem is solved. thank you so much, you are doing a great job.

( 2019-04-10 08:20:20 -0600 )edit
2

Then I would appreciate it if you could mark the question as answered.

( 2019-04-10 08:22:43 -0600 )edit