Installing all ros dependencies of a single package rather than the entire workspace
Hello, I want to run something like rosdep install package and have it traverse the list of packages that it depends and install all system and distribution dependencies
Example of my situation
- package_b depends on package_a
- package_c depends on package_a
- package_a depends on system_dependency_e
- package_b depends on system_dependency_f
I want to execute something like
rosdep install package_a --some-commands
and install a, b, e, and f
However when I execute that rosdep install always returns something like
ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
package_b: Cannot locate rosdep definition for [package_a]
But when I run
rosdep install -i package_b
It only installs b and f
My workaround is to do
rosdep install -i $(rospack depends package_a)
But rospack requires all files to be in $ROS_PACKAGE_PATH
and $ROS_PACKAGE_PATH only gets generated when the workspace is sourced
and the workspace is only sourced after you build the workspace
Can anyone help?
Do I understand you correctly when I believe that #q326140 is asking for the same thing ("How to rosdep install dependencies of one package?")? Does the work-around I posted there not work for you?
Well that seems a bit too hardcoded. I was hoping for a automatic way to add all rospackages into the $ROS_PACKAGE_PATH without having to manually type, and my question was asking if foo depends on bar, to install all packages for both foo and bar, rather than just foo. But not including the rest of the packages in the workspace
I'm not sure I understand: whatever is added to
ROS_PACKAGE_PATH
will be crawled recursively. You only need to add thesrc
space of the workspace, not each and every pkg individually.So you want
rosdep
to install all dependencies offoo
, recursively, including those ofbar
, but only iffoo
depends onbar
somehow?