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

How do I specify a ROSDep dependency that is in PyPI but not rosdistro?

asked 2019-10-03 13:39:14 -0500

DanRose gravatar image

updated 2019-10-03 13:49:01 -0500

How do I specify a python package dependency for rosdep that is in PyPI but not in rosdistro? For instance merge_args which is available to pip install. It seems listing these dependencies setup.cfg/setup.py is not sufficient for the build tools to pick it up.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2019-10-03 14:07:26 -0500

tfoote gravatar image

To answer your top question you need to add it to either the global rosdep database or add your own rosdep.yaml files to your sources.list if it's not appropriate for global listing or you want to test it locally.

There's documentation about how to contribute a rosdep key

However from the case that you point to your assumption is incorrect that pyyaml is not in the database, it is already available.

See the keys: https://index.ros.org/d/python-yaml/ and https://index.ros.org/d/python3-yaml/

edit flag offensive delete link more

Comments

Thanks, Tully! The package I mentioned is not the one I'm interested in. I don't mean to imply that pyyaml isn't in the database; though it is kinda weird that, in that case, the name differs between the python package and PyPI.

DanRose gravatar image DanRose  ( 2019-10-03 14:14:11 -0500 )edit

I couldn't find any documentation for what platforms are necessary, so I added them all. Surely there's a better way to do this (wildcard for the OS name?): https://github.com/ros/rosdistro/pull...

DanRose gravatar image DanRose  ( 2019-10-03 15:09:15 -0500 )edit

It's not good to flood to all platforms unless you've tested on them and verified that this is the right package on that platform. For a pip rule you should only add the one(s) that you're using.

tfoote gravatar image tfoote  ( 2019-10-03 15:15:04 -0500 )edit

Most pypi dependencies should be platform-independent. There's no way to specify that to rosdep? I was doing this for this issue https://github.com/ros2/launch_ros/is..., where this library is the perfect solution, but I want to support all platforms launch/launch_ros is capable of running on.

DanRose gravatar image DanRose  ( 2019-10-03 16:49:11 -0500 )edit

"Most platforms" is not all. For example OpenEmbedded does not support pip. The reason for explicitly calling out every OS is so that we know that someone has checked it. If you just put in a wildcard rosdep will tell you that it's resolved. Even if the package doesn't exist, where it should actually tell you, I'm sorry I can't resolve on the platform you asked for.

A pip dependency for a core package like launch_ros is a non-starter as we can't have core dependencies on pip for standard packaging.

tfoote gravatar image tfoote  ( 2019-10-03 16:59:54 -0500 )edit

Question Tools

3 followers

Stats

Asked: 2019-10-03 13:39:14 -0500

Seen: 691 times

Last updated: Oct 03 '19