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

catkin dependency of other packages and python-libs

asked 2013-10-18 07:36:45 -0600

stfn gravatar image

updated 2014-04-20 14:06:44 -0600

ngrennan gravatar image

Hi,

we're moving from fuerte to hydro and I find the new built system rather complicated. I ran into the basic issue of: how do I set a dependency to other ros catkin packages? In the old system you just put the package name within the <depend package="my_package"/> in the manifest-file. When I do that now with run_depend/build_depend in package.xml, rosdep doesnt find the my_package.

Second, I want to declare a dependency on the lib python-flask, but as above rosdep doesnt find it anywhere, although it a debian package. What's wrong with that?

I know there is a ton of documentation out there along with the migration guide, but I just can't find answers to this two very basic issues.

edit retag flag offensive close merge delete

Comments

If you gave the exact rosdep error and context, it might be easier to help. for flask, you could do a pull request here adding flask: https://github.com/ros/rosdistro/blob/master/rosdep/python.yaml

KruseT gravatar image KruseT  ( 2013-10-18 07:50:59 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
3

answered 2013-10-18 09:05:54 -0600

William gravatar image

updated 2013-10-18 09:06:21 -0600

Hi @stfn

rosdep can only resolve system dependencies which have rosdep keys defined here:

https://github.com/ros/rosdistro/tree/master/rosdep

Or released ROS packages.

So from your question I can only guess that the packaged called my_package which you are referring to has not been released into hydro. Had it been released into hydro rosdep would have resolved it and tried to install it with the command sudo apt-get install ros-hydro-my-package.

Just because you package is not released, and therefore not resolvable by rosdep, it doesn't mean you cannot list it in your package.xml as a build_depend and/or run_depend. This dependency listing, just like it was for rosbuild, is then used to determine the order in which your packages will be built. Since my_package is not released and cannot be found via rosdep you are responsible for ensuring it is either in the same workspace or installed somewhere which is on the CMAKE_PREFIX_PATH for other packages to find it when you are building.

If you provide more information about the workflow you are using and the exact rosdep error I can probably help guide you some more.

For the dependency python-flask, as @KruseT said rosdep does not currently have a rule to install that for Ubuntu, so you would either need to add a local rule for your own personal use or better yet open a pull request against our repository which adds the rosdep rule for python-flask. That process is described here:

http://docs.ros.org/independent/api/rosdep/html/contributing_rules.html

edit flag offensive delete link more

Comments

Thanks! That helped. Rosdep finds/installs the package now. One further question: Should/Can I then list pyhton-flask under find_package in the CMakeLists.txt of that package? If I do so, can obviously not find any cmake config for python-flask and throws an error ...

stfn gravatar image stfn  ( 2013-10-23 04:25:22 -0600 )edit
2

You shouldn't have to find_package python only dependencies.

William gravatar image William  ( 2013-10-23 07:31:49 -0600 )edit
1

I have a similar situation: my_package is a package that I am developing myself and in my catkin workspace, rosdep fails (cannot locate rosdep definition). It does not seem to continue trying to install other dependencies, thus brakes the whole rosdep utility. How to proceed? Is it a bug in rosdep?

brice rebsamen gravatar image brice rebsamen  ( 2013-10-28 14:36:51 -0600 )edit
1

@brice rebsamen did you use the `--ignore-src` option to rosdep? It will skip trying to install any packages which are found in source form in the local workspace.

William gravatar image William  ( 2013-10-28 14:41:43 -0600 )edit

--ignore-src was the solution. thanks!

brice rebsamen gravatar image brice rebsamen  ( 2013-10-28 14:48:16 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2013-10-18 07:36:45 -0600

Seen: 1,797 times

Last updated: Oct 18 '13