Ask Your Question
0

Cannot locate rosdep definition for [geographicinfo]

asked 2013-01-16 22:18:35 -0500

Benoit Larochelle gravatar image

updated 2013-01-22 21:08:17 -0500

I'm using ROS Fuerte and I would like to use the stack geographicinfo from one of my packages. My package itself is stored on the company's SVN, protected with user names and passwords (i.e. not a public SVN). My package is to be shared among project partners, some of which have no ROS experience. I would thus like geographicinfo to be installed automatically (from source or package) when anyone using my package calls rosmake. Eventually, I would like all packages on which I depend to be installed automatically.

My project partners all use Ubuntu 11.04 and ROS Fuerte. However, they use different variants of ROS, some of which shared with other projects and thus cannot be modified.

The documentation that I found said that I should simply add <rosdep name="geographicinfo"/> to my manifest file, but I have the impression that I have to put the URL of the stack somewhere. Otherwise, I get the following error:

$ rosdep install MyPackage
ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
MyPackage: Cannot locate rosdep definition for [geographicinfo]

How do I resolve this?

edit retag flag offensive close delete

4 answers

Sort by ยป oldest newest most voted
1

answered 2013-01-31 18:35:24 -0500

tfoote gravatar image

You are asking rosdep to do something it is not designed to do. rosdep is designed to install the system dependencies of your source tree as defined by the system dependencies. It is not designed to install other ROS packages needed by your package. It turns out that you can misuse it like you listed above by aliasing ros packages as system dependencies.

There's another tool that could be written to do what you want. But in the mean time you are responsible for installing your ros dependencies. This has not been a large priority as we have rosinstall generators which will provide you with all ros sources. Examples can be seen in the Source install instructions.

Or if you want binary packages it's a single line to install using apt.
sudo apt-get install ros-fuerte-PACKAGE1 ros-fuerte-PACKAGE2

edit flag offensive delete publish link more

Comments

Ok, pretty clear! I thought that rosdep was designed to install both missing packages and system dependencies.

Benoit Larochelle ( 2013-01-31 20:32:04 -0500 )edit
0

answered 2013-01-22 03:10:55 -0500

Benoit Larochelle gravatar image

updated 2013-01-24 03:44:15 -0500

First of all, geographic_info is a stack and not a system dependency, therefore I must use <depend package="geodesy"/> instead of <rosdep name="geographicinfo"/> in my manifest file. geodesy is a package in the stack geographic_info.

Next, rosmake cannot automatically download missing dependencies like it used to before Fuerte. Therefore, I must manually ensure that the dependencies are fulfilled before calling rosmake. This can be done with apt or rosdep.

For example, sudo apt-get install ros-fuerte-geographic-info works in this particular case. However, I would not recommend this method in general.

The preferred method is to let rosdep find the exact package name for each dependency. For this, I need rosdep rules, and I need to tell rosdep where to find these rules. rosdep builds a database of rules from files found in directory /etc/ros/rosdep/sources.list.d. ROS puts a file there called 20-default.list. I created one called 19-mine.list and put this inside: yaml http://ros.org/rosdoclite/fuerte_bak/api/geographic_info/repo.yaml. This yaml file on the ROS server contains the rules to find geographic_info. I then run rosdep update, which scans both local files and downloads the rules. Then, rosdep install MyPackage should download whatever is missing.

Sadly, I still get: ERROR: the following packages/stacks could not have their rosdep keys resolved to system dependencies: MyPackage: Missing resource geodesy.

Other approach

I went on git's website, forked https://github.com/ros/rosdistro, and modified file rosdep/base.yaml to add these lines:

geographic_info: 
  ubuntu: 
    apt:
      ros-fuerte-geographic-info

In the end, this is the answer that I got from ROS (Vincent Rabaud):

base.yaml is only for upstream dependencies (non-ROS). @tfoote or @tkruse should be able to answer your question though.


In the end, the problem isn't solved yet, but we're half-way there. Please help to complete this solution if you can. :-)

edit flag offensive delete publish link more

Comments

First, afaik <depend> and <rosdep> serve different purposes. depend is required for building the package (e.g. pulling in includes), rosdep is used to install (usually system-)packages. So, even if there is a rosdep key for a package it would still need linker flags via cmakelists.txt or depend.

dornhege ( 2013-01-22 03:21:15 -0500 )edit
1

Second, the repo.yaml you found is not a rosdep file. I have to admit I don't know it's purpose, but rosdep files should have a dictionary: rosdep-key -> os [-> os version] -> package name. The default rosdeps for ROS can be found here: https://github.com/ros/rosdistro/tree/master/rosdep

dornhege ( 2013-01-22 03:23:45 -0500 )edit
1

Without any testing, what you'd want should probably look like: geographic_info: ubuntu: ros-fuerte-geographic-info. I'm not sure how those other generic gpb rules work or where they originate from.

dornhege ( 2013-01-22 03:27:27 -0500 )edit

The package names have only dashes: ros-fuerte-geographic-info.

joq ( 2013-01-22 03:29:14 -0500 )edit

Corrected, thanks.

dornhege ( 2013-01-22 03:34:09 -0500 )edit
1

Please edit your original question, and do not post additional information as an "answer" (which it is not).

joq ( 2013-01-22 03:34:58 -0500 )edit

Ok, I see. But shouldn't these rules already exist on a public server somewhere? Otherwise, wouldn't that mean that I am the first user to ever have a dependency on this stack?

Benoit Larochelle ( 2013-01-22 03:35:17 -0500 )edit

There seems to be a security certificate problem with kforge.ros.org at the moment. Maybe that is your problem.

joq ( 2013-01-22 03:35:28 -0500 )edit
0

answered 2013-01-18 15:15:52 -0500

joq gravatar image

updated 2013-01-21 03:27:08 -0500

Since geographic_info is a ROS package and not a system dependency, use <depend> rather than <rosdep> in your manifest.xml.

On Fuerte, the simplest solution is to install the Ubuntu package:

$ sudo apt-get install ros-fuerte-geographic-info

If you want to build it from source, I recommend using rosws to create an overlay. Here's how to find the source URL:

$  roslocate info geographic_info

- git:
    local-name: geographic_info
    meta:
      repo-name: geographic_info
    uri: https://kforge.ros.org/geographicinfo/geographic_info
    version: master

EDIT: If you use the ROS release tools to build Ubuntu packages for your customers, dependencies like geographic_info get resolved automatically.

EDIT 2: An even simpler option is to define your own ROS variant that declares a dependency on geographic_info. Users who install that Ubuntu package will automatically pull in all the ROS packages you specify. You would not need to include any of your own code in your variant, just the public ROS components your customers require.

See this question on custom ROS variants.

edit flag offensive delete publish link more

Comments

Yes, locally, I did what you and @dornhege suggested: sudo apt-get install ros-fuerte-geographic-info. However, I would like this to be done automatically for my "customers" who don't know ROS much. I and they do not use workspaces, but we don't need to build from source.

Benoit Larochelle ( 2013-01-20 20:56:47 -0500 )edit

Would the ROS release tools work on a non-public server? My customers all have user names and passwords to my company's SVN. This is how they download my package.

Benoit Larochelle ( 2013-01-21 02:01:12 -0500 )edit

Those release tools add your code to packages.ros.org, the same as I did with geographic_info. If you need a non-public repository, I believe some people use them internally. But, that would be a separate question.

joq ( 2013-01-21 02:08:51 -0500 )edit

I edited the question to be more specific. Unfortunately, we use a non-public repository. Also, my customers already use various variants of ROS (based on their choices, I have no control over that). I'll try using SVN externals to fetch the files directly (probably similar to what a variant does)

Benoit Larochelle ( 2013-01-21 02:26:48 -0500 )edit
1

You could also just provide one additional install step, e.g. do sudo apt-get install ros-fuerte.... That might be the simplest and cleanest.

dornhege ( 2013-01-21 03:10:55 -0500 )edit

There are rosdep rules for some released stacks, but I don't know how they came together. Juding from the answers to this question: http://answers.ros.org/question/48825/rosdep-rules-for-released-stacks/ it does not seem to be a feature right now.

dornhege ( 2013-01-21 03:13:02 -0500 )edit

With a variant, sudo apt-get install ros-fuerte-your-variant becomes the only ROS install command your customers would require. They are still free to install others, as well.

joq ( 2013-01-21 03:29:24 -0500 )edit

Yes, but they already have different ROS variants installed. I have no control over that.

Benoit Larochelle ( 2013-01-21 03:48:31 -0500 )edit
0

answered 2013-01-16 23:12:42 -0500

dornhege gravatar image

My suspicion is that this instruction is from electric, where rosdep information was provided by the stack itself. With rosdep2 in fuerte rosdep rules for this stack need to be present, otherwise it won't find anything.

As long as it is installed and in ROS_PACKAGE_PATH, this should not be an issue until someone else uses your package.

edit flag offensive delete publish link more

Comments

Just to clarify, geographicinfo is not installed on my machine. I would like it to install automatically when I call rosmake.

Benoit Larochelle ( 2013-01-16 23:20:02 -0500 )edit

In that case I think you'll have to add a rosdep rule for ros-fuerte-geographic-info yourself.

dornhege ( 2013-01-16 23:52:11 -0500 )edit

I don't know anything about rosdep, so I have no idea how to add a rosdep rule, what such a rule looks like, where I have to add it, etc. Do I have to follow all the steps in http://ros.org/doc/api/rosdep2/html/contributing_rules.html?

Benoit Larochelle ( 2013-01-17 02:24:26 -0500 )edit

Yes, that would be the way to go for rosdep2 rules. I'd maybe contact joq or wait until he replies here as he is the stack maintainer.

dornhege ( 2013-01-17 03:37:04 -0500 )edit

Just one quick note: You are aiming for something portable/releasable, right? In contrast to: You just want it to work on your system for development. In that case a simple sudo apt-get install ros-fuerte-geographic-info would suffice.

dornhege ( 2013-01-17 03:39:07 -0500 )edit

Yes, I want something releasable. I'll update the question.

Benoit Larochelle ( 2013-01-17 03:47:12 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Stats

Asked: 2013-01-16 22:18:35 -0500

Seen: 3,326 times

Last updated: Jan 31 '13