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)