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

Rosdep - how to define dependency management on custom package?

asked 2013-08-22 14:07:05 -0500

jrd gravatar image

updated 2013-08-23 00:26:07 -0500

Hi all,

I want to utilise ROS dependency management for my custom packages (in new workspace). I have packages A and B on github, where A depends on B. This means that package.xml of A has to include this line:

<run_depend>'B'</run_depend>

Suppose that A and B are not installed. Now I would like to download just A and use rosdep install to download also B. But I am not sure about correct workflow - how to setup this. I know that there is a .rosinstall file, which connects name of particular package with its address on github. But this means that I can install only packages with depend on packages listed in the .rosinstall file, right?

So in order to use this dependency management, I have to manually add every package name and location (also B) into the .rosinstall file? This does not seem to be very practical..

My question is: Is there any way how to do this in more decentralised fashion? That is: I would like to be able to define entire dependency directly inside the package A, something like this:

<run_depend>'B'</run_depend><location>'http://github.com/B'</location>

..so the rosdep would be able to install new, previously unlisted package B.

============================================
================ edit (based on tfoote's answer):

Still, I would like to be able to do this somehow dynamically. I just discovered this command, which gives me git uri for package referenced by name:

roslocate uri ros_tutorials

And I found out that these information (used by roslocate) are stored here. I suppose that this is some global storage of information about packages which is used also by rosdep and rosinstall_generator??

So my supposed workflow could be:

  • create packages A and B on github
  • publish info about them them somehow through http://ros.org/doc/groovy/api/
  • tell people to:
  • download A (e.g. 'git cone github/A')
  • run: 'rosdep install src' (finds A in src, determines that B is needed, checks its uri online and downloads it)
  • run 'catkin_make --install'

So my updated questions are:

  • Is this the right approach to publish own packages?
  • Can I publish info about my packages on http://ros.org/doc/groovy/api/?
  • If yes: how should I do this? (is the correct approach the one described here)?
  • If not: is there a better way? (e.g. I could provide my custom alternative to list of packages on http://ros.org/doc/groovy/api/, but how to redirect all those ros-tools to use it?)

Thank you very much for clarification in advance. Best, Jarda

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-08-22 14:15:17 -0500

tfoote gravatar image

rosdep is not designed to pull packages from source which is what you are asking for. It is designed to install system dependencies only from the package manager.

The tool you are looking for is rosinstall_generator available as python-rosinstall-generator from apt.

It works using the rosdistro library. And to make use of it for unreleased code you will need to setup your own rosdistro files. It's a designed use case but has not been polished for general use.

In the mean time most users simply create a rosinstall file that they keep the common tools they need in their workspace.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-08-22 14:07:05 -0500

Seen: 3,333 times

Last updated: Aug 23 '13