You can get the packages you are missing using rosinstall_generator
.
First you'll want to source the setup file for any packages you already have:
$ source /path/to/setup.bash
This will put the packages you already have on your ROS_PACKAGE_PATH
(RPP). Then you can ask rosinstall_generator
to generate a rosinstall file which contains all the packages you need:
$ rosinstall_generator <pkg1> <pkg2> ... <pkgn> --rosdistro indigo --deps --deps-only --tar --exclude RPP > my.rosisntall
You can replace the <pkg1> <pkg2> ... <pkgn>
with a white space separated list of the packages you have for which you want to install the dependencies. The --rosdistro
option tells it what ROS distribution to pull these packages from, the --deps
option tells it to get the dependencies of the packages you specified, the --deps-only
tells it to avoid including the packages you specified (I assume you already have those), and the --tar
option tells it to get tarballs instead of git/hg repositories if possible (downloads it faster). Finally the --exclude RPP
option tells it to avoid adding packages which it can find on your local RPP. It puts all of this out to stdout, so we can pipe that into a rosinstall file with > my.rosinstall
, the name of which doesn't really matter.
After you run this you can look at the result in the file or run it without the redirection and see that it makes sense. It shouldn't contain packages you already have built nor the packages you are going to build, but a list of packages in between those.
Once you have the rosinstall file as you like you can fetch the packages in it with wstool
:
$ wstool init ~/extra_catkin_ws/src my.rosinstall -j8
If you later need to generate additional rosinstall files, they can be merged into the workspace like this:
$ wstool merge -t ~/extra_catkin_ws/src other.rosinstall
$ wstool up -t ~/extra_catkin_ws/src -j8
Then you can follow the general pattern that is shown in the source install instructions for ROS, doing rosdep and then one of the catkin commands:
$ cd ~/extra_catkin_ws
$ rosdep install --from-paths src -i -y
$ catkin_make_isolated
Hope that helps,
Originally posted by William with karma: 17335 on 2015-07-02
This answer was ACCEPTED on the original site
Post score: 3
Original comments
Comment by Mehdi. on 2015-07-03:
doing this for image_transport for example returns : No packages/stacks left after applying the exclusions
even though the dependency plugin_lib is missing. When I don't exclude RPP I get a lot of packages like ros_core but also plugin_lib
Comment by William on 2015-07-03:
Then that means you have all of the ROS dependencies you need to build image_transport.
Comment by Mehdi. on 2015-07-07:
Could not find a package configuration file provided by "pluginlib" with
any of the following names:
pluginlibConfig.cmake
pluginlib-config.cmake
What should I consider while trying to find out what is wrong here with rosinstall_generator?
Comment by Mehdi. on 2015-07-07:
So in my case pluginlib is missing but running
rosinstall_generator pluginlib --deps --exclude RPP > my.rosinstall I get:
Using ROS_DISTRO: indigo
No packages/stacks left after applying the exclusions