0
$\begingroup$

Rosanswers logo

I have been looking for this for some time now. There is a lot of question about dependencies but I didn't really find what I needed. I am working on a raspberry pi where there is no prebuilt packages. I installed the minimal version of ROS and some packages are missing. Now I want to compile my own package that needs those missing packages. What would be the command to automatically fetch the sources of all those missing packages and compile eveything in the right order? I tried

catkin-make --rosdep-install 

but it doesn't seem to work


Originally posted by Mehdi. on ROS Answers with karma: 3339 on 2015-07-02

Post score: 1


Original comments

Comment by ahendrix on 2015-07-02:
I think this can be done with the rosinstall generator, but I don't remember the specific options that you'd need.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.