ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

rosdep to work with sources instead of binaries

asked 2016-09-13 14:38:03 -0600

agilmor gravatar image

Hi,

We have a small HPC infrastucture that, for simplicity, we can see as a Debian servers with multiple non-root users. (I'm the root. ;-)

We use environment modules to be able to have multilple versions of several key software we use, e.g. Boost, OpenCV... To avoid conflicts we try to reduce to the minimal the amount of packages that we install with apt-get, and we tend to use as much as possible virtualenv (and we are trying to move to docker).

So, we've decided to install ROS from sources.

So far we've already installed the kinetic ros_comm (from its own virtualenv), and with a small modulefile + the usual source /path/to/setup.bash the users already have access to the ROS basic commands... so good!

But now I don't know how to allow users to install existing packages and their dependences (e.g. ros_tutorials). I know that the usual way is to use rosdep, but it always work with existng binaries with apt-get, or with pip commands, am I right? Users can use pip if they setup a virtualenv, but they cannot use apt-get... Is there any way to make it download and build sources?

I know that they can clone the repository in their catkin_ws (with or without wstool) and just catkin_make... and this is quite fine! But... is there any way to at least download/clone all the dependencies of the desired not already in the catkin_ws or in the ROS installation path? The rosinstall_generator looks as the tool I'm asking for... but it includes all depedencies althought they are alrady installed?

What is the standard way to work with source packages and source dependencies?

Thanks!

Albert

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2016-09-13 17:39:35 -0600

tfoote gravatar image

updated 2016-09-14 15:51:27 -0600

I recommend reading up about the rosinstall generator. There are instructions for how to do a source installation using it like the standard source install instructions

There are options to exclude specific packages and exclude via path for things already installed.

Your users should source create their own workspace, source the underlay setup file, and then they can use rosinstall generator with the --exclude RPP to skip anything in the underlay to generate their desired set of packages.

As much as it's great to keep things isolated the cost of compiling everything from source is very high for individual developers. There are a lot of packages int he ROS ecosystem and the aggregate compile time ends up being many hours versus minutes. And I know of developers who will wait a few days for binaries to be released instead of pulling external packages from source.

So I'd definitely suggest that you look hard at docker or at least chroots to allow you to reuse the binary packages unless you're planning a single installation and deployment and not to be actively developing.

Note that there are official ROS docker images as well as several higher level images from OSRF

edit flag offensive delete link more

Comments

Thanks! So, to install from sources the root should use rosinstall_gen+rosdep+catkin_make_isolated --install. Then the users can create their catkin_ws and use catkin_create_pkg, catkin_make... My doubt is, how do they install existing packages from sources that are not in the root isolated install?

agilmor gravatar image agilmor  ( 2016-09-14 09:07:57 -0600 )edit

More specific: Should the users use rosinstall_gen as the root did, or should they use wstool from git (overlay scheme althought not overlaying any package?)

http://wiki.ros.org/kinetic/Installat... vs http://wiki.ros.org/catkin/Tutorials/... ?

agilmor gravatar image agilmor  ( 2016-09-14 09:11:21 -0600 )edit

I've edited my answer to give more details. The users should use the rosinstall generator inside their workspace.

tfoote gravatar image tfoote  ( 2016-09-14 15:52:23 -0600 )edit
1

Thanks! It worked with this workflow. Fist time:

$ wstool init
$ catkin_init_workspace && catkin_make

Daily work:

$ source devel/setup.bash
$ rosinstall_generator ros_tutorials --deps --wet-only --exclude RPP | wstool merge -t src
$ wstool update -t src
$ catkin_make
agilmor gravatar image agilmor  ( 2016-09-15 06:45:57 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-09-13 14:38:03 -0600

Seen: 537 times

Last updated: Sep 14 '16